Ignore:
Timestamp:
11/08/07 00:06:27 (5 years ago)
Author:
hverton
Message:

added the site location country selection (also the explicit country for user_id 1)
added some missing country codes to rev01079.php
birthday in the profile is displayed using the date format and months names of the locale set
forced maintenance mode if uninstalled updates are detected
updated the dbsetup_include.php file to reflect the latest database changes
removed the country name from the GeoIP table, now uses the country name from the locales table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/administration/settings_languages.php

    r1071 r1085  
    6565        $result = dbquery("UPDATE ".$db_prefix."admin SET admin_title='".$locale['236']."' WHERE admin_link='settings_languages.php'"); 
    6666    } 
     67    if (empty($_POST['old_country'])) { 
     68        $result = dbquery("INSERT INTO ".$db_prefix."CMSconfig (cfg_name, cfg_value) VALUES ('country', '".$_POST['country']."')"); 
     69    } else { 
     70        $result = dbquery("UPDATE ".$db_prefix."CMSconfig SET cfg_value = '".$_POST['country']."' WHERE cfg_name = 'country'"); 
     71    } 
    6772    redirect(FUSION_SELF.$aidlink); 
    6873} 
     
    8186} 
    8287 
     88$variables['countries'] = array(); 
     89$result = dbquery("SELECT locales_key, locales_value FROM ".$db_prefix."locales WHERE locales_locale = '".$settings['locale']."' AND locales_name = 'countrycode' ORDER BY locales_value"); 
     90if (!dbrows($result)) { 
     91    // no translated country names found, load the english set instead 
     92    $result = dbquery("SELECT locales_key, locales_value FROM ".$db_prefix."locales WHERE locales_locale = 'English' AND locales_name = 'countrycode' ORDER BY locales_value"); 
     93} 
     94while ($data = dbarray($result)) { 
     95    $variables['countries'][$data['locales_key']] = $data['locales_value']; 
     96} 
     97 
    8398// define the admin body panel 
    8499$template_panels[] = array('type' => 'body', 'name' => 'admin.settings_languages', 'template' => 'admin.settings_languages.tpl', 'locale' => "admin.settings"); 
Note: See TracChangeset for help on using the changeset viewer.