2 small improvements on Module and AccueilModules
This commit is contained in:
parent
3574fc102c
commit
d610c66d75
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
function __autoload($class)
|
function __autoload($class)
|
||||||
{
|
{
|
||||||
$BASE_DIR = '/homez.9/shikiryu/www/test/trunk3/';
|
$BASE_DIR = $_SERVER['DOCUMENT_ROOT'].'/test/trunk3/'; // à modifier selon la configuration souhaitée
|
||||||
set_include_path($BASE_DIR);
|
set_include_path($BASE_DIR);
|
||||||
$path = 'modules/'.$class;
|
$path = 'modules/'.$class;
|
||||||
if(file_exists($path . DIRECTORY_SEPARATOR . ucfirst($class) . '.php') || file_exists($BASE_DIR . $path . DIRECTORY_SEPARATOR . ucfirst($class) . '.php')){
|
if(file_exists($path . DIRECTORY_SEPARATOR . ucfirst($class) . '.php') || file_exists($BASE_DIR . $path . DIRECTORY_SEPARATOR . ucfirst($class) . '.php')){
|
||||||
|
@ -80,7 +80,7 @@ class Module
|
|||||||
* Enregistre le paramètre dans le conf
|
* Enregistre le paramètre dans le conf
|
||||||
*/
|
*/
|
||||||
public function setParam($class, $key, $value) {
|
public function setParam($class, $key, $value) {
|
||||||
echo 'setting :'.$key.' as '.$value.' in the '.$class.'\'s module';
|
// echo 'setting :'.$key.' as '.$value.' in the '.$class.'\'s module';
|
||||||
$xmla = simplexml_load_file('../'.AccueilModules::CONFIG_FILE);
|
$xmla = simplexml_load_file('../'.AccueilModules::CONFIG_FILE);
|
||||||
|
|
||||||
$path = $xmla->xpath("//item[@id='".$class."']");
|
$path = $xmla->xpath("//item[@id='".$class."']");
|
||||||
|
Loading…
Reference in New Issue
Block a user