mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
9eae07fae9
|
@ -37,8 +37,8 @@ class SeedDMS_ExtExample extends SeedDMS_ExtBase {
|
|||
*
|
||||
* Use this method to do some initialization like setting up the hooks
|
||||
* You have access to the following global variables:
|
||||
* $GLOBALS['settings'] : current global configuration
|
||||
* $GLOBALS['settings']->_extensions['example'] : configuration of this extension
|
||||
* $this->settings : current global configuration
|
||||
* $this->settings->_extensions['example'] : configuration of this extension
|
||||
* $GLOBALS['LANG'] : the language array with translations for all languages
|
||||
* $GLOBALS['SEEDDMS_HOOKS'] : all hooks added so far
|
||||
*/
|
||||
|
|
|
@ -29,4 +29,9 @@
|
|||
* @package SeedDMS
|
||||
*/
|
||||
class SeedDMS_ExtBase {
|
||||
var $settings;
|
||||
|
||||
public function __construct($settings) {
|
||||
$this->settings = $settings;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ foreach($extMgr->getExtensionConfiguration() as $extname=>$extconf) {
|
|||
$classfile = $settings->_rootDir."/ext/".$extname."/".$extconf['class']['file'];
|
||||
if(file_exists($classfile)) {
|
||||
include($classfile);
|
||||
$obj = new $extconf['class']['name'];
|
||||
$obj = new $extconf['class']['name']($settings);
|
||||
if(method_exists($obj, 'init'))
|
||||
$obj->init(isset($settings->_extensions[$extname]) ? $settings->_extensions[$extname] : null);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user