Dotclear


Ignore:
Timestamp:
12/03/12 14:29:47 (13 years ago)
Author:
Dsls <dsls@…>
Branch:
twig
Message:
  • Added page errors & informations in context and default layout page.
  • Added submit actions and hidden fields.
  • cleaned up code in admin/post.php, all actions need to be recoded.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/class.dc.admincontext.php

    r1014 r1053  
    66     protected $js_var; 
    77     protected $head; 
     8     protected $globals; 
    89      
    910     protected $core; 
     
    1617          $this->jsCommon(); 
    1718          $this->blogs = array(); 
     19          $this->globals = array(); 
    1820          if ($this->core->auth->blog_count > 1 && $this->core->auth->blog_count < 20) { 
    1921               $rs_blogs = $core->getBlogs(array('order'=>'LOWER(blog_name)','limit'=>20)); 
     
    110112     } 
    111113     public function getGlobals() { 
    112           return array(); 
     114          return $this->globals; 
    113115     } 
    114116     public function getName() { 
    115117          return 'AdminPage'; 
    116118     } 
     119 
     120     public function setMessage($message) { 
     121          $this->globals['page_message'] = $message; 
     122          return $this; 
     123     } 
     124      
     125     public function addError($error) { 
     126          if (!isset($this->globals['page_errors'])) 
     127               $this->globals['page_errors']=array(); 
     128          $this->globals['page_errors'][] = $error; 
     129          return $this; 
     130     } 
     131 
    117132     public function getFilters() 
    118133     { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map