Changeset 1175 in ExiteCMS for modules/common/wiki/php-files/modules/wiki/wikka.config.php
- Timestamp:
- 12/16/07 22:55:37 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/common/wiki/php-files/modules/wiki/wikka.config.php
r1161 r1175 1 1 <?php 2 2 3 // default config 3 4 4 $wakkaConfig = array( 5 5 'mysql_host' => $db_host, … … 34 34 'external_link_new_window' => 1, 35 35 'sql_debugging' => '0', 36 'admin_users' => '',37 36 'admin_email' => $settings['siteemail'], 38 37 'upload_path' => IMAGES."wiki", … … 52 51 ); 53 52 54 // get wiki config variables from the CMSconfig table. They override the default config 55 $result = dbquery("SELECT * FROM ".$db_prefix."CMSconfig WHERE cfg_name LIKE 'wiki_%'"); 56 while ($data = dbarray($result)) { 57 // extract the wakkaConfig key from the cfg_name 58 $cfgkey = substr($data['cfg_name'],5); 59 // if the wakkaConfig key exists, overwrite the value 60 if (isset($wakkaConfig[$cfgkey])) { 61 $wakkaConfig[$cfgkey] = $data['cfg_value']; 53 // get wiki config variables from the CMSconfig settings. They override the default config 54 foreach($settings as $configkey => $configvalue) { 55 if (substr($configkey,0,5) == "wiki_") { 56 // extract the wakkaConfig key from the cfg_name 57 $cfgkey = substr($configkey,5); 58 // add the value to the wakkaconfig array 59 $wakkaConfig[$cfgkey] = $configvalue; 62 60 } 63 61 } … … 70 68 $wakkaConfig['stylesheet'] = 'css/wikka.css'; 71 69 } 72 // if the current user is an admin, add the username to the list of admins73 $wakkaConfig['admin_users'] = checkgroup($wakkaConfig['admin_group']) ? (iMEMBER ? $userdata['user_name'] : "*") : "";74 70 ?>
Note: See TracChangeset
for help on using the changeset viewer.
