فهرست منبع

Change the include for smarty template engine to a require_once

Mark Crane 11 سال پیش
والد
کامیت
166ebabc74
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      resources/classes/template.php

+ 2 - 2
resources/classes/template.php

@@ -40,14 +40,14 @@ include "root.php";
 
 
 			public function init() {
 			public function init() {
 				if ($this->engine === 'smarty') {
 				if ($this->engine === 'smarty') {
-					include "resources/templates/engine/smarty/Smarty.class.php";
+					require_once "resources/templates/engine/smarty/Smarty.class.php";
 					$this->object = new Smarty();
 					$this->object = new Smarty();
 					$this->object->setTemplateDir($this->template_dir);
 					$this->object->setTemplateDir($this->template_dir);
 					$this->object->setCompileDir($this->cache_dir);
 					$this->object->setCompileDir($this->cache_dir);
 					$this->object->setCacheDir($this->cache_dir);
 					$this->object->setCacheDir($this->cache_dir);
 				}
 				}
 				if ($this->engine === 'raintpl') {
 				if ($this->engine === 'raintpl') {
-					include "resources/templates/engine/raintpl/rain.tpl.class.php";
+					require_once "resources/templates/engine/raintpl/rain.tpl.class.php";
 					$this->object = new RainTPL();
 					$this->object = new RainTPL();
 					RainTPL::configure('tpl_dir', realpath($this->template_dir)."/");
 					RainTPL::configure('tpl_dir', realpath($this->template_dir)."/");
 					RainTPL::configure('cache_dir', realpath($this->cache_dir)."/");
 					RainTPL::configure('cache_dir', realpath($this->cache_dir)."/");