Changeset 25675 for extensions/AdminTools/include/events.inc.php
- Timestamp:
- Nov 24, 2013, 3:50:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AdminTools/include/events.inc.php
r25657 r25675 20 20 21 21 $tpl_vars = array( 22 'U_SITE_ADMIN' => $url_root . 'admin.php?page=',23 'MULTIVIEW' => $MultiView->get_data(),24 'U_SELF' => $MultiView->get_clean_url(true),25 'USER' => $MultiView->get_user(),22 'U_SITE_ADMIN' => $url_root . 'admin.php?page=', 23 'MULTIVIEW' => $MultiView->get_data(), 24 'U_SELF' => $MultiView->get_clean_url(true), 25 'USER' => $MultiView->get_user(), 26 26 'CURRENT_USERNAME' => $user['id']==$conf['guest_id'] ? l10n('guest') : $user['username'], 27 'PWG_TOKEN' => get_pwg_token(),27 'PWG_TOKEN' => get_pwg_token(), 28 28 ); 29 29 … … 52 52 $template->set_prefilter('picture', 'admintools_remove_privacy'); 53 53 54 $query = 'SELECT element_id FROM ' . CADDIE_TABLE . ' 55 WHERE element_id = ' . $page['image_id'] .';'; 54 $query = ' 55 SELECT element_id FROM ' . CADDIE_TABLE . ' 56 WHERE element_id = ' . $page['image_id'] .' 57 ;'; 56 58 $tpl_vars['IS_IN_CADDIE'] = pwg_db_num_rows(pwg_query($query)) > 0; 57 59 … … 65 67 ); 66 68 67 $query = 'SELECT id FROM ' . CATEGORIES_TABLE.' 68 WHERE id = ' . $page['category']['id'] .' 69 AND representative_picture_id = ' . $page['image_id'] .';'; 69 $query = ' 70 SELECT id FROM ' . CATEGORIES_TABLE.' 71 WHERE id = ' . $page['category']['id'] .' 72 AND representative_picture_id = ' . $page['image_id'] .' 73 ;'; 70 74 $tpl_vars['IS_REPRESENTATIVE'] = pwg_db_num_rows(pwg_query($query)) > 0; 71 75 } … … 95 99 96 100 $tpl_vars['QUICK_EDIT'] = array( 97 'img' => $picture['current']['derivatives']['square'],98 'name' => $picture['current']['name'],99 'comment' => $picture['current']['comment'],100 'author' => $picture['current']['author'],101 'level' => $picture['current']['level'],102 'date_creation' => substr($picture['current']['date_creation'], 0, 10),101 'img' => $picture['current']['derivatives']['square'], 102 'name' => $picture['current']['name'], 103 'comment' => $picture['current']['comment'], 104 'author' => $picture['current']['author'], 105 'level' => $picture['current']['level'], 106 'date_creation' => substr($picture['current']['date_creation'], 0, 10), 103 107 'date_creation_time' => substr($picture['current']['date_creation'], 11, 5), 104 'tag_selection' => $tag_selection,105 'tags' => $tags,106 ); 107 } 108 else if (@$page['section'] = 'categories' and isset($page['category']))108 'tag_selection' => $tag_selection, 109 'tags' => $tags, 110 ); 111 } 112 else if (@$page['section'] == 'categories' and isset($page['category'])) 109 113 { 110 114 $url_self = duplicate_index_url(); … … 128 132 } 129 133 130 $query = 'SELECT * FROM '.IMAGES_TABLE.' WHERE id = '. $page['category']['representative_picture_id'] .';'; 134 $query = ' 135 SELECT * FROM '.IMAGES_TABLE.' 136 WHERE id = '. $page['category']['representative_picture_id'] .' 137 ;'; 131 138 $image_infos = pwg_db_fetch_assoc(pwg_query($query)); 132 139 133 140 $tpl_vars['QUICK_EDIT'] = array( 134 'img' => DerivativeImage::get_one(IMG_SQUARE, $image_infos),135 'name' => $page['category']['name'],136 'comment' => $page['category']['comment'],141 'img' => DerivativeImage::get_one(IMG_SQUARE, $image_infos), 142 'name' => $page['category']['name'], 143 'comment' => $page['category']['comment'], 137 144 ); 138 145 } … … 172 179 )); 173 180 174 $template->set_filename('ato ', realpath(ADMINTOOLS_PATH . 'template/public_controller.tpl'));175 $template->parse('ato ');181 $template->set_filename('ato_public_controller', realpath(ADMINTOOLS_PATH . 'template/public_controller.tpl')); 182 $template->parse('ato_public_controller'); 176 183 177 184 switch_lang_back(); … … 222 229 223 230 $data = array( 224 'name' => $_POST['name'],231 'name' => $_POST['name'], 225 232 'author' => $_POST['author'], 226 'level' => $_POST['level'],233 'level' => $_POST['level'], 227 234 ); 228 235
Note: See TracChangeset
for help on using the changeset viewer.