aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions_plugins.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-10-31 02:41:32 +0000
committerrvelices <rv-github@modusoptimus.com>2006-10-31 02:41:32 +0000
commita81bac0f15907d81da4e9fea978840b9a10210c8 (patch)
tree7ad7312cea1e447a698e627093614174f5a7552e /admin/include/functions_plugins.inc.php
parent9c3e182268ed2bc5df5f31cf4045b217f7ad8791 (diff)
plugins go now in the #plugins table
git-svn-id: http://piwigo.org/svn/trunk@1584 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/include/functions_plugins.inc.php')
-rw-r--r--admin/include/functions_plugins.inc.php39
1 files changed, 4 insertions, 35 deletions
diff --git a/admin/include/functions_plugins.inc.php b/admin/include/functions_plugins.inc.php
index 91266841b..d938f7b23 100644
--- a/admin/include/functions_plugins.inc.php
+++ b/admin/include/functions_plugins.inc.php
@@ -24,7 +24,9 @@
// | USA. |
// +-----------------------------------------------------------------------+
-function get_plugins()
+/* Returns an array of plugins defined in the plugin directory
+*/
+function get_fs_plugins()
{
$plugins = array();
@@ -39,7 +41,7 @@ function get_plugins()
and file_exists($path.'/index.php')
)
{
- $plugin = array('name'=>'?', 'version'=>'?', 'uri'=>'', 'description'=>'');
+ $plugin = array('name'=>'?', 'version'=>'0', 'uri'=>'', 'description'=>'');
$plg_data = implode( '', file($path.'/index.php') );
if ( preg_match("|Plugin Name: (.*)|i", $plg_data, $val) )
@@ -66,39 +68,6 @@ function get_plugins()
return $plugins;
}
-function activate_plugin($plugin_name)
-{
- global $conf;
- $arr = get_active_plugins(false);
- array_push($arr, $plugin_name);
- if ($arr != array_unique($arr) )
- return false; // just added the same one
- $conf['active_plugins'] = implode(',', $arr);
- pwg_query('
-UPDATE '.CONFIG_TABLE.'
- SET value="'.$conf['active_plugins'].'"
- WHERE param="active_plugins"');
- return true;
-}
-
-function deactivate_plugin($plugin_name)
-{
- global $conf;
- $arr = get_active_plugins(false);
- $idx = array_search($plugin_name, $arr);
- if ($idx!==false)
- {
- unset( $arr[$idx] );
- $conf['active_plugins'] = implode(',', $arr);
- pwg_query('
-UPDATE '.CONFIG_TABLE.'
- SET value="'.$conf['active_plugins'].'"
- WHERE param="active_plugins"');
- return true;
- }
- return false;
-}
-
/*allows plugins to add their content to the administration page*/
function add_plugin_admin_menu($title, $func)
{