Dotclear

Changeset 152:cab8de13f64e for admin


Ignore:
Timestamp:
05/04/11 23:55:34 (14 years ago)
Author:
xave <xave@…>
Branch:
userprefs
Parents:
151:f677be1de397 (diff), 150:9302f6bed60c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/index.php

    r112 r152  
    4444 
    4545# Check dashboard module prefs 
    46 $core->auth->user_prefs->loadPrefs(); 
    47       
    48      // Set favorites menu 
    49      $ws = $core->auth->user_prefs->addWorkspace('favorites'); 
    50      $count = 0; 
    51      foreach ($ws->dumpPrefs() as $k => $v) { 
    52           // User favorites only 
    53           if (!$v['global']) { 
    54                $count++; 
    55                $fav = unserialize($v['value']); 
    56                $_menu['Favorites']->addItem($fav['title'],$fav['url'],$fav['small-icon'], 
    57                     preg_match('/'.$fav['url'].'(\?.*)?$/',$_SERVER['REQUEST_URI']), 
    58                     (($fav['permissions'] == '*') || $core->auth->check($fav['permissions'],$core->blog->id)),$fav['id'],$fav['class']); 
    59           } 
    60      }     
    61      if (!$count) { 
    62           // Global favorites if any 
    63           foreach ($ws->dumpPrefs() as $k => $v) { 
    64                $count++; 
    65                $fav = unserialize($v['value']); 
    66                $_menu['Favorites']->addItem($fav['title'],$fav['url'],$fav['small-icon'], 
    67                     preg_match('/'.$fav['url'].'(\?.*)?$/',$_SERVER['REQUEST_URI']), 
    68                     (($fav['permissions'] == '*') || $core->auth->check($fav['permissions'],$core->blog->id)),$fav['id'],$fav['class']); 
    69           } 
    70      } 
    71      if (!$count) { 
    72           // No user or global favorites, add "new entry" fav 
    73           $_menu['Favorites']->addItem(__('New entry'),'post.php','images/menu/edit.png', 
    74                preg_match('/post.php$/',$_SERVER['REQUEST_URI']), 
    75                $core->auth->check('usage,contentadmin',$core->blog->id),'menu-new-post',null); 
    76      } 
    77 $core->auth->user_prefs->addWorkspace('dashboard'); 
    7846if (!$core->auth->user_prefs->dashboard->prefExists('doclinks')) { 
    7947     if (!$core->auth->user_prefs->dashboard->prefExists('doclinks',true)) { 
     
    11684                    ($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title'])); 
    11785               $__dashboard_icons[$fav['name']] = new ArrayObject(array($title,$fav['url'],$fav['large-icon'])); 
     86 
     87               # Let plugins set their own title for favorite on dashboard 
     88               $core->callBehavior('adminDashboardFavsIcon',$core,$fav['name'],$__dashboard_icons[$fav['name']]); 
    11889          } 
    11990     } 
     
    12899                    ($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title'])); 
    129100               $__dashboard_icons[$fav['name']] = new ArrayObject(array($title,$fav['url'],$fav['large-icon'])); 
     101 
     102               # Let plugins set their own title for favorite on dashboard 
     103               $core->callBehavior('adminDashboardFavsIcon',$core,$fav['name'],$__dashboard_icons[$fav['name']]); 
    130104          } 
    131105     } 
     
    298272 
    299273# Dashboard icons 
     274<<<<<<< local 
     275echo '<div id="dashboard-main"'.($dashboardItems ? '' : ' class="fullwidth"').'><div id="icons">'; 
     276======= 
    300277echo '<div id="dashboard-main"><div id="icons"'.($dashboardItems ? '' : 'class="fullwidth"').'>'; 
     278>>>>>>> other 
    301279foreach ($__dashboard_icons as $i) 
    302280{ 
  • admin/index.php

    r142 r152  
    272272 
    273273# Dashboard icons 
     274<<<<<<< local 
    274275echo '<div id="dashboard-main"'.($dashboardItems ? '' : ' class="fullwidth"').'><div id="icons">'; 
     276======= 
     277echo '<div id="dashboard-main"><div id="icons"'.($dashboardItems ? '' : 'class="fullwidth"').'>'; 
     278>>>>>>> other 
    275279foreach ($__dashboard_icons as $i) 
    276280{ 
Note: See TracChangeset for help on using the changeset viewer.

Sites map