Ignore:
Timestamp:
12/16/07 22:55:37 (4 years ago)
Author:
hverton
Message:

several small fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/common/wiki/php-files/modules/wiki/wikka.config.php

    r1161 r1175  
    11<?php 
     2 
    23// default config 
    3  
    44$wakkaConfig = array( 
    55    'mysql_host' => $db_host, 
     
    3434    'external_link_new_window' => 1, 
    3535    'sql_debugging' => '0', 
    36     'admin_users' => '', 
    3736    'admin_email' => $settings['siteemail'], 
    3837    'upload_path' => IMAGES."wiki", 
     
    5251); 
    5352 
    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 
     54foreach($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; 
    6260    } 
    6361} 
     
    7068    $wakkaConfig['stylesheet'] = 'css/wikka.css'; 
    7169} 
    72 // if the current user is an admin, add the username to the list of admins 
    73 $wakkaConfig['admin_users'] = checkgroup($wakkaConfig['admin_group']) ? (iMEMBER ? $userdata['user_name'] : "*") : ""; 
    7470?> 
Note: See TracChangeset for help on using the changeset viewer.