cvs: pear /Forum/frontend post.php /Forum/lib forum.php /Forum/lib/classes/db MysqlStandard.php /Forum/lib/plugins plugin.php
| From: | Morgan Christiansson | Date: | Sun, 07 Oct 2001 16:46:46 +0000 |
| Subject: | cvs: pear /Forum/frontend post.php /Forum/lib forum.php /Forum/lib/classes/db MysqlStandard.php /Forum/lib/plugins plugin.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-949@lists.php.net to get a copy of this message | ||
mog Sun Oct 7 12:46:46 2001 EDT
Modified files:
/pear/Forum/frontend post.php
/pear/Forum/lib forum.php
/pear/Forum/lib/classes/db MysqlStandard.php
/pear/Forum/lib/plugins plugin.php
Log:
Fixed a few bugs.
Index: pear/Forum/frontend/post.php
diff -u pear/Forum/frontend/post.php:1.1 pear/Forum/frontend/post.php:1.2
--- pear/Forum/frontend/post.php:1.1 Sat Oct 6 17:59:42 2001
+++ pear/Forum/frontend/post.php Sun Oct 7 12:46:45 2001
@@ -24,8 +24,8 @@
include($post->skin->dir."/header.tpl.php");
$post->display();
} else {
- header("Location: ".phorum_get_url(FORUM_LIST,$post->forum_id));
- exit;
+ header("Location: ".forum_get_url(FORUM_LIST,$post->forum_id));
+ exit();
}
} else {
$post->get_settings();
Index: pear/Forum/lib/forum.php
diff -u pear/Forum/lib/forum.php:1.1 pear/Forum/lib/forum.php:1.2
--- pear/Forum/lib/forum.php:1.1 Sat Oct 6 17:59:42 2001
+++ pear/Forum/lib/forum.php Sun Oct 7 12:46:45 2001
@@ -45,20 +45,23 @@
define("FORUM_LONG_DATE", "LONG_DATE_FORMAT");
-//error_reporting(error_reporting() ^ E_USER_NOTICE);
-error_reporting(E_ALL);
+function my_var_dump($var) {
+ global $FORUM;
+ if(!$FORUM["DEBUG"]) { trigger_error("var_dump called when not in
debug",E_USER_WARNING); }
+ print "<DIV ALIGN=\"left\"><PRE>";var_dump($var);print
"</PRE></DIV>";
+}
if($FORUM["DEBUG"]==TRUE) {
error_reporting(E_ALL);
- function my_var_dump($var) {
- print "<DIV ALIGN=\"left\"><PRE>";var_dump($var);print
"</PRE></DIV>";
- }
-
+
function my_print_r($var) {
print "<DIV ALIGN=\"left\"><PRE>";print_r($var);print
"</PRE></DIV>";
}
+} else {
+ error_reporting(error_reporting() ^ E_USER_NOTICE);
}
+
function forum_error_handler($errmode, $errstr, $errfile, $errline)
{
Index: pear/Forum/lib/classes/db/MysqlStandard.php
diff -u pear/Forum/lib/classes/db/MysqlStandard.php:1.1
pear/Forum/lib/classes/db/MysqlStandard.php:1.2
--- pear/Forum/lib/classes/db/MysqlStandard.php:1.1 Sat Oct 6 17:59:43 2001
+++ pear/Forum/lib/classes/db/MysqlStandard.php Sun Oct 7 12:46:45 2001
@@ -243,7 +243,7 @@
}
// something tells me using sprintf wasn't() really a good idea. -Mog
- $message["email_reply"] = $this->bool2yn($message["email_eply"]);
+ $message["email_reply"] = $this->bool2yn($message["email_reply"]);
$message["approved"] = $this->bool2yn($message["approved"]);
Index: pear/Forum/lib/plugins/plugin.php
diff -u pear/Forum/lib/plugins/plugin.php:1.1 pear/Forum/lib/plugins/plugin.php:1.2
--- pear/Forum/lib/plugins/plugin.php:1.1 Sat Oct 6 18:08:21 2001
+++ pear/Forum/lib/plugins/plugin.php Sun Oct 7 12:46:45 2001
@@ -32,7 +32,16 @@
if(is_array($FORUM["PLUGINS"])) return TRUE;
$FORUM["PLUGINS"] = array();
- $dir = opendir("$FORUM[LIB]/plugins");
+ $include_paths = explode(":",ini_get("include_path"));
+ my_var_dump($include_paths);
+ foreach($include_paths as $include_path) {
+ if(@is_dir($plugindir = $include_path."/".$FORUM["LIB"])) {
+ break;
+ } else {
+ trigger_error($plugindir.'Doesn\'t exist',E_USER_NOTICE);
+ }
+ }
+ $dir = opendir("$plugindir");
if(!$dir) {
trigger_error("Failed to list $FORUM[LIB]",E_USER_WARNING);
return FALSE;