17 require_once SQ_PACKAGES_PATH.
'/web_services/rest/page_templates/page_rest_resource/page_rest_resource_edit_fns.inc';
38 parent::__construct();
39 $this->static_screens[
'details'][
'force_unlock'] = FALSE;
57 $access_token = $asset->attr(
'access_token');
58 $access_token_secret = $asset->attr(
'access_token_secret');
59 if(empty($access_token) ){
60 if(isset($_SESSION[
'oauth'][$asset->id][
'access_token'] ) && isset($_SESSION[
'oauth'][$asset->id][
'access_token_secret'])) {
62 $access_token = $_SESSION[
'oauth'][$asset->id][
'access_token'];
63 $access_token_secret = $_SESSION[
'oauth'][$asset->id][
'access_token_secret'];
67 $access_token =
'none';
68 $access_token_secret =
'none';
73 <table border=
"0" class=
"sq-backend-table">
75 <th width=
"20%"><?php echo translate(
'oauth_access_token_type', $type); ?></th>
78 echo htmlspecialchars($type);
83 <th width=
"20%"><?php echo translate(
'oauth_access_token'); ?></th>
86 echo htmlspecialchars($access_token);
91 <th width=
"20%"><?php echo translate(
'oauth_access_token_secret'); ?></th>
94 echo htmlspecialchars($access_token_secret);
117 if ($asset->writeAccess(
'attributes')) {
118 $store_token = $asset->attr(
'store_token');
120 $asset->setAttrValue(
'access_token',
'');
121 $asset->setAttrValue(
'access_token_secret',
'');
123 else if(isset($_SESSION[
'oauth'][$asset->id][
'access_token'] ) && isset($_SESSION[
'oauth'][$asset->id][
'access_token_secret'])) {
124 $asset->setAttrValue(
'access_token', $_SESSION[
'oauth'][$asset->id][
'access_token']);
125 $asset->setAttrValue(
'access_token_secret', $_SESSION[
'oauth'][$asset->id][
'access_token_secret']);