Changeset 2566:9bf417837888 for inc/admin
- Timestamp:
- 11/17/13 20:25:53 (12 years ago)
- Branch:
- 2.6
- Children:
- 2567:6c11245cbf04, 2568:61c67a7d17fa
- Location:
- inc/admin
- Files:
-
- 7 edited
-
actions/class.dcaction.php (modified) (1 diff)
-
class.dc.favorites.php (modified) (17 diffs)
-
class.dc.menu.php (modified) (8 diffs)
-
lib.admincombos.php (modified) (9 diffs)
-
lib.moduleslist.php (modified) (3 diffs)
-
lib.pager.php (modified) (30 diffs)
-
prepend.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/actions/class.dcaction.php
r2493 r2566 377 377 378 378 } 379 -
inc/admin/class.dc.favorites.php
r2376 r2566 20 20 /** @var dcCore dotclear core instance */ 21 21 protected $core; 22 22 23 23 /** @var array list of favorite definitions */ 24 24 protected $fav_defs; 25 25 26 26 /** @var dcWorkspace current favorite landing workspace */ 27 27 protected $ws; 28 28 29 29 /** @var array list of user-defined favorite ids */ 30 30 protected $local_prefs; … … 32 32 /** @var array list of globally-defined favorite ids */ 33 33 protected $global_prefs; 34 35 /** @var array list of user preferences (either one of the 2 above, or not!) */ 34 35 /** @var array list of user preferences (either one of the 2 above, or not!) */ 36 36 protected $user_prefs; 37 37 38 38 /** 39 39 * Class constructor 40 * 40 * 41 41 * @param mixed $core dotclear core 42 42 * … … 50 50 $this->ws = $core->auth->user_prefs->addWorkspace('dashboard'); 51 51 $this->user_prefs = array(); 52 52 53 53 if ($this->ws->prefExists('favorites')) { 54 54 $this->local_prefs = @unserialize($this->ws->getLocal('favorites')); … … 64 64 // No favorite defined ? Huhu, let's go for a migration 65 65 $this->migrateFavorites(); 66 } 66 } 67 67 defaultFavorites::initDefaultFavorites($this); 68 68 } 69 70 69 70 71 71 /** 72 72 * setup - sets up favorites, fetch user favorites (against his permissions) … … 84 84 /** 85 85 * getFavorite - retrieves a favorite (complete description) from its id. 86 * 86 * 87 87 * @param string $id the favorite id, or an array having 1 key 'name' set to id, ther keys are merged to favorite. 88 88 * … … 117 117 return $fattr; 118 118 } 119 119 120 120 /** 121 121 * getFavorites - retrieves a list of favorites. 122 * 122 * 123 123 * @param string $ids an array of ids, as defined in getFavorite. 124 124 * … … 137 137 return $prefs; 138 138 } 139 139 140 140 /** 141 141 * setUserPrefs - get user favorites from settings. These are complete favorites, not ids only … … 180 180 } 181 181 } 182 183 } 184 182 183 } 184 185 185 /** 186 186 * migrateFavorites - migrate dc < 2.6 favorites to new format … … 208 208 } 209 209 210 211 210 211 212 212 /** 213 213 * legacyFavorites - handle legacy favorites using adminDashboardFavs behavior … … 231 231 $this->register ($v[0], $fav); 232 232 } 233 234 } 235 233 234 } 235 236 236 /** 237 237 * getUserFavorites - returns favorites that correspond to current user … … 245 245 return $this->user_prefs; 246 246 } 247 247 248 248 249 249 /** … … 273 273 $this->ws->put('favorites',serialize($ids),null,null,true,$global); 274 274 } 275 275 276 276 /** 277 277 * getAvailableFavoritesIDs - returns all available fav ids … … 319 319 } 320 320 } 321 321 322 322 /** 323 323 * appendDashboardIcons - adds favorites icons to index page … … 336 336 $icons[$k]=new ArrayObject(array($v['title'],$v['url'],$v['large-icon'])); 337 337 $this->core->callBehavior('adminDashboardFavsIcon',$this->core,$k,$icons[$k]); 338 } 339 } 340 338 } 339 } 340 341 341 /** 342 342 * register - registers a new favorite definition … … 358 358 return $this; 359 359 } 360 360 361 361 /** 362 362 * registerMultiple - registers a list of favorites definition 363 363 * 364 * @param array an array defining all favorites key is the id, value is the data. 364 * @param array an array defining all favorites key is the id, value is the data. 365 365 * see register method for data format 366 366 * @access public 367 */ 367 */ 368 368 public function registerMultiple($data) { 369 369 foreach ($data as $k=>$v) { … … 372 372 return $this; 373 373 } 374 374 375 375 /** 376 376 * exists - tells whether a fav definition exists or not … … 381 381 * 382 382 * @return true if the fav definition exists, false otherwise 383 */ 383 */ 384 384 public function exists($id) { 385 385 return isset($this->fav_defs[$id]); 386 386 } 387 387 388 388 } 389 389 -
inc/admin/class.dc.menu.php
r1179 r2566 16 16 private $id; 17 17 public $title; 18 18 19 19 public function __construct($id,$title,$itemSpace='') 20 20 { … … 24 24 $this->items = array(); 25 25 } 26 26 27 27 public function addItem($title,$url,$img,$active,$show=true,$id=null,$class=null) 28 28 { … … 31 31 } 32 32 } 33 33 34 34 public function prependItem($title,$url,$img,$active,$show=true,$id=null,$class=null) 35 35 { … … 38 38 } 39 39 } 40 40 41 41 public function draw() 42 42 { … … 44 44 return ''; 45 45 } 46 46 47 47 $res = 48 48 '<div id="'.$this->id.'">'. 49 49 ($this->title ? '<h3>'.$this->title.'</h3>' : ''). 50 50 '<ul>'."\n"; 51 51 52 52 for ($i=0; $i<count($this->items); $i++) 53 53 { … … 59 59 } 60 60 } 61 61 62 62 $res .= '</ul></div>'."\n"; 63 63 64 64 return $res; 65 65 } 66 66 67 67 protected function itemDef($title,$url,$img,$active,$id=null,$class=null) 68 68 { … … 74 74 $ahtml = ''; 75 75 } 76 76 77 77 $img = dc_admin_icon_url($img); 78 78 79 79 return 80 80 '<li'.(($active || $class) ? ' class="'.(($active) ? 'active ' : '').(($class) ? $class : '').'"' : ''). … … 82 82 (($img) ? ' style="background-image: url('.$img.');"' : ''). 83 83 '>'. 84 84 85 85 '<a href="'.$link.'"'.$ahtml.'>'.$title.'</a></li>'."\n"; 86 86 } 87 87 } 88 ?> -
inc/admin/lib.admincombos.php
r2154 r2566 14 14 @ingroup DC_CORE 15 15 @nosubgrouping 16 @brief Admin combo library 16 @brief Admin combo library 17 17 18 18 Dotclear utility class that provides reuseable combos across all admin … … 23 23 /** @var dcCore dcCore instance */ 24 24 public static $core; 25 25 26 26 /** 27 27 Returns an hierarchical categories combo from a category record 28 28 29 29 @param categories <b>record</b> the category record 30 30 @return <b>array</b> the combo box (form::combo -compatible format) … … 44 44 return $categories_combo; 45 45 } 46 46 47 47 /** 48 Returns available post status combo 49 48 Returns available post status combo 49 50 50 @return <b>array</b> the combo box (form::combo -compatible format) 51 51 */ … … 57 57 return $status_combo; 58 58 } 59 59 60 60 /** 61 61 Returns an users combo from a users record 62 62 63 63 @param users <b>record</b> the users record 64 64 @return <b>array</b> the combo box (form::combo -compatible format) … … 70 70 $user_cn = dcUtils::getUserCN($users->user_id,$users->user_name, 71 71 $users->user_firstname,$users->user_displayname); 72 72 73 73 if ($user_cn != $users->user_id) { 74 74 $user_cn .= ' ('.$users->user_id.')'; 75 75 } 76 77 $users_combo[$user_cn] = $users->user_id; 76 77 $users_combo[$user_cn] = $users->user_id; 78 78 } 79 79 return $users_combo; 80 80 } 81 81 82 82 /** 83 83 Returns an date combo from a date record 84 84 85 85 @param dates <b>record</b> the dates record 86 86 @return <b>array</b> the combo box (form::combo -compatible format) 87 */ 87 */ 88 88 public static function getDatesCombo($dates) { 89 89 $dt_m_combo= array(); 90 90 while ($dates->fetch()) { 91 91 $dt_m_combo[dt::str('%B %Y',$dates->ts())] = $dates->year().$dates->month(); 92 } 92 } 93 93 return $dt_m_combo; 94 94 } 95 95 96 96 /** 97 97 Returns an lang combo from a lang record 98 98 99 99 @param langs <b>record</b> the langs record 100 100 @param with_available <b>boolean</b> if false, only list items from record 101 101 if true, also list available languages 102 102 @return <b>array</b> the combo box (form::combo -compatible format) 103 */ 103 */ 104 104 public static function getLangsCombo($langs,$with_available=false) { 105 105 $all_langs = l10n::getISOcodes(0,1); … … 124 124 return $langs_combo; 125 125 } 126 126 127 127 /** 128 128 Returns a combo containing all available and installed languages for administration pages 129 129 130 130 @return <b>array</b> the combo box (form::combo -compatible format) 131 */ 131 */ 132 132 public static function getAdminLangsCombo() { 133 133 $lang_combo = array(); … … 139 139 return $lang_combo; 140 140 } 141 141 142 142 /** 143 143 Returns a combo containing all available formaters in admin 144 144 145 145 @return <b>array</b> the combo box (form::combo -compatible format) 146 */ 146 */ 147 147 public static function getFormatersCombo() { 148 148 foreach (self::$core->getFormaters() as $v) { … … 151 151 return $formaters_combo; 152 152 } 153 153 154 154 /** 155 155 Returns a combo containing available blog statuses 156 156 157 157 @return <b>array</b> the combo box (form::combo -compatible format) 158 */ 158 */ 159 159 public static function getBlogStatusesCombo() { 160 160 $status_combo = array(); … … 164 164 return $status_combo; 165 165 } 166 166 167 167 /** 168 168 Returns a combo containing available comment statuses 169 169 170 170 @return <b>array</b> the combo box (form::combo -compatible format) 171 */ 171 */ 172 172 public static function getCommentStatusescombo() { 173 173 $status_combo = array(); -
inc/admin/lib.moduleslist.php
r2490 r2566 765 765 if (!empty($buttons)) { 766 766 if (in_array('checkbox', $cols)) { 767 echo 767 echo 768 768 '<p class="checkboxes-helpers"></p>'; 769 769 } … … 772 772 } 773 773 } 774 echo 774 echo 775 775 '</form>'; 776 776 … … 1592 1592 if (!empty($buttons)) { 1593 1593 if (in_array('checkbox', $cols)) { 1594 echo 1594 echo 1595 1595 '<p class="checkboxes-helpers"></p>'; 1596 1596 } -
inc/admin/lib.pager.php
r2386 r2566 16 16 protected $form_action; 17 17 protected $form_hidden; 18 18 19 19 protected function getLink($li_class,$href,$img_src,$img_src_nolink,$img_alt,$enable_link) { 20 20 if ($enable_link) { … … 60 60 $this->form_action = $url['path']; 61 61 } 62 62 63 63 /** 64 64 * Pager Links … … 103 103 ($this->env < $this->nb_pages) 104 104 ); 105 $htmlCurrent = 105 $htmlCurrent = 106 106 '<li class="active"><strong>'. 107 107 sprintf(__('Page %s / %s'),$this->env,$this->nb_pages). 108 108 '</strong></li>'; 109 110 $htmlDirect = 109 110 $htmlDirect = 111 111 ($this->nb_pages > 1 ? 112 112 sprintf('<li class="direct-access">'.__('Direct access page %s'), … … 114 114 '<input type="submit" value="'.__('ok').'" class="reset" '. 115 115 'name="ok" />'.$this->form_hidden.'</li>' : ''); 116 117 $res = 116 117 $res = 118 118 '<form action="'.$this->form_action.'" method="get">'. 119 119 '<div class="pager"><ul>'. … … 128 128 '</form>' 129 129 ; 130 130 131 131 return $this->nb_elements > 0 ? $res : ''; 132 132 } … … 138 138 protected $rs; 139 139 protected $rs_count; 140 140 141 141 public function __construct($core,$rs,$rs_count) 142 142 { … … 173 173 '<div class="table-outer">'. 174 174 '<table>'; 175 175 176 176 if( $filter ) { 177 177 $html_block .= '<caption>'.sprintf(__('List of %s entries match the filter.'), $this->rs_count).'</caption>'; … … 179 179 $html_block .= '<caption class="hidden">'.__('Entries list').'</caption>'; 180 180 } 181 181 182 182 $html_block .= '<tr>'. 183 183 '<th colspan="2" class="first">'.__('Title').'</th>'. … … 189 189 '<th scope="col">'.__('Status').'</th>'. 190 190 '</tr>%s</table></div>'; 191 191 192 192 if ($enclose_block) { 193 193 $html_block = sprintf($enclose_block,$html_block); 194 194 } 195 196 echo $pager->getLinks(); 197 195 196 echo $pager->getLinks(); 197 198 198 $blocks = explode('%s',$html_block); 199 199 200 200 echo $blocks[0]; 201 201 202 202 while ($this->rs->fetch()) 203 203 { 204 204 echo $this->postLine(isset($entries[$this->rs->post_id])); 205 205 } 206 206 207 207 echo $blocks[1]; 208 209 echo $pager->getLinks(); 210 } 211 } 212 208 209 echo $pager->getLinks(); 210 } 211 } 212 213 213 private function postLine($checked) 214 214 { … … 218 218 $cat_link = '%2$s'; 219 219 } 220 220 221 221 if ($this->rs->cat_title) { 222 222 $cat_title = sprintf($cat_link,$this->rs->cat_id, … … 225 225 $cat_title = __('(No cat)'); 226 226 } 227 227 228 228 $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 229 229 switch ($this->rs->post_status) { … … 241 241 break; 242 242 } 243 243 244 244 $protected = ''; 245 245 if ($this->rs->post_password) { 246 246 $protected = sprintf($img,__('Protected'),'locker.png'); 247 247 } 248 248 249 249 $selected = ''; 250 250 if ($this->rs->post_selected) { 251 251 $selected = sprintf($img,__('Selected'),'selected.png'); 252 252 } 253 253 254 254 $attach = ''; 255 255 $nb_media = $this->rs->countMedia(); … … 258 258 $attach = sprintf($img,sprintf($attach_str,$nb_media),'attach.png'); 259 259 } 260 260 261 261 $res = '<tr class="line'.($this->rs->post_status != 1 ? ' offline' : '').'"'. 262 262 ' id="p'.$this->rs->post_id.'">'; 263 263 264 264 $res .= 265 265 '<td class="nowrap">'. … … 274 274 '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'. 275 275 '</tr>'; 276 276 277 277 return $res; 278 278 } … … 290 290 { 291 291 $pager = new dcPager($page,$this->rs_count,$nb_per_page,10); 292 292 293 293 $html_block = 294 294 '<div class="table-outer clear">'. … … 299 299 '<th scope="col">'.__('Status').'</th>'. 300 300 '</tr>%s</table></div>'; 301 301 302 302 if ($enclose_block) { 303 303 $html_block = sprintf($enclose_block,$html_block); 304 304 } 305 306 echo $pager->getLinks(); 307 305 306 echo $pager->getLinks(); 307 308 308 $blocks = explode('%s',$html_block); 309 309 310 310 echo $blocks[0]; 311 311 312 312 while ($this->rs->fetch()) 313 313 { 314 314 echo $this->postLine(); 315 315 } 316 316 317 317 echo $blocks[1]; 318 319 echo $pager->getLinks(); 320 } 321 } 322 318 319 echo $pager->getLinks(); 320 } 321 } 322 323 323 private function postLine() 324 324 { … … 338 338 break; 339 339 } 340 340 341 341 $protected = ''; 342 342 if ($this->rs->post_password) { 343 343 $protected = sprintf($img,__('Protected'),'locker.png'); 344 344 } 345 345 346 346 $selected = ''; 347 347 if ($this->rs->post_selected) { 348 348 $selected = sprintf($img,__('Selected'),'selected.png'); 349 349 } 350 350 351 351 $attach = ''; 352 352 $nb_media = $this->rs->countMedia(); … … 355 355 $attach = sprintf($img,sprintf($attach_str,$nb_media),'attach.png'); 356 356 } 357 357 358 358 $res = '<tr class="line'.($this->rs->post_status != 1 ? ' offline' : '').'"'. 359 359 ' id="p'.$this->rs->post_id.'">'; 360 360 361 361 $res .= 362 362 '<td scope="row" class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'" '. … … 367 367 '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'. 368 368 '</tr>'; 369 369 370 370 return $res; 371 371 } … … 387 387 { 388 388 $pager = new dcPager($page,$this->rs_count,$nb_per_page,10); 389 389 390 390 $comments = array(); 391 391 if (isset($_REQUEST['comments'])) { … … 393 393 $comments[(integer)$v]=true; 394 394 } 395 } 395 } 396 396 $html_block = 397 397 '<div class="table-outer">'. 398 398 '<table>'; 399 399 400 400 if( $filter ) { 401 401 $html_block .= '<caption>'. … … 408 408 $html_block .= '<caption class="hidden">'.__('Comments and trackbacks list').'</caption>'; 409 409 } 410 410 411 411 $html_block .= '<tr>'. 412 412 '<th colspan="2" scope="col" abbr="comm" class="first">'.__('Type').'</th>'. … … 420 420 $html_block = sprintf($enclose_block,$html_block); 421 421 } 422 423 echo $pager->getLinks(); 424 422 423 echo $pager->getLinks(); 424 425 425 $blocks = explode('%s',$html_block); 426 426 427 427 echo $blocks[0]; 428 428 429 429 while ($this->rs->fetch()) 430 430 { 431 431 echo $this->commentLine(isset($comments[$this->rs->comment_id])); 432 432 } 433 433 434 434 echo $blocks[1]; 435 436 echo $pager->getLinks(); 437 } 438 } 439 435 436 echo $pager->getLinks(); 437 } 438 } 439 440 440 private function commentLine($checked=false) 441 441 { 442 442 global $author, $status, $sortby, $order, $nb_per_page; 443 443 444 444 $author_url = 445 445 'comments.php?n='.$nb_per_page. … … 448 448 '&order='.$order. 449 449 '&author='.rawurlencode($this->rs->comment_author); 450 450 451 451 $post_url = $this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id); 452 452 453 453 $comment_url = 'comment.php?id='.$this->rs->comment_id; 454 454 455 455 $comment_dt = 456 456 dt::dt2str($this->core->blog->settings->system->date_format.' - '. 457 457 $this->core->blog->settings->system->time_format,$this->rs->comment_dt); 458 458 459 459 $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 460 460 switch ($this->rs->comment_status) { … … 472 472 break; 473 473 } 474 474 475 475 $post_title = html::escapeHTML($this->rs->post_title); 476 476 if (mb_strlen($post_title) > 70) { … … 480 480 $this->rs->comment_trackback ? __('trackback') : __('comment'), 481 481 html::escapeHTML($this->rs->comment_author)); 482 482 483 483 $res = '<tr class="line'.($this->rs->comment_status != 1 ? ' offline' : '').'"'. 484 484 ' id="c'.$this->rs->comment_id.'">'; 485 485 486 486 $res .= 487 487 '<td class="nowrap">'. … … 497 497 html::escapeHTML($post_title).'</a>'. 498 498 ($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').'</td>'; 499 499 500 500 $res .= '</tr>'; 501 501 502 502 return $res; 503 503 } … … 519 519 { 520 520 $pager = new dcPager($page,$this->rs_count,$nb_per_page,10); 521 521 522 522 $html_block = 523 523 '<div class="table-outer clear">'. 524 524 '<table>'; 525 525 526 526 if( $filter ) { 527 527 $html_block .= '<caption>'.sprintf(__('List of %s users match the filter.'), $this->rs_count).'</caption>'; … … 529 529 $html_block .= '<caption class="hidden">'.__('Users list').'</caption>'; 530 530 } 531 531 532 532 $html_block .= '<tr>'. 533 533 '<th colspan="2" scope="col" class="first">'.__('Username').'</th>'. … … 537 537 '<th scope="col" class="nowrap">'.__('Entries (all types)').'</th>'. 538 538 '</tr>%s</table></div>'; 539 539 540 540 if ($enclose_block) { 541 541 $html_block = sprintf($enclose_block,$html_block); 542 542 } 543 544 echo $pager->getLinks(); 545 543 544 echo $pager->getLinks(); 545 546 546 $blocks = explode('%s',$html_block); 547 547 548 548 echo $blocks[0]; 549 549 550 550 while ($this->rs->fetch()) 551 551 { 552 552 echo $this->userLine(); 553 553 } 554 554 555 555 echo $blocks[1]; 556 557 echo $pager->getLinks(); 558 } 559 } 560 556 557 echo $pager->getLinks(); 558 } 559 } 560 561 561 private function userLine() 562 562 { 563 563 $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 564 564 $img_status = ''; 565 565 566 566 $p = $this->core->getUserPermissions($this->rs->user_id); 567 567 568 568 if (isset($p[$this->core->blog->id]['p']['admin'])) { 569 569 $img_status = sprintf($img,__('admin'),'admin.png'); -
inc/admin/prepend.php
r2277 r2566 24 24 function dc_load_locales() { 25 25 global $_lang, $core; 26 26 27 27 $_lang = $core->auth->getInfo('user_lang'); 28 28 $_lang = preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$_lang) ? $_lang : 'en'; 29 29 30 30 l10n::lang($_lang); 31 31 if (l10n::set(dirname(__FILE__).'/../../locales/'.$_lang.'/date') === false && $_lang != 'en') { … … 40 40 { 41 41 global $core; 42 42 43 43 $core->auth->user_prefs->addWorkspace('interface'); 44 44 $user_ui_iconset = @$core->auth->user_prefs->interface->iconset; 45 45 if (($user_ui_iconset) && ($img)) { 46 46 $icon = false; 47 if ((preg_match('/^images\/menu\/(.+)$/',$img,$m)) || 47 if ((preg_match('/^images\/menu\/(.+)$/',$img,$m)) || 48 48 (preg_match('/^index\.php\?pf=(.+)$/',$img,$m))) { 49 49 if ($m[1]) { … … 65 65 # We have session information in constants 66 66 $_COOKIE[DC_SESSION_NAME] = DC_AUTH_SESS_ID; 67 67 68 68 if (!$core->auth->checkSession(DC_AUTH_SESS_UID)) { 69 69 throw new Exception('Invalid session data.'); 70 70 } 71 71 72 72 # Check nonce from POST requests 73 73 if (!empty($_POST)) … … 77 77 } 78 78 } 79 79 80 80 if (empty($_SESSION['sess_blog_id'])) { 81 81 throw new Exception('Permission denied.'); 82 82 } 83 83 84 84 # Loading locales 85 85 dc_load_locales(); 86 86 87 87 $core->setBlog($_SESSION['sess_blog_id']); 88 88 if (!$core->blog->id) { … … 100 100 $p[3] = '/'; 101 101 call_user_func_array('setcookie',$p); 102 102 103 103 http::redirect('auth.php'); 104 104 } … … 108 108 ,20); 109 109 } 110 110 111 111 # Check nonce from POST requests 112 112 if (!empty($_POST)) … … 119 119 } 120 120 } 121 122 121 122 123 123 if (!empty($_REQUEST['switchblog']) 124 124 && $core->auth->getPermissions($_REQUEST['switchblog']) !== false) … … 131 131 unset($_SESSION['media_manager_page']); 132 132 } 133 133 134 134 # Removing switchblog from URL 135 135 $redir = $_SERVER['REQUEST_URI']; … … 139 139 exit; 140 140 } 141 141 142 142 # Check blog to use and log out if no result 143 143 if (isset($_SESSION['sess_blog_id'])) … … 154 154 } 155 155 } 156 156 157 157 # Loading locales 158 158 dc_load_locales(); 159 159 160 160 if (isset($_SESSION['sess_blog_id'])) { 161 161 $core->setBlog($_SESSION['sess_blog_id']); … … 165 165 } 166 166 167 /* 167 /* 168 168 # Check add to my fav fired 169 169 if (!empty($_REQUEST['add-favorite'])) { … … 184 184 } 185 185 unset($f); 186 186 187 187 if (($hfiles = @scandir($locales_root.$_lang.'/help')) !== false) 188 188 { … … 205 205 # [] : Title, URL, small icon, large icon, permissions, id, class 206 206 # NB : '*' in permissions means any, null means super admin only 207 208 207 208 209 209 # Menus creation 210 210 $_menu = new ArrayObject(); … … 219 219 $core->plugins->loadModules(DC_PLUGINS_ROOT,'admin',$_lang); 220 220 $core->favs->setup(); 221 221 222 222 if (!$user_ui_nofavmenu) { 223 223 $core->favs->appendMenu($_menu); 224 224 } 225 225 226 226 227 227 # Set menu titles 228 228 229 229 $_menu['System']->title = __('System settings'); 230 230 $_menu['Blog']->title = __('Blog'); … … 256 256 preg_match('/post.php$/',$_SERVER['REQUEST_URI']), 257 257 $core->auth->check('usage,contentadmin',$core->blog->id)); 258 258 259 259 $_menu['System']->prependItem(__('Update'),'update.php','images/menu/update.png', 260 260 preg_match('/update.php(\?.*)?$/',$_SERVER['REQUEST_URI']), … … 273 273 $core->auth->isSuperAdmin() || 274 274 $core->auth->check('usage,contentadmin',$core->blog->id) && $core->auth->getBlogCount() > 1); 275 275 276 276 if (empty($core->blog->settings->system->jquery_migrate_mute)) { 277 277 $core->blog->settings->system->put('jquery_migrate_mute', true, 'boolean', 'Mute warnings for jquery migrate plugin ?', false); 278 278 } 279 279 } 280 ?>
Note: See TracChangeset
for help on using the changeset viewer.
