Changeset 25791 for extensions/AdminTools/include
- Timestamp:
- Dec 5, 2013, 8:36:36 PM (10 years ago)
- Location:
- extensions/AdminTools/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AdminTools/include/MultiView.class.php
r25655 r25791 113 113 ); 114 114 115 if ($this->is_admin) 115 // inactive on ws.php to allow AJAX admin tasks 116 if ($this->is_admin && script_basename() != 'ws') 116 117 { 117 118 if ($this->data['view_as'] == 0) … … 201 202 public function init() 202 203 { 203 if (isset($_GET['ato_purge_template'])) 204 { 205 global $template; 206 $template->delete_compiled_templates(); 207 FileCombiner::clear_combined_files(); 204 if ($this->is_admin) 205 { 206 if (isset($_GET['ato_purge_template'])) 207 { 208 global $template; 209 $template->delete_compiled_templates(); 210 FileCombiner::clear_combined_files(); 211 } 208 212 } 209 213 } -
extensions/AdminTools/include/events.inc.php
r25675 r25791 8 8 function admintools_add_public_controller() 9 9 { 10 global $MultiView, $conf ;10 global $MultiView, $conf, $template, $page, $user; 11 11 12 12 if (!$MultiView->is_admin()) … … 14 14 return; 15 15 } 16 17 global $template, $page, $user;18 16 19 17 $url_root = get_root_url(); … … 99 97 100 98 $tpl_vars['QUICK_EDIT'] = array( 101 'img' => $picture['current']['derivatives']['square'] ,99 'img' => $picture['current']['derivatives']['square']->get_url(), 102 100 'name' => $picture['current']['name'], 103 101 'comment' => $picture['current']['comment'], … … 132 130 } 133 131 134 $query = ' 132 $tpl_vars['QUICK_EDIT'] = array( 133 'img' => null, 134 'name' => $page['category']['name'], 135 'comment' => $page['category']['comment'], 136 ); 137 138 if (!empty($page['category']['representative_picture_id'])) 139 { 140 $query = ' 135 141 SELECT * FROM '.IMAGES_TABLE.' 136 142 WHERE id = '. $page['category']['representative_picture_id'] .' 137 143 ;'; 138 $image_infos = pwg_db_fetch_assoc(pwg_query($query)); 139 140 $tpl_vars['QUICK_EDIT'] = array( 141 'img' => DerivativeImage::get_one(IMG_SQUARE, $image_infos), 142 'name' => $page['category']['name'], 143 'comment' => $page['category']['comment'], 144 ); 144 $image_infos = pwg_db_fetch_assoc(pwg_query($query)); 145 146 $tpl_vars['QUICK_EDIT']['img'] = DerivativeImage::get_one(IMG_SQUARE, $image_infos)->get_url(); 147 } 145 148 } 146 149 … … 201 204 function admintools_save_picture() 202 205 { 203 global $page, $conf; 206 global $page, $conf, $MultiView; 207 208 if (!$MultiView->is_admin()) 209 { 210 return; 211 } 204 212 205 213 if (isset($_GET['delete']) and get_pwg_token()==@$_GET['pwg_token']) … … 269 277 function admintools_save_category() 270 278 { 271 global $page, $conf; 279 global $page, $conf, $MultiView; 280 281 if (!$MultiView->is_admin()) 282 { 283 return; 284 } 272 285 273 286 if (@$_POST['action'] == 'quick_edit')
Note: See TracChangeset
for help on using the changeset viewer.