Ignore:
Timestamp:
11/04/07 23:02:51 (5 years ago)
Author:
hverton
Message:

Modified the module installer to use the CMSconfig table for Wiki configuration
Updated the wikka.config to read the config from the CMSconfig table

File:
1 edited

Legend:

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

    r979 r1058  
    5252); 
    5353 
     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_%'"); 
     56while ($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']; 
     62    } 
     63} 
     64 
    5465// check if there is a stylesheet for the Wiki in the current theme 
    5566// if not, take the Wiki module default 
     
    5869} else { 
    5970    $wakkaConfig['stylesheet'] = 'css/wikka.css'; 
    60 } 
    61  
    62 // generate the admin users based on group membership 
    63 $result = dbquery("SELECT * FROM ".$db_prefix."user_groups WHERE group_name = 'Wiki Admins'"); 
    64 if ($data = dbarray($result)) { 
    65     $users = allusersingroup($data['group_id']); 
    66     $admins = ""; 
    67     foreach ($users as $user) { 
    68         $admins .= ($admins == "" ? "" : "\n") . $user['user_name']; 
    69     } 
    70     if ($admins != "") $wakkaConfig['admin_users'] = $admins; 
    7171} 
    7272 
Note: See TracChangeset for help on using the changeset viewer.