diff options
author | rvelices <rv-github@modusoptimus.com> | 2009-02-13 13:01:03 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2009-02-13 13:01:03 +0000 |
commit | 601134c57e736e4639d0c105c7948279d9563813 (patch) | |
tree | 7bfc44db1c9e336596c5b7324d9a491c8afa5c87 /include/common.inc.php | |
parent | d4914a344708d4020f7cee561e41503896da5260 (diff) |
- 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)
git-svn-id: http://piwigo.org/svn/trunk@3136 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/common.inc.php | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/include/common.inc.php b/include/common.inc.php index db50f31f2..76054153a 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -115,18 +115,11 @@ if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) pwg_query('SET NAMES "'.DB_CHARSET.'"'); } } -else +elseif ( strtolower(PWG_CHARSET)!='iso-8859-1' ) { - if ( strtolower(PWG_CHARSET)!='iso-8859-1' ) - { - fatal_error('PWG supports only iso-8859-1 charset on MySql version '.mysql_get_server_info()); - } + fatal_error('PWG supports only iso-8859-1 charset on MySql version '.mysql_get_server_info()); } -// -// Setup gallery wide options, if this fails then we output a CRITICAL_ERROR -// since basic gallery information is not available -// load_conf_from_db(); load_plugins(); @@ -187,19 +180,8 @@ if ($conf['gallery_locked']) if ($conf['check_upgrade_feed']) { - - // retrieve already applied upgrades - $query = ' -SELECT id - FROM '.UPGRADE_TABLE.' -;'; - $applied = array_from_query($query, 'id'); - - // retrieve existing upgrades - $existing = get_available_upgrade_ids(); - - // which upgrades need to be applied? - if (count(array_diff($existing, $applied)) > 0) + include_once(PHPWG_ROOT_PATH.'admin/include/functions_upgrade.php'); + if (check_upgrade_feed()) { $header_msgs[] = 'Some database upgrades are missing, ' .'<a href="'.get_absolute_root_url(false).'upgrade_feed.php">upgrade now</a>'; @@ -242,4 +224,4 @@ add_event_handler('render_comment_content', 'parse_comment_content'); add_event_handler('render_comment_author', 'strip_tags'); add_event_handler('blockmanager_register_blocks', 'register_default_menubar_blocks', EVENT_HANDLER_PRIORITY_NEUTRAL-1); trigger_action('init'); -?> +?>
\ No newline at end of file |