Jelajahi Sumber

fixed UI inline js and css

Piotr Labudda 7 tahun lalu
induk
melakukan
d1c43d580d
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      SE/se-lib/UI.php

+ 3 - 3
SE/se-lib/UI.php

@@ -274,7 +274,7 @@ class UI {
 		foreach ($jsonVars as $name => $var) {
 			echo "var {$name} = " . json_encode($var) . ";\n";
 		}
-		include $jsFile;
+		echo file_get_contents($jsFile);
 		echo "})(window)" . "\n";
 		UI::endTag('script', "\n");
 	}
@@ -282,13 +282,13 @@ class UI {
 	public static function inlineRawJS($jsFile) {
 		if (!file_exists($jsFile)) throw new Exception("js file '" . basename($jsFile) . "' not exists!");
 		UI::startTag('script', [], "\n");
-		include $jsFile;
+		echo file_get_contents($jsFile);
 		UI::endTag('script', "\n");
 	}
 
 	public static function inlineCSS($cssFile) {
 		UI::startTag('style', ['type'=>"text/css"], "\n");
-		include $cssFile;
+		echo file_get_contents($cssFile);
 		UI::endTag('style', "\n");
 	}