[geeklog-cvs] Geeklog-1.x/public_html/admin/plugins/staticpages install.php, 1.29, 1.30
Dirk Haun
dhaun at qs1489.pair.com
Sat Feb 2 11:36:36 EST 2008
Update of /cvsroot/geeklog/Geeklog-1.x/public_html/admin/plugins/staticpages
In directory qs1489.pair.com:/tmp/cvs-serv44585/public_html/admin/plugins/staticpages
Modified Files:
install.php
Log Message:
Have the config data for the Static Pages plugin in only one place
Index: install.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/admin/plugins/staticpages/install.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** install.php 26 Jan 2008 20:05:44 -0000 1.29
--- install.php 2 Feb 2008 16:36:34 -0000 1.30
***************
*** 54,60 ****
$base_path = $_CONF['path'] . 'plugins/' . $pi_name . '/';
- // Load the configuration defaults
- require_once $base_path . 'install_defaults.php';
-
// name of the Admin group
$pi_admin = $pi_display_name . ' Admin';
--- 54,57 ----
***************
*** 105,130 ****
function plugin_load_configuration()
{
! global $_CONF, $pi_name, $_SP_DEFAULT;
require_once $_CONF['path_system'] . 'classes/config.class.php';
! $sp_config = config::get_instance();
! $sp_config->initConfig();
! if (! $sp_config->group_exists($pi_name)) {
! $sp_config->add('allow_php', $_SP_DEFAULT['allow_php'], 'select', 0, 0, 0, 10, true, 'staticpages');
! $sp_config->add('sort_by', $_SP_DEFAULT['sort_by'], 'select', 0, 0, 2, 20, true, 'staticpages');
! $sp_config->add('sort_menu_by', $_SP_DEFAULT['sort_menu_by'], 'select', 0, 0, 3, 30, true, 'staticpages');
! $sp_config->add('delete_pages', $_SP_DEFAULT['delete_pages'], 'select', 0, 0, 0, 40, true, 'staticpages');
! $sp_config->add('in_block', $_SP_DEFAULT['in_block'], 'select', 0, 0, 0, 50, true, 'staticpages');
! $sp_config->add('show_hits', $_SP_DEFAULT['show_hits'], 'select', 0, 0, 0, 60, true, 'staticpages');
! $sp_config->add('show_date', $_SP_DEFAULT['show_date'], 'select', 0, 0, 0, 70, true, 'staticpages');
! $sp_config->add('filter_html', $_SP_DEFAULT['filter_html'], 'select', 0, 0, 0, 80, true, 'staticpages');
! $sp_config->add('censor', $_SP_DEFAULT['censor'], 'select', 0, 0, 0, 90, true, 'staticpages');
! $sp_config->add('aftersave', $_SP_DEFAULT['aftersave'], 'select', 0, 0, 9, 100, true, 'staticpages');
! $sp_config->add('atom_max_items', $_SP_DEFAULT['atom_max_items'], 'text', 0, 0, null, 110, true, 'staticpages');
! $sp_config->add('default_permissions', $_SP_DEFAULT['default_permissions'], '@select', 0, 1, 12, 120, true, 'staticpages');
! }
!
! return true;
}
--- 102,111 ----
function plugin_load_configuration()
{
! global $_CONF, $base_path;
require_once $_CONF['path_system'] . 'classes/config.class.php';
+ require_once $base_path . 'install_defaults.php';
! return plugin_initconfig_staticpages();
}
More information about the geeklog-cvs
mailing list