[geeklog-cvs] Geeklog-1.x/public_html/admin/plugins/calendar install.php, 1.11, 1.12
Dirk Haun
dhaun at qs1489.pair.com
Sun Mar 16 08:22:03 EDT 2008
Update of /cvsroot/geeklog/Geeklog-1.x/public_html/admin/plugins/calendar
In directory qs1489.pair.com:/tmp/cvs-serv34111/public_html/admin/plugins/calendar
Modified Files:
install.php
Log Message:
Calender plugin configuration
Index: install.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/admin/plugins/calendar/install.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** install.php 11 Feb 2007 01:33:10 -0000 1.11
--- install.php 16 Mar 2008 12:22:01 -0000 1.12
***************
*** 40,44 ****
require_once ('../../../lib-common.php');
- require_once ($_CONF['path'] . 'plugins/calendar/config.php');
// Plugin information
--- 40,43 ----
***************
*** 48,55 ****
$pi_display_name = 'Calendar';
$pi_name = 'calendar';
! $pi_version = $_CA_CONF['version'];
$gl_version = '1.4.1';
$pi_url = 'http://www.geeklog.net/';
// name of the Admin group
$pi_admin = 'Calendar Admin';
--- 47,56 ----
$pi_display_name = 'Calendar';
$pi_name = 'calendar';
! $pi_version = '1.0.2';
$gl_version = '1.4.1';
$pi_url = 'http://www.geeklog.net/';
+ $base_path = $_CONF['path'] . 'plugins/' . $pi_name . '/';
+
// name of the Admin group
$pi_admin = 'Calendar Admin';
***************
*** 98,101 ****
--- 99,118 ----
/**
+ * Loads the configuration records for the GL Online Config Manager
+ *
+ * @return boolean true = proceed with install, false = an error occured
+ *
+ */
+ 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_calendar();
+ }
+
+ /**
* When the install went through, give the plugin a chance for any
* plugin-specific post-install fixes
***************
*** 132,135 ****
--- 149,153 ----
}
+
//
// ----------------------------------------------------------------------------
***************
*** 138,150 ****
// require modifications.
- $base_path = $_CONF['path'] . 'plugins/' . $pi_name . '/';
$langfile = $base_path . $_CONF['language'] . '.php';
! if (file_exists ($langfile)) {
! require_once ($langfile);
} else {
! require_once ($base_path . 'language/english.php');
}
! require_once ($base_path . 'config.php');
! require_once ($base_path . 'functions.inc');
--- 156,166 ----
// require modifications.
$langfile = $base_path . $_CONF['language'] . '.php';
! if (file_exists($langfile)) {
! require_once $langfile;
} else {
! require_once $base_path . 'language/english.php';
}
! require_once $base_path . 'functions.inc';
***************
*** 187,191 ****
if (DB_error ()) {
PLG_uninstall ($pi_name);
-
return false;
}
--- 203,206 ----
***************
*** 250,253 ****
--- 265,269 ----
if (DB_error ()) {
PLG_uninstall ($pi_name);
+
return false;
}
***************
*** 264,267 ****
--- 280,284 ----
if (DB_error ()) {
PLG_uninstall ($pi_name);
+
return false;
}
***************
*** 274,277 ****
--- 291,303 ----
if (DB_error ()) {
PLG_uninstall ($pi_name);
+
+ return false;
+ }
+ }
+
+ // Load the online configuration records
+ if (function_exists('plugin_load_configuration')) {
+ if (!plugin_load_configuration()) {
+ PLG_uninstall($pi_name);
return false;
}
***************
*** 289,292 ****
--- 315,319 ----
if (DB_error ()) {
PLG_uninstall ($pi_name);
+
return false;
}
***************
*** 296,299 ****
--- 323,327 ----
if (!plugin_postinstall ()) {
PLG_uninstall ($pi_name);
+
return false;
}
More information about the geeklog-cvs
mailing list