packages: phorum/paths.patch - fixes in module loading
glen
glen at pld-linux.org
Wed Jan 13 20:45:08 CET 2010
Author: glen Date: Wed Jan 13 19:45:08 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- fixes in module loading
---- Files affected:
packages/phorum:
paths.patch (1.11 -> 1.12)
---- Diffs:
================================================================
Index: packages/phorum/paths.patch
diff -u packages/phorum/paths.patch:1.11 packages/phorum/paths.patch:1.12
--- packages/phorum/paths.patch:1.11 Tue Jan 12 18:41:33 2010
+++ packages/phorum/paths.patch Wed Jan 13 20:45:03 2010
@@ -290,3 +290,65 @@
$add .= ob_get_contents();
ob_end_clean();
break;
+--- phorum/include/admin/header.php~ 2010-01-13 19:03:16.000000000 +0200
++++ phorum/include/admin/header.php 2010-01-13 21:30:22.607156616 +0200
+@@ -25,7 +25,7 @@
+ if (!file_exists("./include/lang/${lang}.php")) {
+ $lang = PHORUM_DEFAULT_LANGUAGE;
+ }
+- require_once PHORUM_INCLUDES_DIR.'/lang/{$lang}.php';
++ require_once PHORUM_INCLUDES_DIR."/lang/{$lang}.php";
+ }
+
+ // HTTP Content-Type header with the charset from the default language
+--- phorum/htdocs/admin.php 2010-01-13 21:31:15.510488551 +0200
++++ phorum/htdocs/admin.php 2010-01-13 21:33:38.367557450 +0200
+@@ -77,7 +77,7 @@
+ } elseif(isset($_GET["module"]) && is_scalar($_GET["module"])){
+ $module = @basename($_GET["module"]);
+ }
+- if(empty($module) || !file_exists("./include/admin/$module.php")){
++ if(empty($module) || !file_exists(PHORUM_INCLUDES_DIR."/admin/$module.php")){
+ $module = "default";
+ }
+ // check the admin token
+@@ -105,7 +105,7 @@
+ $module = phorum_hook( "admin_pre", $module );
+ ob_start();
+ if($module!="help") require_once PHORUM_INCLUDES_DIR.'/admin/header.php';
+- require_once PHORUM_INCLUDES_DIR.'/admin/$module.php';
++ require_once PHORUM_INCLUDES_DIR."/admin/$module.php";
+ if($module!="help") require_once PHORUM_INCLUDES_DIR.'/admin/footer.php';
+ ob_end_flush();
+
+--- phorum/include/api/modules.php~ 2010-01-13 19:03:16.000000000 +0200
++++ phorum/include/api/modules.php 2010-01-13 21:36:05.906916979 +0200
+@@ -95,10 +95,10 @@
+
+ require_once PHORUM_INCLUDES_DIR.'/version_functions.php';
+
+- $dh = opendir("./mods");
++ $dh = opendir(PHORUM_DIR."/mods");
+ if (! $dh) trigger_error(
+ "Unable to create a list of available modules: " .
+- "opendir of directory \"./mods\" failed.",
++ "opendir of directory \"mods\" failed.",
+ E_USER_ERROR
+ );
+
+@@ -116,11 +116,11 @@
+
+ // Read in the module information.
+ $lines = array();
+- if (file_exists("./mods/$entry/info.txt")) {
+- $lines = file("./mods/$entry/info.txt");
+- } elseif (is_file("./mods/$entry") && substr($entry, -4)==".php") {
++ if (file_exists(PHORUM_DIR."/mods/$entry/info.txt")) {
++ $lines = file(PHORUM_DIR."/mods/$entry/info.txt");
++ } elseif (is_file(PHORUM_DIR."/mods/$entry") && substr($entry, -4)==".php") {
+ $entry = str_replace(".php", "", $entry);
+- $data = file_get_contents("./mods/$entry.php");
++ $data = file_get_contents(PHORUM_DIR."/mods/$entry.php");
+ if($data = stristr($data, "/* phorum module info")){
+ $data = substr($data, 0, strpos($data, "*/"));
+ $lines = preg_split('!(\r|\n|\r\n)!', $data);
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/phorum/paths.patch?r1=1.11&r2=1.12&f=u
More information about the pld-cvs-commit
mailing list