aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-10-03 22:30:58 +0200
committerKevin Chabowski <kevin@kch42.de>2013-10-03 22:30:58 +0200
commit78c95c09f05e4fa12b66bd27714ce4889a892c21 (patch)
tree7827469ff419391efec3271576395d567ec5bc4f
parentb302319e6c62f6b31d53197a08134c6c9bf8735b (diff)
downloadratatoeskr-cms-78c95c09f05e4fa12b66bd27714ce4889a892c21.tar.gz
ratatoeskr-cms-78c95c09f05e4fa12b66bd27714ce4889a892c21.tar.bz2
ratatoeskr-cms-78c95c09f05e4fa12b66bd27714ce4889a892c21.zip
Fixed referencing and constants.
* Creating a varaible reference at call time is not possbile any more. * When defining a constant, we pass the name as a string now.
-rw-r--r--ratatoeskr/backend.php2
-rw-r--r--ratatoeskr/frontend.php2
-rw-r--r--ratatoeskr/main.php2
-rw-r--r--ratatoeskr/sys/init_ste.php2
-rw-r--r--ratatoeskr/sys/translation.php4
5 files changed, 6 insertions, 6 deletions
diff --git a/ratatoeskr/backend.php b/ratatoeskr/backend.php
index 2db82d7..f043a47 100644
--- a/ratatoeskr/backend.php
+++ b/ratatoeskr/backend.php
@@ -2002,7 +2002,7 @@ $backend_subactions = url_action_subactions(array(
echo $ste->exectemplate("/systemtemplates/confirminstall.html");
}
)),
- "pluginpages" => url_action_subactions(&$pluginpages_handlers)
+ "pluginpages" => url_action_subactions($pluginpages_handlers)
));
}
diff --git a/ratatoeskr/frontend.php b/ratatoeskr/frontend.php
index 76b0afc..9c43ec5 100644
--- a/ratatoeskr/frontend.php
+++ b/ratatoeskr/frontend.php
@@ -665,7 +665,7 @@ function make_on_anything_tag($field)
{
return function($ste, $params, $sub) use ($field)
{
- if($ste->evalbool($ste->vars["current"][$field]))
+ if($ste->evalbool(@$ste->vars["current"][$field]))
{
if(!empty($params["var"]))
$ste->set_var_by_name($params["var"], $ste->vars["current"][$field]);
diff --git a/ratatoeskr/main.php b/ratatoeskr/main.php
index f1a641f..4fd22de 100644
--- a/ratatoeskr/main.php
+++ b/ratatoeskr/main.php
@@ -94,7 +94,7 @@ function _ratatoeskr()
echo $ste->exectemplate("/systemtemplates/error.html");
}));
- $urlpath = explode("/", $_GET["action"]);
+ $urlpath = explode("/", @$_GET["action"]);
$rel_path_to_root = implode("/", array_merge(array("."), array_repeat("..", count($urlpath) - 1)));
$GLOBALS["rel_path_to_root"] = $rel_path_to_root;
$data = array("rel_path_to_root" => $rel_path_to_root);
diff --git a/ratatoeskr/sys/init_ste.php b/ratatoeskr/sys/init_ste.php
index ae5cb95..6152683 100644
--- a/ratatoeskr/sys/init_ste.php
+++ b/ratatoeskr/sys/init_ste.php
@@ -23,7 +23,7 @@ if(!isset($ste))
* The global STECore (Stupid Template Engine) instance.
*/
$ste = new \ste\STECore(new \ste\FilesystemStorageAccess("$tpl_basedir/src", "$tpl_basedir/transc"));
- if(__DEBUG__)
+ if(defined("__DEBUG__") && __DEBUG__)
$ste->mute_runtime_errors = False;
}
diff --git a/ratatoeskr/sys/translation.php b/ratatoeskr/sys/translation.php
index 6c494db..1104bdb 100644
--- a/ratatoeskr/sys/translation.php
+++ b/ratatoeskr/sys/translation.php
@@ -15,7 +15,7 @@ require_once(dirname(__FILE__) . "/init_ste.php");
if(!defined("SETUP"))
require_once(dirname(__FILE__) . "/models.php");
-if(!defined(TRANSLATION_PLUGIN_LOADED))
+if(!defined("TRANSLATION_PLUGIN_LOADED"))
{
$ste->register_tag(
"get_translation",
@@ -28,7 +28,7 @@ if(!defined(TRANSLATION_PLUGIN_LOADED))
return (!empty($params["raw"])) ? $rv : htmlesc($rv);
}
);
- define(TRANSLATION_PLUGIN_LOADED, True);
+ define("TRANSLATION_PLUGIN_LOADED", True);
}
/*