Changeset 2566:9bf417837888 for inc/core/class.dc.prefs.php
- Timestamp:
- 11/17/13 20:25:53 (12 years ago)
- Branch:
- 2.6
- Children:
- 2567:6c11245cbf04, 2568:61c67a7d17fa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.prefs.php
r1179 r2566 25 25 protected $table; ///< <b>string</b> Prefs table name 26 26 protected $user_id; ///< <b>string</b> User ID 27 27 28 28 protected $workspaces = array(); ///< <b>array</b> Associative workspaces array 29 29 30 30 protected $ws; ///< <b>string</b> Current workspace 31 31 32 32 /** 33 33 Object constructor. Retrieves user prefs and puts them in $workspaces 34 34 array. Local (user) prefs have a highest priority than global prefs. 35 35 36 36 @param core <b>dcCore</b> dcCore object 37 37 @param user_id <b>string</b> User ID … … 48 48 } 49 49 } 50 50 51 51 /** 52 Retrieves all workspaces (and their prefs) from database, with one query. 52 Retrieves all workspaces (and their prefs) from database, with one query. 53 53 */ 54 54 private function loadPrefs() … … 65 65 throw $e; 66 66 } 67 67 68 68 /* Prevent empty tables (install phase, for instance) */ 69 69 if ($rs->isEmpty()) { 70 70 return; 71 71 } 72 72 73 73 do { 74 74 $ws = trim($rs->f('pref_ws')); … … 81 81 } while(!$rs->isStart()); 82 82 } 83 84 83 84 85 85 /** 86 86 Create a new workspace. If the workspace already exists, return it without modification. 87 87 88 88 @param ws <b>string</b> Workspace name 89 89 @return <b>dcWorkspace</b> The workspace created … … 96 96 return $this->workspaces[$ws]; 97 97 } 98 98 99 99 /** 100 100 Rename a workspace. … … 143 143 return true; 144 144 } 145 145 146 146 /** 147 147 Returns full workspace with all prefs pertaining to it. 148 148 149 149 @param ws <b>string</b> Workspace name 150 150 @return <b>dcWorkspace</b> … … 155 155 return $this->workspaces[$ws]; 156 156 } 157 157 158 158 return null; 159 159 } 160 160 161 161 /** 162 162 Magic __get method. … … 167 167 return $this->get($n); 168 168 } 169 169 170 170 /** 171 171 Returns $workspaces property content. 172 172 173 173 @return <b>array</b> 174 174 */ … … 177 177 return $this->workspaces; 178 178 } 179 179 180 180 } 181 ?>
Note: See TracChangeset
for help on using the changeset viewer.