Changeset 5176 for trunk/include


Ignore:
Timestamp:
Mar 18, 2010, 3:30:04 PM (14 years ago)
Author:
rvelices
Message:
  • removed compatibility with php4 (file_put_contents exists in php5)
  • when synchronizing local files , sort them alphabetically
Location:
trunk/include
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/common.inc.php

    r5138 r5176  
    8282  'hash_hmac', //(hash) - enabled by default as of PHP 5.1.2
    8383  'preg_last_error', // PHP 5 >= 5.2.0
    84   'file_put_contents', //PHP5
    8584  ) as $func)
    8685{
     
    106105
    107106// Database connection
    108 $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'], 
    109                               $conf['db_password'], $conf['db_base']) 
     107$pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'],
     108                              $conf['db_password'], $conf['db_base'])
    110109  or my_error('pwg_db_connect', true);
    111110
     
    117116include(PHPWG_ROOT_PATH.'include/user.inc.php');
    118117
    119 if ('fr_FR' == $user['language']) {
    120   define('PHPWG_DOMAIN', 'fr.piwigo.org');
    121 }
    122 else if ('de_DE' == $user['language']) {
    123   define('PHPWG_DOMAIN', 'de.piwigo.org');
    124 }
    125 else if ('es_ES' == $user['language']) {
    126   define('PHPWG_DOMAIN', 'es.piwigo.org');
    127 }
    128 else if ('pl_PL' == $user['language']) {
    129   define('PHPWG_DOMAIN', 'pl.piwigo.org');
    130 }
    131 else if ('zh_CN' == $user['language']) {
     118if (in_array( substr($user['language'],0,2), array('fr','de','es','pl') ) )
     119{
     120  define('PHPWG_DOMAIN', substr($user['language'],0,2).'.piwigo.org');
     121}
     122elseif ('zh_CN' == $user['language']) {
    132123  define('PHPWG_DOMAIN', 'cn.piwigo.org');
    133124}
Note: See TracChangeset for help on using the changeset viewer.