[geeklog-cvs] Geeklog-1.x/sql/updates mysql_1.4.1_to_1.5.0.php, 1.59, 1.60
Dirk Haun
dhaun at qs1489.pair.com
Sat Feb 2 11:36:36 EST 2008
Update of /cvsroot/geeklog/Geeklog-1.x/sql/updates
In directory qs1489.pair.com:/tmp/cvs-serv44585/sql/updates
Modified Files:
mysql_1.4.1_to_1.5.0.php
Log Message:
Have the config data for the Static Pages plugin in only one place
Index: mysql_1.4.1_to_1.5.0.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/sql/updates/mysql_1.4.1_to_1.5.0.php,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** mysql_1.4.1_to_1.5.0.php 27 Jan 2008 19:52:31 -0000 1.59
--- mysql_1.4.1_to_1.5.0.php 2 Feb 2008 16:36:34 -0000 1.60
***************
*** 301,324 ****
$plugin_path = $_CONF['path'] . 'plugins/staticpages/';
if (file_exists($plugin_path . 'config.php')) {
require_once $plugin_path . 'config.php';
- $_SP_DEFAULT = $_SP_CONF;
- } else {
- require_once $plugin_path . 'install_defaults.php';
}
! $c = config::get_instance();
! $c->add('allow_php', $_SP_DEFAULT['allow_php'], 'select', 0, 0, 0, 10, true, 'staticpages');
! $c->add('sort_by', $_SP_DEFAULT['sort_by'], 'select', 0, 0, 2, 20, true, 'staticpages');
! $c->add('sort_menu_by', $_SP_DEFAULT['sort_menu_by'], 'select', 0, 0, 3, 30, true, 'staticpages');
! $c->add('delete_pages', $_SP_DEFAULT['delete_pages'], 'select', 0, 0, 0, 40, true, 'staticpages');
! $c->add('in_block', $_SP_DEFAULT['in_block'], 'select', 0, 0, 0, 50, true, 'staticpages');
! $c->add('show_hits', $_SP_DEFAULT['show_hits'], 'select', 0, 0, 0, 60, true, 'staticpages');
! $c->add('show_date', $_SP_DEFAULT['show_date'], 'select', 0, 0, 0, 70, true, 'staticpages');
! $c->add('filter_html', $_SP_DEFAULT['filter_html'], 'select', 0, 0, 0, 80, true, 'staticpages');
! $c->add('censor', $_SP_DEFAULT['censor'], 'select', 0, 0, 0, 90, true, 'staticpages');
! $c->add('aftersave', $_SP_DEFAULT['aftersave'], 'select', 0, 0, 9, 100, true, 'staticpages');
! $c->add('atom_max_items', $_SP_DEFAULT['atom_max_items'], 'text', 0, 0, null, 110, true, 'staticpages');
! $c->add('default_permissions', $_SP_DEFAULT['default_permissions'], '@select', 0, 1, 12, 120, true, 'staticpages');
$P_SQL = array();
--- 301,316 ----
$plugin_path = $_CONF['path'] . 'plugins/staticpages/';
+ require_once $plugin_path . 'install_defaults.php';
+
if (file_exists($plugin_path . 'config.php')) {
+ global $_SP_CONF;
+
require_once $plugin_path . 'config.php';
}
! if (!plugin_initconfig_staticpages()) {
! echo 'There was an error upgrading the Static Pages plugin';
! return false;
! }
$P_SQL = array();
***************
*** 331,335 ****
$rst = DB_query($sql);
if (DB_error()) {
! echo "There was an error upgrading the staticpages, SQL: $sql<br>";
return false;
}
--- 323,327 ----
$rst = DB_query($sql);
if (DB_error()) {
! echo "There was an error upgrading the Static Pages plugin, SQL: $sql<br>";
return false;
}
***************
*** 337,346 ****
if (file_exists($plugin_path . 'config.php')) {
! $ret = @rename($plugin_path . 'config.php',
$plugin_path . 'config-pre1.4.3.php');
- if (!ret) {
- echo "There was an error upgrading the Static Pages plugin: Could not rename config.php";
- return false;
- }
}
--- 329,335 ----
if (file_exists($plugin_path . 'config.php')) {
! // Rename the existing config.php as it's not needed any more
! $ren = @rename($plugin_path . 'config.php',
$plugin_path . 'config-pre1.4.3.php');
}
More information about the geeklog-cvs
mailing list