[geeklog-cvs] geeklog: Pick up and install all autoinstall-able plugins during...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Mon Jan 5 05:06:11 EST 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/86f08a6dd0ad
changeset: 6590:86f08a6dd0ad
user: Dirk Haun <dirk at haun-online.de>
date: Fri Dec 26 11:46:42 2008 +0100
description:
Pick up and install all autoinstall-able plugins during the default install
diffstat:
1 file changed, 53 insertions(+), 1 deletion(-)
public_html/admin/install/index.php | 54 ++++++++++++++++++++++++++++++++++-
diffs (71 lines):
diff -r ec370986aa11 -r 86f08a6dd0ad public_html/admin/install/index.php
--- a/public_html/admin/install/index.php Thu Dec 25 22:48:45 2008 +0100
+++ b/public_html/admin/install/index.php Fri Dec 26 11:46:42 2008 +0100
@@ -482,7 +482,13 @@
$config->set('language', $lng);
}
- // Installation is complete. Continue onto either plugin installation or success page
+ if (! $install_plugins) {
+ // do a default install of all available plugins
+ INST_defaultPluginInstall();
+ }
+
+ // Installation is complete. Continue onto either
+ // custom plugin installation page or success page
header('Location: ' . $next_link);
} else {
@@ -1474,6 +1480,52 @@
return $result;
}
+/**
+* Handle default install of available plugins
+*
+* Picks up and installs all plugins with an autoinstall.php.
+* Any errors are silently ignored ...
+*
+*/
+function INST_defaultPluginInstall()
+{
+ global $_CONF, $_TABLES;
+
+ if (! function_exists('COM_errorLog')) {
+ // "Emergency" version of COM_errorLog
+ function COM_errorLog($a, $b = '')
+ {
+ return '';
+ }
+ }
+
+ $plugins_dir = $_CONF['path'] . 'plugins/';
+ $fd = opendir($plugins_dir);
+ while (($plugin = @readdir($fd)) == TRUE) {
+
+ if (($plugin <> '.') && ($plugin <> '..') && ($plugin <> 'CVS') &&
+ (substr($plugin, 0, 1) <> '.') &&
+ (substr($plugin, 0, 1) <> '_') &&
+ is_dir($plugins_dir . $plugin)) {
+
+ clearstatcache ();
+ $plugin_dir = $plugins_dir . $plugin;
+
+ if (DB_count($_TABLES['plugins'], 'pi_name', $plugin) == 0) {
+
+ $info = INST_getPluginInfo($plugin);
+ if ($info !== false) {
+ $fn = 'plugin_autoinstall_' . $plugin;
+ $inst_parms = $fn($plugin);
+ INST_pluginAutoinstall($plugin, $inst_parms);
+ }
+
+ }
+
+ }
+ }
+}
+
// +---------------------------------------------------------------------------+
// | Main |
More information about the geeklog-cvs
mailing list