diff options
author | rvelices <rv-github@modusoptimus.com> | 2009-02-13 13:02:20 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2009-02-13 13:02:20 +0000 |
commit | b77b4f0aba107444ad5003d4c6e9b72cb348a6ca (patch) | |
tree | 02ffed73dbc2c052da0df1e8f9f69efa119a7f44 /include/common.inc.php | |
parent | bd8b4f51bb68178ea48db2cd55b1ea3a15c63c45 (diff) |
merge r3136 from trunk
- 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/branches/2.0@3137 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/common.inc.php')
-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 |