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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.

Sites map