Porting plugin engine to PHP4

master
pecesama 2008-11-07 01:51:28 +00:00
parent d29e8298aa
commit fa676b0fa4
3 changed files with 9 additions and 7 deletions

View File

@ -233,7 +233,7 @@ if ($user->isAdmin()) {
<option value="0" <?php if(!$conf->check_version) echo "selected=\"selected\""; ?>><?php echo __("Deactive")?></option>
</select>
</li>
<?php
<?php print_r($trigger);echo "<br>";die("Antes de trigger->call add options panel");
$trigger->call('add_options_panel');
?>
</ul>

View File

@ -66,12 +66,14 @@ if(!defined('entry') || !entry) die('Not a valid page');
return $this->exists[$name] = false;
}
function & instance(){
static $instance;
if( !isset($instance) ) {
$instance = new plugin();
function instance(){
//$instance;
if( !isset($GLOBALS['$instance']) ) {
$GLOBALS['$instance'] = new plugin();
}
return $instance;
//print_r($GLOBALS['$instance']);
//die();
return $GLOBALS['$instance'];
}
}

View File

@ -38,7 +38,7 @@ class kodrs extends plugins {
}
}
static function replace_with_geshi($matches) {
function replace_with_geshi($matches) {
$lang = strtolower($matches[1]) ;
$code = trim($matches[2]);
$geshi = new geshi($code, (isset($lang)) ? $lang : "");