projects
/
mtweb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
maj version dans config.xml
[mtweb]
/
mw
/
env
/
modules
/
mw_env_plugins.php
diff --git
a/mw/env/modules/mw_env_plugins.php
b/mw/env/modules/mw_env_plugins.php
index
153700b
..
b9fe042
100644
(file)
--- a/
mw/env/modules/mw_env_plugins.php
+++ b/
mw/env/modules/mw_env_plugins.php
@@
-16,8
+16,8
@@
# init
#
# init
#
- function init_plugins($PRIORITE = "ASC"){
- if(
isset($this->plugins_asc) || isset($this->plugins_desc
)){
+ function init_plugins($PRIORITE = "ASC"
, $RELOAD = false
){
+ if(
!$RELOAD && (isset($this->plugins_asc) || isset($this->plugins_desc)
)){
if($PRIORITE == "ASC"){
if(!isset($this->plugins_asc)) $this->plugins_asc = $this->ordonne_plugins($this->plugins_desc, $PRIORITE);
}
if($PRIORITE == "ASC"){
if(!isset($this->plugins_asc)) $this->plugins_asc = $this->ordonne_plugins($this->plugins_desc, $PRIORITE);
}
@@
-114,6
+114,14
@@
if(method_exists($impl, $method)) return $impl->$method($this);
}
if(method_exists($impl, $method)) return $impl->$method($this);
}
+ function loaded_plugins(){
+ if($plugins = $this->plugins()){
+ foreach($plugins as $plugin_name => $plugin){
+ $plugin["impl"]->loaded($this);
+ }
+ }
+ }
+
# ---------------------------------------------------------------------------------
# impl
#
# ---------------------------------------------------------------------------------
# impl
#
@@
-159,6
+167,8
@@
}
function set_plugin_data($plugin_name, $data){
}
function set_plugin_data($plugin_name, $data){
+ if(!is_dir($this->plugins_data_dir())) @mkdir($this->plugins_data_dir());
+ if(!is_dir($this->plugins_data_dir())) return false;
$data_file = $this->plugin_data_file($plugin_name);
$content = serialize($data);
$OK = false;
$data_file = $this->plugin_data_file($plugin_name);
$content = serialize($data);
$OK = false;
@@
-189,6
+199,9
@@
return "";
}
return "";
}
+ function loaded($env){
+ }
+
function install($env){
return true;
}
function install($env){
return true;
}