Changeset 2321:3ab5e6c3d301 for inc/admin/class.dc.admincontext.php
- Timestamp:
- 10/09/13 15:21:14 (12 years ago)
- Branch:
- twig
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/class.dc.admincontext.php
r1507 r2321 63 63 } 64 64 } 65 66 public function __isset($name) { 67 if ($this->isAllowed($name,$this->attributes)) { 68 return isset($this->object->$name); 69 } else { 70 return false; 71 } 72 } 73 65 74 66 75 public function __call($name,$args) { … … 258 267 $p = path::info($_SERVER['REQUEST_URI']); 259 268 $this->protected_globals['current_page'] = $p['base']; 260 $this->protected_globals['blog_count'] = $this->core->auth-> blog_count;269 $this->protected_globals['blog_count'] = $this->core->auth->getBlogCount(); 261 270 $this->protected_globals['rtl'] = l10n::getTextDirection( 262 271 $this->protected_globals['current_user']['lang']) == 'rtl'; … … 266 275 'nonce' => $this->core->getNonce() 267 276 ); 268 269 277 # Keep protected globals safe 270 278 return array_merge($this->globals,$this->protected_globals); … … 421 429 # Blogs list 422 430 $blogs = array(); 423 if ($this->core->auth->blog_count > 1 && $this->core->auth->blog_count < 20) { 431 $blog_count = $this->core->auth->getBlogCount(); 432 if ($blog_count > 1 && $blog_count < 20) { 424 433 $blog_id = $this->core->blog->id; 425 434 $rs_blogs = $this->core->getBlogs(array('order'=>'LOWER(blog_name)','limit'=>20)); … … 446 455 $sform 447 456 ->addField( 448 new dcFieldText('q ','',array(457 new dcFieldText('qx','',array( 449 458 'maxlength' => 255, 450 459 'label' => __('Search:')))) … … 460 469 protected function getCurrentBlog() 461 470 { 462 $this->protected_globals['current_blog'] = $this->core->auth-> blog_count?463 new dcProxy($this->core->blog,array( 471 $this->protected_globals['current_blog'] = $this->core->auth->getBlogCount() ? 472 new dcProxy($this->core->blog,array('attr' => array( 464 473 'id','name','desc','url','host','creadt','upddt' 465 )) : array(474 ))) : array( 466 475 'id' => '', 467 476 'name' => '',
Note: See TracChangeset
for help on using the changeset viewer.