Changeset 1661 in ExiteCMS


Ignore:
Timestamp:
08/21/08 18:31:24 (3 years ago)
Author:
hverton
Message:

further setup updates
new dbsetup_include file
added an option to locale_load() to override the system locale

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/administration/tools/language_pack_English.php

    r1660 r1661  
    32253225        $localestrings['434'] = "The Database '%s' does not exist or the database user has no rights to access it."; 
    32263226        $localestrings['435'] = "Insufficient rights to create new tables in database '%s'."; 
     3227        $localestrings['436'] = "(optional)"; 
    32273228        $localestrings['440'] = "Super Admin login details"; 
    32283229        $localestrings['441'] = "Username:"; 
     
    34223423if (!defined('LP_CHARSET')) define('LP_CHARSET', "iso-8859-1"); 
    34233424if (!defined('LP_VERSION')) define('LP_VERSION', "7.10"); 
    3424 if (!defined('LP_DATE')) define('LP_DATE', "1219327583"); 
    3425 $lp_date = "1219327583"; 
     3425if (!defined('LP_DATE')) define('LP_DATE', "1219335044"); 
     3426$lp_date = "1219335044"; 
    34263427 
    34273428/*---------------------------------------------------+ 
  • trunk/administration/tools/language_pack_Nederlands.php

    r1660 r1661  
    32253225        $localestrings['434'] = "De database '%s' bestaat niet of uw gebruiker heeft onvoldoende rechten op deze database."; 
    32263226        $localestrings['435'] = "Uw database gebruiker heeft onvoldoende rechten op de database '%s' om tabellen aan te maken."; 
     3227        $localestrings['436'] = "(optioneel)"; 
    32273228        $localestrings['440'] = "Webmaster aanmeld gegevens"; 
    32283229        $localestrings['441'] = "Gebruikersnaam:"; 
     
    34223423if (!defined('LP_CHARSET')) define('LP_CHARSET', "iso-8859-1"); 
    34233424if (!defined('LP_VERSION')) define('LP_VERSION', "7.10"); 
    3424 if (!defined('LP_DATE')) define('LP_DATE', "1219327586"); 
    3425 $lp_date = "1219327586"; 
     3425if (!defined('LP_DATE')) define('LP_DATE', "1219335047"); 
     3426$lp_date = "1219335047"; 
    34263427 
    34273428/*---------------------------------------------------+ 
  • trunk/files/locales/en.main.global.php

    r1660 r1661  
    33// locale       : English 
    44// locale name  : main.global 
    5 // generated on : Thu Aug 21 2008, 16:06:37 CEST 
     5// generated on : Thu Aug 21 2008, 18:10:50 CEST 
    66// translators  : ExiteCMS team,WanWizard 
    77// ---------------------------------------------------------- 
  • trunk/files/locales/en.main.setup.php

    r1660 r1661  
    33// locale       : English 
    44// locale name  : main.setup 
    5 // generated on : Thu Aug 21 2008, 16:06:23 CEST 
     5// generated on : Thu Aug 21 2008, 18:10:44 CEST 
    66// translators  : ExiteCMS team,WanWizard 
    77// ---------------------------------------------------------- 
     
    4242$locale['434'] = "The Database '%s' does not exist or the database user has no rights to access it."; 
    4343$locale['435'] = "Insufficient rights to create new tables in database '%s'."; 
     44$locale['436'] = "(optional)"; 
    4445$locale['440'] = "Super Admin login details"; 
    4546$locale['441'] = "Username:"; 
  • trunk/files/locales/nl.main.global.php

    r1660 r1661  
    11<?php 
    22// ---------------------------------------------------------- 
    3 // locale       : Nederlands 
     3// locale       : English 
    44// locale name  : main.global 
    5 // generated on : Mon Aug 18 2008, 22:31:23 CEST 
     5// generated on : Thu Aug 21 2008, 18:10:47 CEST 
    66// translators  : ExiteCMS team,WanWizard 
    77// ---------------------------------------------------------- 
  • trunk/files/locales/nl.main.setup.php

    r1660 r1661  
    11<?php 
    22// ---------------------------------------------------------- 
    3 // locale       : Nederlands 
     3// locale       : English 
    44// locale name  : main.setup 
    5 // generated on : Tue Nov 20 2007, 14:54:31 CET 
     5// generated on : Thu Aug 21 2008, 18:10:47 CEST 
    66// translators  : ExiteCMS team,WanWizard 
    77// ---------------------------------------------------------- 
    88$locale['400'] = "Selecteer de standaard taal voor uw site"; 
    9 $locale['401'] = "Kan geen verbinding maken met de database.<br><br>\nControleer of de door u opgegeven parameters correct zijn."; 
    10 $locale['402'] = "Kan de database niet selecteren.<br><br>\nControleer of de door u opgegeven parameters correct zijn."; 
    11 $locale['410'] = "Welkom bij de ExiteCMS installatie"; 
     9$locale['401'] = "Kan geen verbinding maken met de database."; 
     10$locale['402'] = "Kan de database niet selecteren."; 
     11$locale['403'] = "Kan de ExiteCMS installatie niet uitvoeren"; 
     12$locale['404'] = "Raadpleeg a.u.b. de installatie instructies op onze <a href='%s'>support website</a>"; 
     13$locale['405'] = "Geen schrijfrechten op de cache folder."; 
     14$locale['406'] = "over how bestandsrechten te definieren."; 
     15$locale['407'] = "Geen schrijfrechten op de template cache folder"; 
     16$locale['408'] = "De installatie procedure is reeds uitgevoerd. U kunt dit niet nogmaals doen."; 
     17$locale['409'] = "over hoe u opnieuw kunt installeren."; 
     18$locale['410'] = "Welkom bij de ExiteCMS installatie procedure"; 
    1219$locale['411'] = "Controle op schrijfrechten succesvol"; 
    1320$locale['412'] = "De webserver heeft geen schrijfrechten op:"; 
    1421$locale['413'] = "Zorg er voor dat de webserver schrijfrechten heeft<br />op deze folders."; 
    1522$locale['414'] = "Vul a.u.b. dit formulier in, en klik daarna op 'Volgende Stap'."; 
     23$locale['415'] = "Geen rechten om het configuratie bestand aan te maken."; 
     24$locale['416'] = "Geen schrijfrechten op de locales cache folder"; 
     25$locale['417'] = "Database systeemnaam incorrect. Vul a.u.b. een correct systeemnaam, een IP adres, of 'localhost' in."; 
     26$locale['418'] = "Database gebruikersnaam incorrect. Vul a.u.b. een correct gebruikersnaam in."; 
     27$locale['419'] = "Database wachtwoord incorrect. Vul a.u.b. een corect wachtwoord in."; 
    1628$locale['420'] = "MySQL Database parameters"; 
    1729$locale['421'] = "Database systeemnaam:"; 
     
    2133$locale['425'] = "Tabel voorvoegsel:"; 
    2234$locale['426'] = "Volgende Stap >>"; 
     35$locale['427'] = "Database naam incorrect. Vul a.u.b. een correcte naam in."; 
     36$locale['428'] = "Tabel voorvoegsel incorrect. Vul a.u.b. een correct voorvoegsel in."; 
     37$locale['429'] = "Controleer de systeemnaam, gebruikersnaam en wachtwoord op juistheid."; 
    2338$locale['430'] = "Kan de configuratie niet wegschrijven<br \>\nControleer a.u.b. de schrijfpermissies en herstart daarna de installatie."; 
    24 $locale['431'] = "De installatie kon één of meerder database tabellen niet aanmaken:<br />%s<b /r><br />\nCorrigeer het probleem, en herstart de installatie.<br><br>\nIndien u het probleem niet zelf op kunt lossen, kunt u ondersteuning vragen op onze website<br>\n<a href='http://exitecms.exite.eu' target='blank'>http://exitecms.exite.eu</a>"; 
     39$locale['431'] = "De installatie kon één of meerdere database tabellen niet aanmaken:<br />%s<b /r><br />\nCorrigeer het probleem, en herstart de installatie.<br><br>\nIndien u het probleem niet zelf op kunt lossen, kunt u ondersteuning vragen op onze website<br>\n<a href='http://exitecms.exite.eu' target='blank'>http://exitecms.exite.eu</a>"; 
    2540$locale['432'] = "De configuratie is succesvol weggeschreven.<br><br>\n"; 
    2641$locale['433'] = "De database tabellen zijn aangemaakt.<br><br>\nVul a.u.b. het volgende formulier in, en klik daarna op 'Volgende Stap'."; 
     42$locale['434'] = "De database '%s' bestaat niet of uw gebruiker heeft onvoldoende rechten op deze database."; 
     43$locale['435'] = "Uw database gebruiker heeft onvoldoende rechten op de database '%s' om tabellen aan te maken."; 
     44$locale['436'] = "(optioneel)"; 
    2745$locale['440'] = "Webmaster aanmeld gegevens"; 
    2846$locale['441'] = "Gebruikersnaam:"; 
     
    4159$locale['463'] = "Blokkeren"; 
    4260$locale['464'] = "Commentaar"; 
    43 $locale['465'] = "Dynamische pagina's"; 
     61$locale['465'] = "Dynamische pagina\'s"; 
    4462$locale['466'] = "Database backup"; 
    4563$locale['467'] = "Download categorieen"; 
     
    4967$locale['471'] = "Plaatjes"; 
    5068$locale['472'] = "Modules & Plugins"; 
    51 $locale['473'] = "x"; 
     69$locale['473'] = "Blogs"; 
    5270$locale['474'] = "Leden"; 
    5371$locale['475'] = "Nieuws"; 
    5472$locale['476'] = "Panelen"; 
    55 $locale['477'] = "x"; 
     73$locale['477'] = "Rapporten"; 
    5674$locale['478'] = "PHP informatie"; 
    5775$locale['479'] = "Polls"; 
    58 $locale['480'] = "x"; 
     76$locale['480'] = "Zoekacties"; 
    5977$locale['481'] = "Menu systeem"; 
    6078$locale['482'] = "x"; 
     
    82100$locale['507'] = "Zoeken"; 
    83101$locale['508'] = "Registreren"; 
     102$locale['509'] = "Rapportages"; 
    84103$locale['520'] = "Hoofdmenu"; 
    85104$locale['521'] = "Online gebruikers"; 
     
    105124$locale['552'] = "Beveiliging"; 
    106125$locale['553'] = "Software"; 
    107 $locale['554'] = "Thema's"; 
     126$locale['554'] = "Thema\'s"; 
    108127$locale['555'] = "Windows"; 
    109128$locale['560'] = "Sorry, maar het door u gevraagde document kan niet op de server gevonden worden."; 
     
    112131$locale['563'] = "De beste kans om te vinden wat je zoek is te starten op onze home pagina, (<a href=\"/\">klik hier om daar na toe te gaan</a>), de opties in het menu te bekijken, of gebruik te maken van de zoek optie in het menu."; 
    113132$locale['564'] = "Als dat geen resultaat mocht opleveren, en u weet zeker dat het document dat u zoekt op deze website te vinden moet zijn, stuur dat een website beheerder een privé bericht (alleen voor geregistreerde gebruikers)."; 
    114 $locale['580'] = "De installatie is klaar, ExiteCMS is nu klaar voor gebruik.<br>\n<a href='index.php'>Klik hier</a> om naar uw ExiteCMS powered website te gaan.<br>\n<b>Opmerking:</b> voor uw veiligheid kunt u het best nu het bestand setup.php van uw server verwijderen<br>\en de rechten op het bestand config op alleen lezen zetten (chmod 644).<br><br>\nWij danken u voor uw keuze voor ExiteCMS."; 
     133$locale['580'] = "De installatie is klaar, ExiteCMS is nu klaar voor gebruik.<br>\n<a href='index.php'>Klik hier</a> om naar uw ExiteCMS powered website te gaan.<br>\n<b>Opmerking:</b> voor uw veiligheid kunt u het best nu het bestand setup.php van uw server verwijderen<br>\nen de rechten op het bestand config op alleen lezen zetten (chmod 644).<br><br>\nWij danken u voor uw keuze voor ExiteCMS."; 
    115134$locale['title'] = "ExiteCMS Setup"; 
    116135?> 
  • trunk/includes/db_functions.php

    r1578 r1661  
    3333 
    3434    $isUserQuery = false; 
    35          
    36     // tables with user information 
    37     $usertables = array("users", "new_users", "user_groups", "bad_login", "online", "blacklist"); 
     35 
     36    // only do this if there's a prefix defined 
     37    if (!empty($db_prefix)) {        
     38        // tables with user information 
     39        $usertables = array("users", "new_users", "user_groups", "bad_login", "online", "blacklist"); 
    3840     
    39     // check if this is a query on a user table 
    40     foreach($usertables as $usertable) { 
    41         if(strpos($query, " ".$db_prefix.$usertable)) { 
    42             $isUserQuery = true; 
    43             $query = str_replace(" ".$db_prefix.$usertable, " ".$user_db_name.".".$user_db_prefix.$usertable, $query); 
    44             $query = str_replace("=".$db_prefix.$usertable, "=".$user_db_name.".".$user_db_prefix.$usertable, $query); 
     41        // check if this is a query on a user table 
     42        foreach($usertables as $usertable) { 
     43            if(strpos($query, " ".$db_prefix.$usertable)) { 
     44                $isUserQuery = true; 
     45                $query = str_replace(" ".$db_prefix.$usertable, " ".$user_db_name.".".$user_db_prefix.$usertable, $query); 
     46                $query = str_replace("=".$db_prefix.$usertable, "=".$user_db_name.".".$user_db_prefix.$usertable, $query); 
     47            } 
    4548        } 
    46     } 
    47     // prefix all other tables with the database name as well 
    48     $query = str_replace(" ".$db_prefix, " ".$db_name.".".$db_prefix, $query); 
    49      
     49        // prefix all other tables with the database name as well 
     50        $query = str_replace(" ".$db_prefix, " ".$db_name.".".$db_prefix, $query); 
     51    } 
     52 
    5053    // and return the result 
    5154    return $isUserQuery; 
  • trunk/includes/dbsetup_include.php

    r1660 r1661  
    22//---------------------------------------------------------- 
    33// ExiteCMS file : dbsetup_include.php 
    4 // Date generated  : `21/08/2008 15:52` 
     4// Date generated  : `01/09/2008 08:00` 
    55//---------------------------------------------------------- 
    66 
    7 define('CMS_VERSION', '7.10'); 
     7define('CMS_VERSION', '7.20'); 
    88define('CMS_REVISION', '1650'); 
    99 
     
    233233} else { 
    234234    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('admin_activation', '0')"); 
    235     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('article_localisation', 'multiple')"); 
     235    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('article_localisation', 'none')"); 
    236236    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('attachmax', '10485760')"); 
    237237    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('attachments', '1')"); 
    238     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('attachtypes', '.exe,.com,.bat,.js,.htm,.html,.shtml,.php,.php3,.esml,.psd,.mvi')"); 
     238    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('attachtypes', '.exe,.com,.bat,.js,.vbs,.htm,.html,.shtml,.php')"); 
    239239    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('auth_ad_basedn', '')"); 
    240240    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('auth_ad_suffix', '')"); 
     
    248248    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('blogs_indexsize', '5')"); 
    249249    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('browserlang', '1')"); 
    250     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('counter', '895')"); 
     250    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('counter', '0')"); 
    251251    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('country', 'nl')"); 
    252     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('debug_php_errors', '1')"); 
     252    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('debug_php_errors', '0')"); 
    253253    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('debug_querylog', '')"); 
    254254    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('debug_sql_explain', '1')"); 
    255     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('description', 'ExiteCMS, a light-weight CMS system, wriiten in PHP, and using MySQL and the Smarty template engine')"); 
     255    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('description', 'ExiteCMS, a light-weight CMS system, written in PHP, and using MySQL and the Smarty template engine')"); 
    256256    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('display_validation', '1')"); 
    257257    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('download_columns', '1')"); 
    258     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('download_localisation', 'multiple')"); 
     258    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('download_localisation', 'none')"); 
    259259    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('email_verification', '1')"); 
    260260    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('enable_registration', '1')"); 
     
    271271    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('hide_webmaster', '0')"); 
    272272    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('hoteditor_enabled', '1')"); 
    273     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('keywords', 'ExiteCMS, CMS, Smarty, MySQL, PHP, Open-Source')"); 
     273    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('keywords', 'Exite, ExiteCMS, CMS, Content Management, Smarty, MySQL, PHP, Open-Source')"); 
    274274    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('locale', 'English')"); 
    275275    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('login_expire', '7200')"); 
     
    278278    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('maintenance', '0')"); 
    279279    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('maintenance_color', '#83AF83')"); 
    280     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('maintenance_message', 'Maintenance Mode Test')"); 
     280    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('maintenance_message', 'Maintenance Mode Message')"); 
    281281    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('max_users', '5')"); 
    282     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('max_users_datestamp', '1193029685')"); 
     282    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('max_users_datestamp', '0')"); 
    283283    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('navbar_range', '5')"); 
    284     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('newsletter_email', 'noreply@exite.eu')"); 
     284    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('newsletter_email', 'bounce@example.com')"); 
    285285    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_columns', '1')"); 
    286     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_headline', '2')"); 
    287     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_items', '6')"); 
     286    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_headline', '1')"); 
     287    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_items', '5')"); 
    288288    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_latest', '1')"); 
    289     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_localisation', 'multiple')"); 
     289    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_localisation', 'none')"); 
    290290    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('numofshouts', '5')"); 
    291291    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('numofthreads', '20')"); 
    292292    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('opening_page', 'news.php')"); 
    293     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('panels_localisation', 'multiple')"); 
     293    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('panels_localisation', 'none')"); 
    294294    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('photo_h', '300')"); 
    295295    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('photo_max_b', '150000')"); 
     
    311311    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('session_name', 'ExiteCMSid')"); 
    312312    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('shortdate', '%m/%d/%Y')"); 
    313     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteemail', 'exitecms@exite.eu')"); 
    314     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteintro', '<center>\r\n<b>This website is under construction at the moment!</b><br /><br />We are currently preparing the release of version 7.0. The release date has been set for October 27th, providing no last-minute showstoppers pop up.<br /><br />\r\nExiteCMS v7.0 ©2007 Exite BV.</center>')"); 
    315     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('sitelinks_localisation', 'multiple')"); 
    316     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('sitename', 'ExiteCMS Support Site')"); 
     313    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteemail', 'website@example.com')"); 
     314    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteintro', '<center>\r\n<b>Congratulations, and welcome to this brand new website, powered by <a href='http://exitecms.exite.eu'>ExiteCMS</a>!<br /><br /><br />\r\n<b>ExiteCMS v7.0 ©2007 Exite BV.</b></center>')"); 
     315    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('sitelinks_localisation', 'none')"); 
     316    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('sitename', 'ExiteCMS Powered Website')"); 
    317317    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteurl', '/')"); 
    318318    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteusername', 'webmaster')"); 
     
    332332    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('unread_threshold', '90')"); 
    333333    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('validation_method', 'image')"); 
    334     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('version', '7.10')"); 
     334    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('version', '7.20')"); 
    335335} 
    336336 
  • trunk/includes/locale_functions.php

    r1520 r1661  
    110110| locale_functions include - general functions below  | 
    111111+----------------------------------------------------*/ 
    112 function locale_load($locale_name) { 
     112function locale_load($locale_name, $locale_code="") { 
    113113 
    114114    global $settings, $locale, $db_prefix; 
    115115 
     116    // if no locale code is specified, use the current user locale 
     117    if (empty($locale_code)) { 
     118        $locale_code = $settings['locale_code']; 
     119    } 
     120 
    116121    // assemble the locale filename 
    117     $locales_file = PATH_ROOT."files/locales/".$settings['locale_code'].".".$locale_name.".php"; 
     122    $locales_file = PATH_ROOT."files/locales/".$locale_code.".".$locale_name.".php"; 
    118123 
    119124    // check if we need to recompile from the database 
     
    121126 
    122127        // get the last update date from the locale strings table 
    123         $result = dbquery("SELECT MAX(locales_datestamp) as last_update FROM ".$db_prefix."locales WHERE locales_code = '".$settings['locale_code']."' AND locales_name = '".$locale_name."'"); 
     128        $result = dbquery("SELECT MAX(locales_datestamp) as last_update FROM ".$db_prefix."locales WHERE locales_code = '".$locale_code."' AND locales_name = '".$locale_name."'"); 
    124129 
    125130        // if found... 
     
    135140                    if (dbtable_exists($db_prefix."translators")) { 
    136141                        $translators = "ExiteCMS team,"; 
    137                         $result2 = dbquery("SELECT t.*, u.user_id, u.user_name FROM ".$db_prefix."translators t, ".$db_prefix."users u WHERE t.translate_locale_code = '".$settings['locale_code']."' AND t.translate_translator = u.user_id ORDER BY u.user_name"); 
     142                        $result2 = dbquery("SELECT t.*, u.user_id, u.user_name FROM ".$db_prefix."translators t, ".$db_prefix."users u WHERE t.translate_locale_code = '".$locale_code."' AND t.translate_translator = u.user_id ORDER BY u.user_name"); 
    138143                        while ($data2 = dbarray($result2)) { 
    139144                            $translators .= $data2['user_name'].","; 
     
    144149 
    145150                        // get the locale records for the selected locale and this locale_name 
    146                         $result2 = dbquery("SELECT * FROM ".$db_prefix."locales WHERE locales_code = '".$settings['locale_code']."' AND locales_name = '".$locale_name."' ORDER BY locales_key"); 
     151                        $result2 = dbquery("SELECT * FROM ".$db_prefix."locales WHERE locales_code = '".$locale_code."' AND locales_name = '".$locale_name."' ORDER BY locales_key"); 
    147152                        if (dbrows($result2)) { 
    148153                            fwrite($handle, "<?php"."\n"); 
     
    193198                            } 
    194199                        } 
    195                         fwrite($handle, "?>"); 
     200                        fwrite($handle, "?".">"); 
    196201                        fclose($handle); 
    197202                    } else { 
     
    244249            require $locales_file; 
    245250        } else { 
    246             // otherwise, if the locale is not English, try to load the English version 
    247             if ($settings['locale_code'] != "en") { 
    248                 // save the current locale 
    249                 $current_locale_code = $settings['locale_code']; 
    250                 $current_locale = $settings['locale']; 
    251                 // retrieve the info for the default locale 
    252                 $result = dbquery("SELECT * FROM ".$db_prefix."locale WHERE locale_code = 'en'"); 
     251            // otherwise, if the locale is not English, try to load the system locale version 
     252            if ($locale_code != "en") { 
     253                // retrieve the info for the system locale (which is the first one installed!) 
     254                $result = dbquery("SELECT * FROM ".$db_prefix."locale ORDER BY locale_id LIMIT 1"); 
    253255                if (dbrows($result)) { 
    254256                    $data = dbarray($result); 
    255                     $settings['locale_code'] = $data['locale_code']; 
    256                     $settings['locale'] = $data['locale_name']; 
     257                    // try to load the default locale instead 
     258                    locale_load($locale_name, $data['locale_code']); 
    257259                } else { 
    258260                    // system default language missing? 
    259261                    trigger_error("ExiteCMS locales error: Can't load the system default language!", E_USER_ERROR); 
    260262                } 
    261                 // try to load the default locale instead 
    262                 locale_load($locale_name); 
    263                 // restore the original locale 
    264                 $settings['locale_code'] = $current_locale_code; 
    265                 $settings['locale'] = $current_locale; 
    266263            } else { 
    267264                trigger_error("ExiteCMS locales error: unable to locate a locale for ".$locale_name."!", E_USER_NOTICE); 
  • trunk/includes/templates/main.setup.tpl

    r1660 r1661  
    2828td          { font-family:Verdana,Tahoma,Arial,Sans-Serif; font-size:11px; } 
    2929.tbl-border { background-color:#D1D8DD; } 
    30 .tbl        { font-size:11px; color:#000; background-color:#E1E1E1; } 
     30.tbl        { font-size:11px; color:#000; background-color:#C1C1C1; } 
    3131.tbl1       { font-size:11px; color:#000; background-color:#F1F1F1; padding:4px; } 
    3232.tbl2       { font-size:11px; color:#000; background-color:#E6E6E6; padding:4px; } 
    3333.tbl3       { font-size:11px; color:#000; background-color:#E65656; padding:4px; } 
    3434.tbl4       { font-size:11px; color:#000; background-color:#56E656; padding:4px; } 
     35.small      { font-size:10px; color:#666; } 
    3536--> 
    3637</style>{/literal} 
     
    5354            <tr> 
    5455                <td align='center'> 
    55                     <img width='450' src='images/cms-logo-big.png'> 
     56                    <img width='598' src='images/cms-logo-big.png'> 
    5657                </td> 
    5758            </tr> 
     
    9293                            <b>{$loc}</b> 
    9394                        {else} 
    94                             <a href='{$smarty.const.FUSION_SELF}?step=0&localeset={$loc}'>{$loc}</a> 
     95                            <a href='{$smarty.const.FUSION_SELF}?localeset={$loc}'>{$loc}</a> 
    9596                        {/if} 
    9697                    </td> 
     
    119120                </table> 
    120121                <br> 
    121                 <form name='setup' method='post' action='{$smarty.const.FUSION_SELF}?step=1&localeset={$localeset}'> 
     122                <form name='setup' method='post' action='{$smarty.const.FUSION_SELF}?localeset={$localeset}'> 
    122123                    <table align='center' width='600' cellpadding='0' cellspacing='1' class='tbl-border'> 
    123124                        <tr> 
     
    139140                            </td> 
    140141                            <td class='tbl1'> 
    141                                 <input type='text' value='' name='{$db_user}' class='textbox' /> 
     142                                <input type='text' value='{$db_user}' name='db_user' class='textbox' /> 
    142143                            </td> 
    143144                        </tr> 
     
    147148                            </td> 
    148149                            <td class='tbl1'> 
    149                                 <input type='password' value='' name='{$db_pass}' class='textbox'> 
     150                                <input type='password' value='{$db_pass}' name='db_pass' class='textbox'> 
    150151                            </td> 
    151152                        </tr> 
     
    155156                            </td> 
    156157                            <td class='tbl1'> 
    157                                 <input type='text' value='' name='{$db_name}' class='textbox' /> 
     158                                <input type='text' value='{$db_name}' name='db_name' class='textbox' /> 
    158159                            </td> 
    159160                        </tr> 
     
    163164                            </td> 
    164165                            <td class='tbl1'> 
    165                                 <input type='text' value='{$db_prefix|default:"exitecms_"}' name='db_prefix' class='textbox' /> 
     166                                <input type='text' value='{$db_prefix|default:"exitecms_"}' name='db_prefix' class='textbox' /> <span class='small'>{$locale.436}</span> 
    166167                            </td> 
    167168                        </tr> 
    168169                        <tr> 
    169170                            <td align='center' colspan='2' class='tbl1'> 
     171                                <input type='hidden' name='step' value='1' /> 
    170172                                <input type='submit' name='next' value='{$locale.426}' class='button' /> 
    171173                            </td> 
     
    185187            </table> 
    186188            <br /> 
    187             <form name='setup' method='post' action='{$smarty.const.FUSION_SELF}?step=2&localeset={$localeset}'> 
     189            <form name='setup' method='post' action='{$smarty.const.FUSION_SELF}?localeset={$localeset}'> 
    188190                <table align='center' cellpadding='0' cellspacing='1' width='600' class='tbl-border'> 
    189191                    <tr> 
     
    197199                        </td> 
    198200                        <td class='tbl1'> 
    199                             <input type='text' name='username' maxlength='30' class='textbox' /> 
     201                            <input type='text' value='{$username}' name='username' maxlength='30' class='textbox' /> 
    200202                        </td> 
    201203                    </tr> 
     
    205207                        </td> 
    206208                        <td class='tbl1'> 
    207                             <input type='password' name='password1' maxlength='20' class='textbox' /> 
     209                            <input type='password' value='{$password1}' name='password1' maxlength='20' class='textbox' /> 
    208210                        </td> 
    209211                    </tr> 
     
    213215                        </td> 
    214216                        <td class='tbl1'> 
    215                             <input type='password' name='password2' maxlength='20' class='textbox' /> 
     217                            <input type='password' value='{$password2}' name='password2' maxlength='20' class='textbox' /> 
    216218                        </td> 
    217219                    </tr> 
     
    221223                        </td> 
    222224                        <td class='tbl1'> 
    223                             <input type='text' name='email' maxlength='100' class='textbox' /> 
     225                            <input type='text' value='{$email}' name='email' maxlength='100' class='textbox' /> 
    224226                        </td> 
    225227                    </tr> 
    226228                    <tr> 
    227229                        <td colspan='2' align='center' class='tbl1'> 
     230                            <input type='hidden' name='step' value='2' /> 
    228231                            <input type='submit' name='next' value='{$locale.426}' class='button'> 
    229232                        </td> 
  • trunk/setup.php

    r1660 r1661  
    113113    $locales_file = PATH_ROOT."files/locales/".(defined('LP_LOCALE')?LP_LOCALE:"en").".".$locale_name.".php"; 
    114114    if (file_exists($locales_file)) { 
    115         require_once $locales_file; 
     115        require $locales_file; 
     116    } else { 
     117        die("locales file $locales_file not found!"); 
    116118    } 
    117119    return; 
     
    126128    $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;'>"; 
    127129    $msg .= $error."</font></b><br /><br />"; 
    128     $msg .= $error."</font></b><br /><br />"; 
    129130    if ($wiki) { 
    130         if (empty($locale['404')) { 
     131        if (empty($locale['404'])) { 
    131132            $msg .= "Please consult our <a href='http://exitecms.exite.eu/modules/wiki/index.php?wakka=Setup'>Wiki</a> "; 
    132133        } else { 
    133             $msg = sprintf($locale['404'], "http://exitecms.exite.eu/modules/wiki/index.php?wakka=Setup"); 
    134         } 
    135     } 
    136     $msg .= $tip."</div>"; 
     134            $msg .= sprintf($locale['404'], "http://exitecms.exite.eu/modules/wiki/index.php?wakka=Setup"); 
     135        } 
     136    } 
     137    $msg .=" ". $tip."</div>"; 
    137138    die($msg); 
    138139} 
     
    182183 
    183184// load the language pack file, to get some initial info about the language 
    184 require PATH_ADMIN."tools/language_pack_".$localeset.".php"; 
     185require_once PATH_ADMIN."tools/language_pack_".$localeset.".php"; 
    185186 
    186187// load the locale for this module 
     188$locale = array(); 
    187189locale_load("main.setup"); 
    188190 
     
    193195 
    194196// parameter validation 
    195 $step = (isset($_GET['step']) ? $_GET['step'] : "0"); 
    196 $variables['step'] = $step; 
     197$step = (isset($_POST['step']) ? $_POST['step'] : "0"); 
    197198 
    198199// check if the cache directories are writeable 
     
    230231if ($step == "1") { 
    231232    // verify the user input: hostname 
    232     $db_host = stripinput($_POST['db_host']); 
     233    $db_host = isset($_POST['db_host']) ? stripinput($_POST['db_host']) : ""; 
    233234    $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"; 
     235    if (empty($db_host) || !preg_match("/^[-0-9\.A-Z_@]+$/i", $db_host)) { 
     236        $error .= $locale['417']."<br /><br />\n"; 
    236237    } 
    237238    // verify the user input: username 
    238     $db_user = stripinput($_POST['db_user']); 
     239    $db_user = isset($_POST['db_user']) ? stripinput($_POST['db_user']) : ""; 
    239240    $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         } 
     241    if (empty($db_user) || !preg_match("/^[-0-9A-Z_@]+$/i", $db_user)) { 
     242        $error .= $locale['418']."<br /><br />\n"; 
    243243    } 
    244244    // verify the user input: password 
    245     $db_pass = stripinput($_POST['db_pass']); 
     245    $db_pass = isset($_POST['db_pass']) ? stripinput($_POST['db_pass']) : ""; 
    246246    $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         } 
     247    if (empty($db_pass) || !preg_match("/^[-0-9A-Z_@]+$/i", $db_pass)) { 
     248        $error .= $locale['419']."<br /><br />\n"; 
    250249    } 
    251250    // verify the user input: database name 
    252     $db_name = stripinput($_POST['db_name']); 
     251    $db_name = isset($_POST['db_name']) ? stripinput($_POST['db_name']) : ""; 
    253252    $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         } 
     253    if (empty($db_name) || !preg_match("/^[-0-9A-Z_@]+$/i", $db_name)) { 
     254        $error .= $locale['427']."<br /><br />\n"; 
    257255    } 
    258256    // verify the user input: table prefix 
    259     $db_prefix = stripinput($_POST['db_prefix']); 
     257    $db_prefix = isset($_POST['db_prefix']) ? stripinput($_POST['db_prefix']) : ""; 
    260258    $variables['db_prefix'] = $db_prefix; 
    261259    if (!preg_match("/^[-0-9A-Z_@]*$/i", $db_prefix)) { 
    262             $error .= $locale['428']."<br />\n"; 
    263         } 
     260        $error .= $locale['428']."<br /><br />\n"; 
    264261    } 
    265262    // verify a connection to the database server can be made 
     
    267264        $db_connect = @mysql_connect($db_host, $db_user, $db_pass); 
    268265        if (!$db_connect) { 
    269             $error .= $locale['429']."<br />\n"; 
     266            $error .= $locale['401']."<br />".$locale['429']."<br /><br />\n"; 
    270267        } 
    271268    } 
     
    274271        $db_select = @mysql_select_db($db_name); 
    275272        if (!$db_select) { 
    276             $error .= sprintf($locale['434'],$db_name)."<br />\n"; 
     273            $error .= sprintf($locale['434'],$db_name)."<br /><br />\n"; 
    277274        } 
    278275    } 
     
    281278        $result = dbquery("CREATE TABLE ".$db_prefix."_test (test TINYINT(1) NOT NULL) ENGINE = MYISAM"); 
    282279        if (!$result) { 
    283             $error .= sprintf($locale['435'],$db_name)."<br />\n"; 
     280            $error .= sprintf($locale['435'],$db_name)."<br /><br />\n"; 
    284281        } else { 
    285282            $result = dbquery("DROP TABLE ".$db_prefix."_test"); 
     
    296293"."$"."db_prefix="."\"".$_POST['db_prefix']."\""."; 
    297294 
    298 // user database settings 
     295// user database settings (may be shared with another ExiteCMS DB) 
    299296"."$"."user_db_host="."\"".$_POST['db_host']."\""."; 
    300297"."$"."user_db_user="."\"".$_POST['db_user']."\""."; 
     
    310307            fclose($temp); 
    311308        } 
     309    } 
     310    if (!empty($error)) { 
     311        $step = 0; 
    312312    } 
    313313} 
     
    360360        $link = dbconnect($db_host, $db_user, $db_pass, $db_name); 
    361361        $basedir = substr($_SERVER['PHP_SELF'], 0, -9); 
    362         $username = stripinput($_POST['username']); 
    363         $password1 = stripinput($_POST['password1']); 
    364         $password2 = stripinput($_POST['password2']); 
    365         $email = stripinput($_POST['email']); 
     362        $username = isset($_POST['username']) ? stripinput($_POST['username']) : ""; 
     363        $variables['username'] = $username; 
     364        $password1 = isset($_POST['password1']) ? stripinput($_POST['password1']) : ""; 
     365        $variables['password1'] = $password1; 
     366        $password2 = isset($_POST['password2']) ? stripinput($_POST['password2']) : ""; 
     367        $variables['password2'] = $password2; 
     368        $email = isset($_POST['email']) ? stripinput($_POST['email']) : ""; 
     369        $variables['email'] = $email; 
    366370        if (!preg_match("/^[-0-9A-Z_@\s]+$/i", $username)) $error .= $locale['450']."<br /><br />\n"; 
    367371        if (preg_match("/^[0-9A-Z@]{6,20}$/i", $password1)) { 
     
    378382        require_once PATH_INCLUDES."dbsetup_include.php"; 
    379383 
    380         if ($error == "") { 
     384        if ($error != "") { 
     385 
     386            $step = 1; 
     387 
     388        } else { 
    381389 
    382390            // create the admin rights field for the webmaster, based on all admin modules available 
     
    472480$variables['error'] = $error; 
    473481 
     482$variables['step'] = $step; 
     483 
    474484// define the setup body panel variables 
    475485$template_panels[] = array('type' => 'body', 'name' => 'setup', 'template' => 'main.setup.tpl', 'locale' => "main.setup"); 
Note: See TracChangeset for help on using the changeset viewer.