Changeset 8528 for extensions/gally/gally-default/admin/Conf.class.inc.php
- Timestamp:
- Jan 8, 2011, 5:34:17 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/gally/gally-default/admin/Conf.class.inc.php
r6109 r8528 117 117 } 118 118 119 public function confExists($key) 120 { 121 return(array_key_exists($key, $this->values)); 122 } 123 119 124 public function getConfValue($key) 120 125 { … … 144 149 145 150 151 /** 152 * function used to initialize config file 153 * 154 */ 155 static public function init($theme) 156 { 157 $forcedToDefault=array( 158 "imageCenterMode" => '', 159 "imageCenterOffset" => '', 160 "imageCenterTopMin" => '', 161 "imageCenterTopBorder" => '', 162 "interfaceAnimated" => '', 163 "commentAnimated" => '', 164 "animateDelay" => '', 165 "marginContainer" => '', 166 "paddingContainer" => '', 167 "tabsAnimated" => '', 168 "tabsHidden" => '', 169 "tabsVisible" => '', 170 "tabsPosition" => '', 171 "commentRows" => '', 172 "menuAnimated" => '', 173 "menuWidth" => '', 174 "menuMaxWidth" => '', 175 "menuMSIEMaxWidth" => '', 176 "imageSimulateHighRes" => '', 177 "imageScrollMinDeadArea" => '' 178 //"expandMenu" => '', 179 ); 180 $gallyDefault = new Conf(); 181 $gallyDefault->setFileName(PHPWG_ROOT_PATH."themes/gally-default/conf/default.conf"); 182 $gallyDefault->read(); 183 184 $configDefault = new Conf(); 185 $configDefault->setFileName(PHPWG_ROOT_PATH."themes/$theme/conf/default.conf"); 186 $configDefault->read(); 187 188 $configLocal = new Conf(); 189 $configLocal->setFileName(PHPWG_ROOT_PATH."local/themes/$theme/conf/local.conf"); 190 $configLocal->read(); 191 192 foreach($forcedToDefault as $key => $param) 193 { 194 if($gallyDefault->confExists($key)) $forcedToDefault[$key]=$gallyDefault->getConfValue($key); 195 if($configDefault->confExists($key)) $forcedToDefault[$key]=$configDefault->getConfValue($key); 196 } 197 $configLocal->setConf($forcedToDefault, false); 198 $configLocal->write(); 199 } 200 146 201 } 147 202
Note: See TracChangeset
for help on using the changeset viewer.