Ignore:
Timestamp:
Feb 13, 2009, 2:01:03 PM (15 years ago)
Author:
rvelices
Message:
  • moved check upgrade feed code to admin/include/functions_upgrade.php
  • refactored some code (shorter and somehow faster - but nothing revolutionary)
  • decrease lost space in permalinks.tpl and hard coded column width (was illisible)
File:
1 edited

Legend:

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

    r3126 r3136  
    116116  }
    117117}
    118 else
    119 {
    120   if ( strtolower(PWG_CHARSET)!='iso-8859-1' )
    121   {
    122     fatal_error('PWG supports only iso-8859-1 charset on MySql version '.mysql_get_server_info());
    123   }
    124 }
    125 
    126 //
    127 // Setup gallery wide options, if this fails then we output a CRITICAL_ERROR
    128 // since basic gallery information is not available
    129 //
     118elseif ( strtolower(PWG_CHARSET)!='iso-8859-1' )
     119{
     120  fatal_error('PWG supports only iso-8859-1 charset on MySql version '.mysql_get_server_info());
     121}
     122
    130123load_conf_from_db();
    131124load_plugins();
     
    188181if ($conf['check_upgrade_feed'])
    189182{
    190 
    191   // retrieve already applied upgrades
    192   $query = '
    193 SELECT id
    194   FROM '.UPGRADE_TABLE.'
    195 ;';
    196   $applied = array_from_query($query, 'id');
    197 
    198   // retrieve existing upgrades
    199   $existing = get_available_upgrade_ids();
    200 
    201   // which upgrades need to be applied?
    202   if (count(array_diff($existing, $applied)) > 0)
     183  include_once(PHPWG_ROOT_PATH.'admin/include/functions_upgrade.php');
     184  if (check_upgrade_feed())
    203185  {
    204186    $header_msgs[] = 'Some database upgrades are missing, '
Note: See TracChangeset for help on using the changeset viewer.