projects
/
old-projects.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
locales
[old-projects.git]
/
philter
/
philter
/
include
/
philter.inc.php
diff --git
a/philter/philter/include/philter.inc.php
b/philter/philter/include/philter.inc.php
index
c626a0f
..
d6ae075
100644
(file)
--- a/
philter/philter/include/philter.inc.php
+++ b/
philter/philter/include/philter.inc.php
@@
-9,6
+9,9
@@
require_once("include/core.inc.php");
require_once("include/core.inc.php");
+function i18n($_index) { global $philter; echo $philter->i18n($_index); }
+function _i18n($_index) { global $philter; return $philter->i18n($_index); }
+
/** Philter base configuration class
* This is the base class of Philter.
*/
/** Philter base configuration class
* This is the base class of Philter.
*/
@@
-27,11
+30,22
@@
class Philter {
'path' => array('procmail', 'spool'),
'match_plugins' => array(),
'action_plugins' => array(),
'path' => array('procmail', 'spool'),
'match_plugins' => array(),
'action_plugins' => array(),
- 'global_plugin' => array()
+ 'global_plugins' => array(),
+ 'i18n' => array()
);
$this->err = "";
}
);
$this->err = "";
}
+ /** returns the i18n string
+ * @param $_index the index of the string
+ * @returns the string or false
+ */
+ function i18n($_index) {
+ if(isset($this->config['i18n'][$_index]))
+ return $this->config['i18n'][$_index];
+ return false;
+ }
+
/** returns the error.
* @return the error string
*/
/** returns the error.
* @return the error string
*/
@@
-119,12
+133,12
@@
class Philter {
return false;
}
return false;
}
- if(isset($this->config['global_plugin'][$rtti])) {
+ if(isset($this->config['global_plugin
s
'][$rtti])) {
$this->err = "Philter::register_global_plugin : a plugin is already registerd";
return false;
}
$this->err = "Philter::register_global_plugin : a plugin is already registerd";
return false;
}
- $this->config['global_plugin'][$rtti] = $_plugin;
+ $this->config['global_plugin
s
'][$rtti] = $_plugin;
return true;
}
return true;
}