Changeset 5176


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
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/site_reader_local.php

    r3282 r5176  
    115115      $fs = array_merge($fs, $tmp_fs);
    116116    }
     117    ksort($fs);
    117118  } //end if is_dir
    118119  return $fs;
     
    199200  {
    200201    $high_file = dirname($file).'/pwg_high/'.basename($file);
    201    
     202
    202203    $data['high_filesize'] = floor(filesize($high_file)/1024);
    203204  }
    204  
     205
    205206  if ($conf['use_exif'])
    206207  {
  • 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.