Changeset 1660 in ExiteCMS for trunk/setup.php


Ignore:
Timestamp:
08/21/08 16:07:21 (4 years ago)
Author:
hverton
Message:

updated the members list with better filters, and a sort option on username, email, last visit date and country.
Rewritten the setup procedure to make it more fail-safe
Fixed getmxxrr() function, to return the lowest MX record first
Added the compiled locale files for Dutch (setup/global)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/setup.php

    r1502 r1660  
    1818+----------------------------------------------------*/ 
    1919function dbconnect($db_host, $db_user, $db_pass, $db_name) { 
     20    global $locale; 
     21 
    2022    $db_connect = @mysql_connect($db_host, $db_user, $db_pass); 
    2123    $db_select = @mysql_select_db($db_name); 
    2224    if (!$db_connect) { 
    23         die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to establish connection to MySQL</b><br />".mysql_errno()." : ".mysql_error()."</div>"); 
     25        terminate($locale['401'], mysql_errno()." : ".mysql_error()); 
    2426    } elseif (!$db_select) { 
    25         die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to select MySQL database</b><br />".mysql_errno()." : ".mysql_error()."</div>"); 
     27        terminate($locale['402'], mysql_errno()." : ".mysql_error()); 
    2628    } 
    2729} 
    2830 
    2931function dbquery($query) { 
     32 
    3033    $result = @mysql_query($query); 
    3134    if (!$result) { 
    32         echo mysql_error(); 
    3335        return false; 
    3436    } else { 
     
    3840 
    3941function dbarray($resource) { 
     42 
    4043    $result = @mysql_fetch_assoc($resource); 
    4144    if (!$result) { 
     
    7275+----------------------------------------------------*/ 
    7376function stripinput($text) { 
     77 
    7478    if (ini_get('magic_quotes_gpc')) $text = stripslashes($text); 
    7579    $search = array("\"", "'", "\\", '\"', "\'", "<", ">", "&nbsp;"); 
     
    8387+----------------------------------------------------*/ 
    8488function makefilelist($folder, $filter, $sort=true, $type="files") { 
     89 
    8590    $res = array(); 
    8691    $filter = explode("|", $filter);  
     
    104109+----------------------------------------------------*/ 
    105110function locale_load($locale_name) { 
    106  
    107111    global $settings, $locale, $db_prefix; 
    108112 
    109113    $locales_file = PATH_ROOT."files/locales/".(defined('LP_LOCALE')?LP_LOCALE:"en").".".$locale_name.".php"; 
    110114    if (file_exists($locales_file)) { 
    111         require $locales_file; 
     115        require_once $locales_file; 
    112116    } 
    113117    return; 
     118} 
     119 
     120/*---------------------------------------------------+ 
     121| load a locale file 
     122+----------------------------------------------------*/ 
     123function terminate($error, $tip="", $wiki=0) { 
     124    global $locale; 
     125 
     126    $msg = "<div style='font-family:Verdana;font-size:14px;text-align:center;'><b>".(empty($locale['403'])?"Unable to run the ExiteCMS setup":$locale['403']).":<br /><br /><font style='color:red;'>"; 
     127    $msg .= $error."</font></b><br /><br />"; 
     128    $msg .= $error."</font></b><br /><br />"; 
     129    if ($wiki) { 
     130        if (empty($locale['404')) { 
     131            $msg .= "Please consult our <a href='http://exitecms.exite.eu/modules/wiki/index.php?wakka=Setup'>Wiki</a> "; 
     132        } else { 
     133            $msg = sprintf($locale['404'], "http://exitecms.exite.eu/modules/wiki/index.php?wakka=Setup"); 
     134        } 
     135    } 
     136    $msg .= $tip."</div>"; 
     137    die($msg); 
    114138} 
    115139 
     
    124148define("PATH_THEMES", PATH_ROOT."themes/"); 
    125149define("PATH_THEME", PATH_ROOT."themes/ExiteCMS/"); 
    126 define("PATH_PHOTOS", PATH_ROOT."images/photoalbum/"); 
    127150define("PATH_IMAGES", PATH_ROOT."images/"); 
    128151define("PATH_IMAGES_A", PATH_IMAGES."articles/"); 
     
    141164define('CMS_SETUP', true); 
    142165 
    143 // error tracking 
     166// temp storage for template variables 
     167$variables = array(); 
     168 
     169// used for error tracking 
    144170$error = ""; 
    145171 
    146 // verify the locale 
     172// verify the selected locale 
    147173$localeset = isset($_GET['localeset']) ? $_GET['localeset'] : ""; 
    148174if (!file_exists(PATH_ADMIN."tools/language_pack_".$localeset.".php")) { 
     
    151177    if (!file_exists(PATH_ADMIN."tools/language_pack_".$localeset.".php")) { 
    152178        // not found either? bail out! 
    153         die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to run the ExiteCMS setup: No suitable language pack found.</b><br />Please consult the documentation on how to install a language pack.</div>"); 
    154     } 
    155 } 
     179        terminate("No suitable language pack found.", "Please consult the documentation on how to install a language pack."); 
     180    } 
     181} 
     182 
    156183// load the language pack file, to get some initial info about the language 
    157184require PATH_ADMIN."tools/language_pack_".$localeset.".php"; 
    158185 
     186// load the locale for this module 
     187locale_load("main.setup"); 
     188 
    159189// define some of the website settings for the template engine 
    160190$settings = array("locale" => LP_LOCALE, "theme" => "ExiteCMS"); 
    161  
    162 // temp storage for template variables 
    163 $variables = array(); 
    164  
    165191$variables['localeset'] = LP_LANGUAGE; 
    166 $variables['charset'] = "iso-8859-1"; 
     192$variables['charset'] = LP_CHARSET; 
    167193 
    168194// parameter validation 
     
    172198// check if the cache directories are writeable 
    173199if (!is_writable(PATH_FILES."cache")) { 
    174     die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to run the ExiteCMS setup: The cache directory is not writeable.</b><br />Please consult our <a href='http://exitecms.exite.eu'>Wiki</a> on how to define the proper file rights.</div>"); 
     200    terminate($locale['405'], $locale['406'], true); 
    175201} 
    176202if (!is_writable(PATH_FILES."tplcache")) { 
    177     die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to run the ExiteCMS setup: The template cache directory is not writeable.</b><br />Please consult our <a href='http://exitecms.exite.eu'>Wiki</a> on how to define the proper file rights.</div>"); 
    178 } 
    179 // get the location of the config file, check if the config file is writable 
     203    terminate($locale['407'], $locale['406'], true); 
     204} 
     205if (!is_writable(PATH_FILES."locales")) { 
     206    terminate($locale['416'], $locale['406'], true); 
     207} 
     208 
     209// get the FQFN of the config file 
    180210@include_once PATH_ROOT."configpath.php"; 
    181211if (substr(CONFIG_PATH,0,1) == "/") { 
    182     if(!is_writable(CONFIG_PATH."/config.php")) { 
    183         die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to run the ExiteCMS setup: The config file can not be written.</b><br />Please consult our <a href='http://exitecms.exite.eu'>Wiki</a> on how to define the proper file rights.</div>"); 
    184     } 
     212    define('CONFIG_FILE', str_replace("//", "/", CONFIG_PATH."/config.php")); 
    185213} else { 
    186     if(!is_writable(PATH_ROOT.CONFIG_PATH."/config.php")) { 
    187         die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to run the ExiteCMS setup: The config file can not be written.</b><br />Please consult our <a href='http://exitecms.exite.eu'>Wiki</a> on how to define the proper file rights.</div>"); 
    188     } 
    189 } 
    190  
    191 // first part in step1: create config.php. We need it later 
     214    define('CONFIG_FILE', str_replace("//", "/", PATH_ROOT.CONFIG_PATH."/config.php")); 
     215} 
     216 
     217// first part in step0: check the config file 
     218if ($step == "0") { 
     219    // file MUST NOT exist... 
     220    if (file_exists(CONFIG_FILE)) { 
     221        terminate($locale['408'], $locale['409'], true); 
     222    } 
     223    // ... and the directory MUST be writeable! 
     224    if(!is_writable(dirname(CONFIG_FILE))) { 
     225        terminate($locale['415'], $locale['406'], true); 
     226    } 
     227} 
     228 
     229// first part in step1: validate the input, and create the config file 
    192230if ($step == "1") { 
     231    // verify the user input: hostname 
    193232    $db_host = stripinput($_POST['db_host']); 
     233    $variables['db_host'] = $db_host; 
     234    if ($empty($db_host) || !preg_match("/^[-0-9\.A-Z_@]+$/i", $db_host)) { 
     235        $error .= $locale['417']."<br />\n"; 
     236    } 
     237    // verify the user input: username 
    194238    $db_user = stripinput($_POST['db_user']); 
     239    $variables['db_user'] = $db_user; 
     240    if ($empty($db_user) || !preg_match("/^[-0-9A-Z_@]+$/i", $db_user)) { 
     241            $error .= $locale['418']."<br />\n"; 
     242        } 
     243    } 
     244    // verify the user input: password 
    195245    $db_pass = stripinput($_POST['db_pass']); 
     246    $variables['db_pass'] = $db_pass; 
     247    if ($empty($db_pass) || !preg_match("/^[-0-9A-Z_@]+$/i", $db_pass)) { 
     248            $error .= $locale['419']."<br />\n"; 
     249        } 
     250    } 
     251    // verify the user input: database name 
    196252    $db_name = stripinput($_POST['db_name']); 
     253    $variables['db_name'] = $db_name; 
     254    if ($empty($db_name) || !preg_match("/^[-0-9A-Z_@]$/i", $db_name)) { 
     255            $error .= $locale['427']."<br />\n"; 
     256        } 
     257    } 
     258    // verify the user input: table prefix 
    197259    $db_prefix = stripinput($_POST['db_prefix']); 
    198     $config = "<?php 
     260    $variables['db_prefix'] = $db_prefix; 
     261    if (!preg_match("/^[-0-9A-Z_@]*$/i", $db_prefix)) { 
     262            $error .= $locale['428']."<br />\n"; 
     263        } 
     264    } 
     265    // verify a connection to the database server can be made 
     266    if (empty($error)) { 
     267        $db_connect = @mysql_connect($db_host, $db_user, $db_pass); 
     268        if (!$db_connect) { 
     269            $error .= $locale['429']."<br />\n"; 
     270        } 
     271    } 
     272    // verify if the database exists on the server 
     273    if (empty($error)) { 
     274        $db_select = @mysql_select_db($db_name); 
     275        if (!$db_select) { 
     276            $error .= sprintf($locale['434'],$db_name)."<br />\n"; 
     277        } 
     278    } 
     279    // verify if the given user has create table on the database 
     280    if (empty($error)) { 
     281        $result = dbquery("CREATE TABLE ".$db_prefix."_test (test TINYINT(1) NOT NULL) ENGINE = MYISAM"); 
     282        if (!$result) { 
     283            $error .= sprintf($locale['435'],$db_name)."<br />\n"; 
     284        } else { 
     285            $result = dbquery("DROP TABLE ".$db_prefix."_test"); 
     286        } 
     287    } 
     288    // if no errors were detected, create the config file 
     289    if ($error == "") { 
     290        $config = "<?php 
    199291// global database settings 
    200292"."$"."db_host="."\"".$_POST['db_host']."\""."; 
     
    211303"."$"."user_db_prefix="."\"".$_POST['db_prefix']."\""."; 
    212304?>"; 
    213     if (substr(CONFIG_PATH,0,1) == "/") { 
    214         $cfg_path = CONFIG_PATH; 
    215     } else { 
    216         $cfg_path = PATH_ROOT.CONFIG_PATH; 
    217     } 
    218     $temp = fopen($cfg_path."config.php","w"); 
    219     if (!fwrite($temp, $config)) { 
    220         $error .= $locale['430']."<br /><br />"; 
    221         fclose($temp); 
    222     } else { 
    223         fclose($temp); 
     305        $temp = fopen(CONFIG_FILE,"w"); 
     306        if (!fwrite($temp, $config)) { 
     307            $error .= $locale['430']."<br /><br />"; 
     308            fclose($temp); 
     309        } else { 
     310            fclose($temp); 
     311        } 
    224312    } 
    225313} 
    226314 
    227315require_once PATH_ROOT."includes/theme_functions.php"; 
    228  
    229 // load the locale for this module 
    230 locale_load("main.setup"); 
    231316 
    232317// process the different setup steps 
     
    251336        } else {  
    252337            $variables['write_check'] = false; 
    253             $error = "<b>".$locale['412']."</b><br /><br />".$permissions."<br /><b>".$locale['413']."</b>"; 
     338            $error = "<b>".$locale['412']."</b><br /><br /><span style='text-align:left'>".$permissions."</span><br /><b>".$locale['413']."</b>"; 
    254339        } 
    255340        break; 
    256341    case "1": 
    257342        if ($error == "") { 
    258             require_once "config.php"; 
     343            require_once CONFIG_FILE; 
    259344            $link = dbconnect($db_host, $db_user, $db_pass, $db_name); 
    260345            require_once PATH_INCLUDES."dbsetup_include.php"; 
     
    272357        break; 
    273358    case "2": 
    274         require_once "config.php"; 
     359        require_once CONFIG_FILE; 
    275360        $link = dbconnect($db_host, $db_user, $db_pass, $db_name); 
    276361        $basedir = substr($_SERVER['PHP_SELF'], 0, -9); 
     
    288373            $error .= $locale['453']."<br /><br />\n"; 
    289374        } 
     375        // double-hash the password to prevent hash table lookups 
    290376        $password = md5(md5($password1)); 
    291377 
     
    294380        if ($error == "") { 
    295381 
    296             // add records to the admin table 
    297             $commands = array(); 
    298             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('A',  'articles.gif', '".addslashes($locale['462'])."', 'articles.php', 1)"); 
    299             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('AC', 'article_cats.gif', '".addslashes($locale['461'])."', 'article_cats.php', 1)"); 
    300             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('AD', 'admins.gif', '".addslashes($locale['460'])."', 'administrators.php', 2)"); 
    301             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('B',  'blacklist.gif', '".addslashes($locale['463'])."', 'blacklist.php', 2)"); 
    302             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('BG',  'blogs.gif', '".addslashes($locale['473'])."', 'blogs.php', 1)"); 
    303             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('C',  '', '".addslashes($locale['464'])."', 'reserved', 2)"); 
    304             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('CP', 'c-pages.gif', '".addslashes($locale['465'])."', 'custom_pages.php', 1)"); 
    305             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('D',  'dl.gif', '".addslashes($locale['468'])."', 'downloads.php', 1)"); 
    306             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('DB', 'db_backup.gif', '".addslashes($locale['466'])."', 'db_backup.php', 3)"); 
    307             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('DC', 'dl_cats.gif', '".addslashes($locale['467'])."', 'download_cats.php', 1)"); 
    308             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('F',  'forums.gif', '".addslashes($locale['470'])."', 'forums.php', 1)"); 
    309             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('FQ', 'faq.gif', '".addslashes($locale['469'])."', 'faq.php', 1)"); 
    310             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('I',  'modules.gif', '".addslashes($locale['472'])."', 'modules.php', 3)"); 
    311             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('IM', 'images.gif', '".addslashes($locale['471'])."', 'images.php', 1)"); 
    312             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('IP', '', '".addslashes($locale['473'])."', 'reserved', 3)"); 
    313             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('M',  'members.gif', '".addslashes($locale['474'])."', 'members.php', 2)"); 
    314             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('N',  'news.gif', '".addslashes($locale['475'])."', 'news.php', 1)"); 
    315             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('NC', 'news_cats.gif', '".addslashes($locale['494'])."', 'news_cats.php', 1)"); 
    316             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('P',  'panels.gif', '".addslashes($locale['476'])."', 'panels.php', 3)"); 
    317             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('PI', 'phpinfo.gif', '".addslashes($locale['478'])."', 'phpinfo.php', 3)"); 
    318             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('PO', 'polls.gif', '".addslashes($locale['479'])."', 'forum_polls.php', 1)"); 
    319             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S1', 'settings.gif', '".addslashes($locale['487'])."', 'settings_main.php', 3)"); 
    320             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S2', 'settings_time.gif', '".addslashes($locale['488'])."', 'settings_time.php', 3)"); 
    321             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S3', 'settings_forum.gif', '".addslashes($locale['489'])."', 'settings_forum.php', 3)"); 
    322             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S4', 'registration.gif', '".addslashes($locale['490'])."', 'settings_registration.php', 3)"); 
    323             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S6', 'settings_misc.gif', '".addslashes($locale['492'])."', 'settings_misc.php', 3)"); 
    324             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S7', 'settings_pm.gif', '".addslashes($locale['493'])."', 'settings_messages.php', 3)"); 
    325             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S8', 'settings_lang.gif', '".addslashes($locale['459'])."', 'settings_languages.php', 3)"); 
    326             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('SL', 'site_links.gif', '".addslashes($locale['481'])."', 'site_links.php', 3)"); 
    327             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('T',  'tools.gif', '".addslashes($locale['495'])."', 'tools.php', 3)"); 
    328             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('U',  'upgrade.gif', '".addslashes($locale['483'])."', 'upgrade.php', 3)"); 
    329             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('UG', 'user_groups.gif', '".addslashes($locale['484'])."', 'user_groups.php', 2)"); 
    330             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('UR', 'submissions.gif', '".addslashes($locale['496'])."', 'redirects.php', 1)"); 
    331             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('R',  'reports.gif', '".addslashes($locale['477'])."', 'reports.php', 3)"); 
    332             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S',  'searches.gif', '".addslashes($locale['480'])."', 'searches.php', 3)"); 
    333             $result = dbcommands($commands, $db_prefix); 
    334  
    335             // create the admin rights field for the webmaster, based on all admin modules just inserted 
     382            // create the admin rights field for the webmaster, based on all admin modules available 
    336383            $result = dbquery("SELECT admin_rights FROM ".$db_prefix."admin"); 
    337384            $adminrights = ""; 
     
    398445            $result = dbcommands($commands, $db_prefix); 
    399446 
     447            // add the ExiteCMS core search options 
     448            $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##search (search_mod_id, search_mod_core, search_name, search_title, search_fulltext, search_version, search_active, search_visibility) VALUES(0, 1, 'articles', 'src510', 1, '1.0.0', 1, 0)"); 
     449            $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##search (search_mod_id, search_mod_core, search_name, search_title, search_fulltext, search_version, search_active, search_visibility) VALUES(0, 1, 'news', 'src511', 1, '1.0.0', 1, 0)"); 
     450            $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##search (search_mod_id, search_mod_core, search_name, search_title, search_fulltext, search_version, search_active, search_visibility) VALUES(0, 1, 'forumposts', 'src512', 1, '1.0.0', 1, 0)"); 
     451            $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##search (search_mod_id, search_mod_core, search_name, search_title, search_fulltext, search_version, search_active, search_visibility) VALUES(0, 1, 'forumattachments', 'src513', 1, '1.0.0', 1, 0)"); 
     452            $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##search (search_mod_id, search_mod_core, search_name, search_title, search_fulltext, search_version, search_active, search_visibility) VALUES(0, 1, 'downloads', 'src514', 1, '1.0.0', 1, 0)"); 
     453            $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##search (search_mod_id, search_mod_core, search_name, search_title, search_fulltext, search_version, search_active, search_visibility) VALUES(0, 1, 'members', 'src515', 0, '1.0.0', 1, 0)"); 
     454 
     455            // add the ExiteCMS core report options 
     456 
    400457            // add the default forum poll settings 
    401458            $commands = array(); 
Note: See TracChangeset for help on using the changeset viewer.