Dotclear


Ignore:
Timestamp:
11/17/13 20:25:53 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.6
Children:
2567:6c11245cbf04, 2568:61c67a7d17fa
Message:

Add some people in CREDITS, remove trailing spaces and tabs.

Location:
inc/admin
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/actions/class.dcaction.php

    r2493 r2566  
    377377 
    378378} 
    379  
  • inc/admin/class.dc.favorites.php

    r2376 r2566  
    2020     /** @var dcCore dotclear core instance */ 
    2121     protected $core; 
    22       
     22 
    2323     /** @var array list of favorite definitions  */ 
    2424     protected $fav_defs; 
    25       
     25 
    2626     /** @var dcWorkspace current favorite landing workspace */ 
    2727     protected $ws; 
    28       
     28 
    2929     /** @var array list of user-defined favorite ids */ 
    3030     protected $local_prefs; 
     
    3232     /** @var array list of globally-defined favorite ids */ 
    3333     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!) */ 
    3636     protected $user_prefs; 
    37       
     37 
    3838    /** 
    3939     * Class constructor 
    40      *  
     40     * 
    4141     * @param mixed  $core   dotclear core 
    4242     * 
     
    5050          $this->ws = $core->auth->user_prefs->addWorkspace('dashboard'); 
    5151          $this->user_prefs = array(); 
    52            
     52 
    5353          if ($this->ws->prefExists('favorites')) { 
    5454               $this->local_prefs = @unserialize($this->ws->getLocal('favorites')); 
     
    6464               // No favorite defined ? Huhu, let's go for a migration 
    6565               $this->migrateFavorites(); 
    66           }     
     66          } 
    6767          defaultFavorites::initDefaultFavorites($this); 
    6868     } 
    69       
    70       
     69 
     70 
    7171    /** 
    7272     * setup - sets up favorites, fetch user favorites (against his permissions) 
     
    8484   /** 
    8585     * getFavorite - retrieves a favorite (complete description) from its id. 
    86      *  
     86     * 
    8787     * @param string  $id   the favorite id, or an array having 1 key 'name' set to id, ther keys are merged to favorite. 
    8888     * 
     
    117117          return $fattr; 
    118118     } 
    119       
     119 
    120120   /** 
    121121     * getFavorites - retrieves a list of favorites. 
    122      *  
     122     * 
    123123     * @param string  $ids   an array of ids, as defined in getFavorite. 
    124124     * 
     
    137137          return $prefs; 
    138138     } 
    139            
     139 
    140140   /** 
    141141     * setUserPrefs - get user favorites from settings. These are complete favorites, not ids only 
     
    180180               } 
    181181          } 
    182                 
    183      } 
    184       
     182 
     183     } 
     184 
    185185   /** 
    186186     * migrateFavorites - migrate dc < 2.6 favorites to new format 
     
    208208     } 
    209209 
    210       
    211       
     210 
     211 
    212212   /** 
    213213     * legacyFavorites - handle legacy favorites using adminDashboardFavs behavior 
     
    231231               $this->register ($v[0], $fav); 
    232232          } 
    233            
    234      } 
    235       
     233 
     234     } 
     235 
    236236   /** 
    237237     * getUserFavorites - returns favorites that correspond to current user 
     
    245245          return $this->user_prefs; 
    246246     } 
    247       
     247 
    248248 
    249249   /** 
     
    273273          $this->ws->put('favorites',serialize($ids),null,null,true,$global); 
    274274     } 
    275       
     275 
    276276   /** 
    277277     * getAvailableFavoritesIDs - returns all available fav ids 
     
    319319          } 
    320320     } 
    321       
     321 
    322322   /** 
    323323     * appendDashboardIcons - adds favorites icons to index page 
     
    336336               $icons[$k]=new ArrayObject(array($v['title'],$v['url'],$v['large-icon'])); 
    337337               $this->core->callBehavior('adminDashboardFavsIcon',$this->core,$k,$icons[$k]); 
    338           }          
    339      } 
    340       
     338          } 
     339     } 
     340 
    341341   /** 
    342342     * register - registers a new favorite definition 
     
    358358          return $this; 
    359359     } 
    360       
     360 
    361361   /** 
    362362     * registerMultiple - registers a list of favorites definition 
    363363      * 
    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. 
    365365      *                  see register method for data format 
    366366     * @access public 
    367      */    
     367     */ 
    368368      public function registerMultiple($data) { 
    369369          foreach ($data as $k=>$v) { 
     
    372372          return $this; 
    373373     } 
    374       
     374 
    375375   /** 
    376376     * exists - tells whether a fav definition exists or not 
     
    381381      * 
    382382      * @return true if the fav definition exists, false otherwise 
    383      */    
     383     */ 
    384384     public function exists($id) { 
    385385          return isset($this->fav_defs[$id]); 
    386386     } 
    387       
     387 
    388388} 
    389389 
  • inc/admin/class.dc.menu.php

    r1179 r2566  
    1616     private $id; 
    1717     public $title; 
    18       
     18 
    1919     public function __construct($id,$title,$itemSpace='') 
    2020     { 
     
    2424          $this->items = array(); 
    2525     } 
    26       
     26 
    2727     public function addItem($title,$url,$img,$active,$show=true,$id=null,$class=null) 
    2828     { 
     
    3131          } 
    3232     } 
    33       
     33 
    3434     public function prependItem($title,$url,$img,$active,$show=true,$id=null,$class=null) 
    3535     { 
     
    3838          } 
    3939     } 
    40       
     40 
    4141     public function draw() 
    4242     { 
     
    4444               return ''; 
    4545          } 
    46            
     46 
    4747          $res = 
    4848          '<div id="'.$this->id.'">'. 
    4949          ($this->title ? '<h3>'.$this->title.'</h3>' : ''). 
    5050          '<ul>'."\n"; 
    51            
     51 
    5252          for ($i=0; $i<count($this->items); $i++) 
    5353          { 
     
    5959               } 
    6060          } 
    61            
     61 
    6262          $res .= '</ul></div>'."\n"; 
    63            
     63 
    6464          return $res; 
    6565     } 
    66       
     66 
    6767     protected function itemDef($title,$url,$img,$active,$id=null,$class=null) 
    6868     { 
     
    7474               $ahtml = ''; 
    7575          } 
    76            
     76 
    7777          $img = dc_admin_icon_url($img); 
    78            
     78 
    7979          return 
    8080          '<li'.(($active || $class) ? ' class="'.(($active) ? 'active ' : '').(($class) ? $class : '').'"' : ''). 
     
    8282          (($img) ? ' style="background-image: url('.$img.');"' : ''). 
    8383          '>'. 
    84            
     84 
    8585          '<a href="'.$link.'"'.$ahtml.'>'.$title.'</a></li>'."\n"; 
    8686     } 
    8787} 
    88 ?> 
  • inc/admin/lib.admincombos.php

    r2154 r2566  
    1414@ingroup DC_CORE 
    1515@nosubgrouping 
    16 @brief Admin combo library  
     16@brief Admin combo library 
    1717 
    1818Dotclear utility class that provides reuseable combos across all admin 
     
    2323     /** @var dcCore dcCore instance */ 
    2424     public static $core; 
    25       
     25 
    2626     /** 
    2727     Returns an hierarchical categories combo from a category record 
    28       
     28 
    2929     @param    categories          <b>record</b>       the category record 
    3030     @return   <b>array</b> the combo box (form::combo -compatible format) 
     
    4444          return $categories_combo; 
    4545     } 
    46       
     46 
    4747     /** 
    48      Returns available post status combo  
    49       
     48     Returns available post status combo 
     49 
    5050     @return   <b>array</b> the combo box (form::combo -compatible format) 
    5151     */ 
     
    5757          return $status_combo; 
    5858     } 
    59       
     59 
    6060     /** 
    6161     Returns an users combo from a users record 
    62       
     62 
    6363     @param    users          <b>record</b>       the users record 
    6464     @return   <b>array</b> the combo box (form::combo -compatible format) 
     
    7070               $user_cn = dcUtils::getUserCN($users->user_id,$users->user_name, 
    7171               $users->user_firstname,$users->user_displayname); 
    72                 
     72 
    7373               if ($user_cn != $users->user_id) { 
    7474                    $user_cn .= ' ('.$users->user_id.')'; 
    7575               } 
    76                 
    77                $users_combo[$user_cn] = $users->user_id;  
     76 
     77               $users_combo[$user_cn] = $users->user_id; 
    7878          } 
    7979          return $users_combo; 
    8080     } 
    81       
     81 
    8282     /** 
    8383     Returns an date combo from a date record 
    84       
     84 
    8585     @param    dates          <b>record</b>       the dates record 
    8686     @return   <b>array</b> the combo box (form::combo -compatible format) 
    87      */    
     87     */ 
    8888     public static function getDatesCombo($dates) { 
    8989          $dt_m_combo= array(); 
    9090          while ($dates->fetch()) { 
    9191               $dt_m_combo[dt::str('%B %Y',$dates->ts())] = $dates->year().$dates->month(); 
    92           }          
     92          } 
    9393          return $dt_m_combo; 
    9494     } 
    95       
     95 
    9696     /** 
    9797     Returns an lang combo from a lang record 
    98       
     98 
    9999     @param    langs          <b>record</b>       the langs record 
    100100     @param    with_available <b>boolean</b> if false, only list items from record 
    101101                                                       if true, also list available languages 
    102102     @return   <b>array</b> the combo box (form::combo -compatible format) 
    103      */    
     103     */ 
    104104     public static function getLangsCombo($langs,$with_available=false) { 
    105105          $all_langs = l10n::getISOcodes(0,1); 
     
    124124          return $langs_combo; 
    125125     } 
    126       
     126 
    127127     /** 
    128128     Returns a combo containing all available and installed languages for administration pages 
    129       
     129 
    130130     @return   <b>array</b> the combo box (form::combo -compatible format) 
    131      */    
     131     */ 
    132132     public static function getAdminLangsCombo() { 
    133133          $lang_combo = array(); 
     
    139139          return $lang_combo; 
    140140     } 
    141       
     141 
    142142     /** 
    143143     Returns a combo containing all available formaters in admin 
    144       
     144 
    145145     @return   <b>array</b> the combo box (form::combo -compatible format) 
    146      */    
     146     */ 
    147147     public static function getFormatersCombo() { 
    148148          foreach (self::$core->getFormaters() as $v) { 
     
    151151          return $formaters_combo; 
    152152     } 
    153       
     153 
    154154     /** 
    155155     Returns a combo containing available blog statuses 
    156       
     156 
    157157     @return   <b>array</b> the combo box (form::combo -compatible format) 
    158      */    
     158     */ 
    159159     public static function getBlogStatusesCombo() { 
    160160          $status_combo = array(); 
     
    164164          return $status_combo; 
    165165     } 
    166       
     166 
    167167     /** 
    168168     Returns a combo containing available comment statuses 
    169       
     169 
    170170     @return   <b>array</b> the combo box (form::combo -compatible format) 
    171      */    
     171     */ 
    172172     public static function getCommentStatusescombo() { 
    173173          $status_combo = array(); 
  • inc/admin/lib.moduleslist.php

    r2490 r2566  
    765765               if (!empty($buttons)) { 
    766766                    if (in_array('checkbox', $cols)) { 
    767                          echo  
     767                         echo 
    768768                         '<p class="checkboxes-helpers"></p>'; 
    769769                    } 
     
    772772               } 
    773773          } 
    774           echo  
     774          echo 
    775775          '</form>'; 
    776776 
     
    15921592               if (!empty($buttons)) { 
    15931593                    if (in_array('checkbox', $cols)) { 
    1594                          echo  
     1594                         echo 
    15951595                         '<p class="checkboxes-helpers"></p>'; 
    15961596                    } 
  • inc/admin/lib.pager.php

    r2386 r2566  
    1616     protected $form_action; 
    1717     protected $form_hidden; 
    18       
     18 
    1919     protected function getLink($li_class,$href,$img_src,$img_src_nolink,$img_alt,$enable_link) { 
    2020          if ($enable_link) { 
     
    6060          $this->form_action = $url['path']; 
    6161     } 
    62       
     62 
    6363     /** 
    6464     * Pager Links 
     
    103103               ($this->env < $this->nb_pages) 
    104104          ); 
    105           $htmlCurrent =  
     105          $htmlCurrent = 
    106106               '<li class="active"><strong>'. 
    107107               sprintf(__('Page %s / %s'),$this->env,$this->nb_pages). 
    108108               '</strong></li>'; 
    109                 
    110           $htmlDirect =  
     109 
     110          $htmlDirect = 
    111111               ($this->nb_pages > 1 ? 
    112112                    sprintf('<li class="direct-access">'.__('Direct access page %s'), 
     
    114114                    '<input type="submit" value="'.__('ok').'" class="reset" '. 
    115115                    'name="ok" />'.$this->form_hidden.'</li>' : ''); 
    116            
    117           $res =     
     116 
     117          $res = 
    118118               '<form action="'.$this->form_action.'" method="get">'. 
    119119               '<div class="pager"><ul>'. 
     
    128128               '</form>' 
    129129          ; 
    130            
     130 
    131131          return $this->nb_elements > 0 ? $res : ''; 
    132132     } 
     
    138138     protected $rs; 
    139139     protected $rs_count; 
    140       
     140 
    141141     public function __construct($core,$rs,$rs_count) 
    142142     { 
     
    173173               '<div class="table-outer">'. 
    174174               '<table>'; 
    175                 
     175 
    176176               if( $filter ) { 
    177177                    $html_block .= '<caption>'.sprintf(__('List of %s entries match the filter.'), $this->rs_count).'</caption>'; 
     
    179179                    $html_block .= '<caption class="hidden">'.__('Entries list').'</caption>'; 
    180180               } 
    181                           
     181 
    182182               $html_block .= '<tr>'. 
    183183               '<th colspan="2" class="first">'.__('Title').'</th>'. 
     
    189189               '<th scope="col">'.__('Status').'</th>'. 
    190190               '</tr>%s</table></div>'; 
    191                 
     191 
    192192               if ($enclose_block) { 
    193193                    $html_block = sprintf($enclose_block,$html_block); 
    194194               } 
    195                 
    196                echo $pager->getLinks(); 
    197                 
     195 
     196               echo $pager->getLinks(); 
     197 
    198198               $blocks = explode('%s',$html_block); 
    199                 
     199 
    200200               echo $blocks[0]; 
    201                 
     201 
    202202               while ($this->rs->fetch()) 
    203203               { 
    204204                    echo $this->postLine(isset($entries[$this->rs->post_id])); 
    205205               } 
    206                 
     206 
    207207               echo $blocks[1]; 
    208                 
    209                echo $pager->getLinks(); 
    210           } 
    211      } 
    212       
     208 
     209               echo $pager->getLinks(); 
     210          } 
     211     } 
     212 
    213213     private function postLine($checked) 
    214214     { 
     
    218218               $cat_link = '%2$s'; 
    219219          } 
    220            
     220 
    221221          if ($this->rs->cat_title) { 
    222222               $cat_title = sprintf($cat_link,$this->rs->cat_id, 
     
    225225               $cat_title = __('(No cat)'); 
    226226          } 
    227            
     227 
    228228          $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 
    229229          switch ($this->rs->post_status) { 
     
    241241                    break; 
    242242          } 
    243            
     243 
    244244          $protected = ''; 
    245245          if ($this->rs->post_password) { 
    246246               $protected = sprintf($img,__('Protected'),'locker.png'); 
    247247          } 
    248            
     248 
    249249          $selected = ''; 
    250250          if ($this->rs->post_selected) { 
    251251               $selected = sprintf($img,__('Selected'),'selected.png'); 
    252252          } 
    253            
     253 
    254254          $attach = ''; 
    255255          $nb_media = $this->rs->countMedia(); 
     
    258258               $attach = sprintf($img,sprintf($attach_str,$nb_media),'attach.png'); 
    259259          } 
    260            
     260 
    261261          $res = '<tr class="line'.($this->rs->post_status != 1 ? ' offline' : '').'"'. 
    262262          ' id="p'.$this->rs->post_id.'">'; 
    263            
     263 
    264264          $res .= 
    265265          '<td class="nowrap">'. 
     
    274274          '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'. 
    275275          '</tr>'; 
    276            
     276 
    277277          return $res; 
    278278     } 
     
    290290          { 
    291291               $pager = new dcPager($page,$this->rs_count,$nb_per_page,10); 
    292                 
     292 
    293293               $html_block = 
    294294               '<div class="table-outer clear">'. 
     
    299299               '<th scope="col">'.__('Status').'</th>'. 
    300300               '</tr>%s</table></div>'; 
    301                 
     301 
    302302               if ($enclose_block) { 
    303303                    $html_block = sprintf($enclose_block,$html_block); 
    304304               } 
    305                 
    306                echo $pager->getLinks(); 
    307                 
     305 
     306               echo $pager->getLinks(); 
     307 
    308308               $blocks = explode('%s',$html_block); 
    309                 
     309 
    310310               echo $blocks[0]; 
    311                 
     311 
    312312               while ($this->rs->fetch()) 
    313313               { 
    314314                    echo $this->postLine(); 
    315315               } 
    316                 
     316 
    317317               echo $blocks[1]; 
    318                 
    319                echo $pager->getLinks(); 
    320           } 
    321      } 
    322       
     318 
     319               echo $pager->getLinks(); 
     320          } 
     321     } 
     322 
    323323     private function postLine() 
    324324     { 
     
    338338                    break; 
    339339          } 
    340            
     340 
    341341          $protected = ''; 
    342342          if ($this->rs->post_password) { 
    343343               $protected = sprintf($img,__('Protected'),'locker.png'); 
    344344          } 
    345            
     345 
    346346          $selected = ''; 
    347347          if ($this->rs->post_selected) { 
    348348               $selected = sprintf($img,__('Selected'),'selected.png'); 
    349349          } 
    350            
     350 
    351351          $attach = ''; 
    352352          $nb_media = $this->rs->countMedia(); 
     
    355355               $attach = sprintf($img,sprintf($attach_str,$nb_media),'attach.png'); 
    356356          } 
    357            
     357 
    358358          $res = '<tr class="line'.($this->rs->post_status != 1 ? ' offline' : '').'"'. 
    359359          ' id="p'.$this->rs->post_id.'">'; 
    360            
     360 
    361361          $res .= 
    362362          '<td scope="row" class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'" '. 
     
    367367          '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'. 
    368368          '</tr>'; 
    369            
     369 
    370370          return $res; 
    371371     } 
     
    387387          { 
    388388               $pager = new dcPager($page,$this->rs_count,$nb_per_page,10); 
    389                 
     389 
    390390               $comments = array(); 
    391391               if (isset($_REQUEST['comments'])) { 
     
    393393                         $comments[(integer)$v]=true; 
    394394                    } 
    395                }               
     395               } 
    396396               $html_block = 
    397397               '<div class="table-outer">'. 
    398398               '<table>'; 
    399                 
     399 
    400400               if( $filter ) { 
    401401                    $html_block .= '<caption>'. 
     
    408408                    $html_block .= '<caption class="hidden">'.__('Comments and trackbacks list').'</caption>'; 
    409409               } 
    410                           
     410 
    411411               $html_block .= '<tr>'. 
    412412               '<th colspan="2" scope="col" abbr="comm" class="first">'.__('Type').'</th>'. 
     
    420420                    $html_block = sprintf($enclose_block,$html_block); 
    421421               } 
    422                 
    423                echo $pager->getLinks(); 
    424                 
     422 
     423               echo $pager->getLinks(); 
     424 
    425425               $blocks = explode('%s',$html_block); 
    426                 
     426 
    427427               echo $blocks[0]; 
    428                 
     428 
    429429               while ($this->rs->fetch()) 
    430430               { 
    431431                    echo $this->commentLine(isset($comments[$this->rs->comment_id])); 
    432432               } 
    433                 
     433 
    434434               echo $blocks[1]; 
    435                 
    436                echo $pager->getLinks(); 
    437           } 
    438      } 
    439       
     435 
     436               echo $pager->getLinks(); 
     437          } 
     438     } 
     439 
    440440     private function commentLine($checked=false) 
    441441     { 
    442442          global $author, $status, $sortby, $order, $nb_per_page; 
    443            
     443 
    444444          $author_url = 
    445445          'comments.php?n='.$nb_per_page. 
     
    448448          '&amp;order='.$order. 
    449449          '&amp;author='.rawurlencode($this->rs->comment_author); 
    450            
     450 
    451451          $post_url = $this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id); 
    452            
     452 
    453453          $comment_url = 'comment.php?id='.$this->rs->comment_id; 
    454            
     454 
    455455          $comment_dt = 
    456456          dt::dt2str($this->core->blog->settings->system->date_format.' - '. 
    457457          $this->core->blog->settings->system->time_format,$this->rs->comment_dt); 
    458            
     458 
    459459          $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 
    460460          switch ($this->rs->comment_status) { 
     
    472472                    break; 
    473473          } 
    474            
     474 
    475475          $post_title = html::escapeHTML($this->rs->post_title); 
    476476          if (mb_strlen($post_title) > 70) { 
     
    480480               $this->rs->comment_trackback ? __('trackback') : __('comment'), 
    481481               html::escapeHTML($this->rs->comment_author)); 
    482            
     482 
    483483          $res = '<tr class="line'.($this->rs->comment_status != 1 ? ' offline' : '').'"'. 
    484484          ' id="c'.$this->rs->comment_id.'">'; 
    485            
     485 
    486486          $res .= 
    487487          '<td class="nowrap">'. 
     
    497497          html::escapeHTML($post_title).'</a>'. 
    498498          ($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').'</td>'; 
    499            
     499 
    500500          $res .= '</tr>'; 
    501            
     501 
    502502          return $res; 
    503503     } 
     
    519519          { 
    520520               $pager = new dcPager($page,$this->rs_count,$nb_per_page,10); 
    521                 
     521 
    522522               $html_block = 
    523523               '<div class="table-outer clear">'. 
    524524               '<table>'; 
    525                 
     525 
    526526               if( $filter ) { 
    527527                    $html_block .= '<caption>'.sprintf(__('List of %s users match the filter.'), $this->rs_count).'</caption>'; 
     
    529529                    $html_block .= '<caption class="hidden">'.__('Users list').'</caption>'; 
    530530               } 
    531                           
     531 
    532532               $html_block .= '<tr>'. 
    533533               '<th colspan="2" scope="col" class="first">'.__('Username').'</th>'. 
     
    537537               '<th scope="col" class="nowrap">'.__('Entries (all types)').'</th>'. 
    538538               '</tr>%s</table></div>'; 
    539                 
     539 
    540540               if ($enclose_block) { 
    541541                    $html_block = sprintf($enclose_block,$html_block); 
    542542               } 
    543                 
    544                echo $pager->getLinks(); 
    545                 
     543 
     544               echo $pager->getLinks(); 
     545 
    546546               $blocks = explode('%s',$html_block); 
    547                 
     547 
    548548               echo $blocks[0]; 
    549                 
     549 
    550550               while ($this->rs->fetch()) 
    551551               { 
    552552                    echo $this->userLine(); 
    553553               } 
    554                 
     554 
    555555               echo $blocks[1]; 
    556                 
    557                echo $pager->getLinks(); 
    558           } 
    559      } 
    560       
     556 
     557               echo $pager->getLinks(); 
     558          } 
     559     } 
     560 
    561561     private function userLine() 
    562562     { 
    563563          $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 
    564564          $img_status = ''; 
    565            
     565 
    566566          $p = $this->core->getUserPermissions($this->rs->user_id); 
    567            
     567 
    568568          if (isset($p[$this->core->blog->id]['p']['admin'])) { 
    569569               $img_status = sprintf($img,__('admin'),'admin.png'); 
  • inc/admin/prepend.php

    r2277 r2566  
    2424function dc_load_locales() { 
    2525     global $_lang, $core; 
    26       
     26 
    2727     $_lang = $core->auth->getInfo('user_lang'); 
    2828     $_lang = preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$_lang) ? $_lang : 'en'; 
    29       
     29 
    3030     l10n::lang($_lang); 
    3131     if (l10n::set(dirname(__FILE__).'/../../locales/'.$_lang.'/date') === false && $_lang != 'en') { 
     
    4040{ 
    4141     global $core; 
    42       
     42 
    4343     $core->auth->user_prefs->addWorkspace('interface'); 
    4444     $user_ui_iconset = @$core->auth->user_prefs->interface->iconset; 
    4545     if (($user_ui_iconset) && ($img)) { 
    4646          $icon = false; 
    47           if ((preg_match('/^images\/menu\/(.+)$/',$img,$m)) ||  
     47          if ((preg_match('/^images\/menu\/(.+)$/',$img,$m)) || 
    4848               (preg_match('/^index\.php\?pf=(.+)$/',$img,$m))) { 
    4949               if ($m[1]) { 
     
    6565     # We have session information in constants 
    6666     $_COOKIE[DC_SESSION_NAME] = DC_AUTH_SESS_ID; 
    67       
     67 
    6868     if (!$core->auth->checkSession(DC_AUTH_SESS_UID)) { 
    6969          throw new Exception('Invalid session data.'); 
    7070     } 
    71       
     71 
    7272     # Check nonce from POST requests 
    7373     if (!empty($_POST)) 
     
    7777          } 
    7878     } 
    79       
     79 
    8080     if (empty($_SESSION['sess_blog_id'])) { 
    8181          throw new Exception('Permission denied.'); 
    8282     } 
    83       
     83 
    8484     # Loading locales 
    8585     dc_load_locales(); 
    86       
     86 
    8787     $core->setBlog($_SESSION['sess_blog_id']); 
    8888     if (!$core->blog->id) { 
     
    100100               $p[3] = '/'; 
    101101               call_user_func_array('setcookie',$p); 
    102                 
     102 
    103103               http::redirect('auth.php'); 
    104104          } 
     
    108108               ,20); 
    109109     } 
    110       
     110 
    111111     # Check nonce from POST requests 
    112112     if (!empty($_POST)) 
     
    119119          } 
    120120     } 
    121       
    122       
     121 
     122 
    123123     if (!empty($_REQUEST['switchblog']) 
    124124     && $core->auth->getPermissions($_REQUEST['switchblog']) !== false) 
     
    131131               unset($_SESSION['media_manager_page']); 
    132132          } 
    133            
     133 
    134134          # Removing switchblog from URL 
    135135          $redir = $_SERVER['REQUEST_URI']; 
     
    139139          exit; 
    140140     } 
    141       
     141 
    142142     # Check blog to use and log out if no result 
    143143     if (isset($_SESSION['sess_blog_id'])) 
     
    154154          } 
    155155     } 
    156       
     156 
    157157     # Loading locales 
    158158     dc_load_locales(); 
    159       
     159 
    160160     if (isset($_SESSION['sess_blog_id'])) { 
    161161          $core->setBlog($_SESSION['sess_blog_id']); 
     
    165165     } 
    166166 
    167 /*    
     167/* 
    168168     # Check add to my fav fired 
    169169     if (!empty($_REQUEST['add-favorite'])) { 
     
    184184     } 
    185185     unset($f); 
    186       
     186 
    187187     if (($hfiles = @scandir($locales_root.$_lang.'/help')) !== false) 
    188188     { 
     
    205205     # [] : Title, URL, small icon, large icon, permissions, id, class 
    206206     # NB : '*' in permissions means any, null means super admin only 
    207       
    208       
     207 
     208 
    209209     # Menus creation 
    210210     $_menu = new ArrayObject(); 
     
    219219     $core->plugins->loadModules(DC_PLUGINS_ROOT,'admin',$_lang); 
    220220     $core->favs->setup(); 
    221       
     221 
    222222     if (!$user_ui_nofavmenu) { 
    223223          $core->favs->appendMenu($_menu); 
    224224     } 
    225225 
    226       
     226 
    227227     # Set menu titles 
    228       
     228 
    229229     $_menu['System']->title = __('System settings'); 
    230230     $_menu['Blog']->title = __('Blog'); 
     
    256256          preg_match('/post.php$/',$_SERVER['REQUEST_URI']), 
    257257          $core->auth->check('usage,contentadmin',$core->blog->id)); 
    258       
     258 
    259259     $_menu['System']->prependItem(__('Update'),'update.php','images/menu/update.png', 
    260260          preg_match('/update.php(\?.*)?$/',$_SERVER['REQUEST_URI']), 
     
    273273          $core->auth->isSuperAdmin() || 
    274274          $core->auth->check('usage,contentadmin',$core->blog->id) && $core->auth->getBlogCount() > 1); 
    275       
     275 
    276276     if (empty($core->blog->settings->system->jquery_migrate_mute)) { 
    277277          $core->blog->settings->system->put('jquery_migrate_mute', true, 'boolean', 'Mute warnings for jquery migrate plugin ?', false); 
    278278     } 
    279279} 
    280 ?> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map