Code

fixed Smarty handling for GOsa 2.6
[gosa.git] / gosa-core / include / php_setup.inc
index e2cb35c7899e4dff269bde28f9fad52281794264..eaabceec0159a9c040b9c167c574ca779c88e727 100644 (file)
@@ -292,7 +292,13 @@ require("smarty/Smarty.class.php");
 $smarty = new Smarty;
 $smarty->template_dir = $BASE_DIR.'/ihtml/';
 $smarty->caching= false;
-$smarty->php_handling= SMARTY_PHP_REMOVE;
+
+// To be able to switch between smarty version 2/3                                                                      
+if(defined('SMARTY_PHP_REMOVE')){
+    $smarty->php_handling= SMARTY_PHP_REMOVE;
+}else{
+    $smarty->php_handling= Smarty::PHP_REMOVE;
+}
 
 /* Global FPDF define */
 define('FPDF_FONTPATH', '/usr/share/php/fpdf/font/');