From 641071abf0008f6bd85eabbe40b451c7544eb615 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 21 May 2005 16:30:26 +0000 Subject: [PATCH] r176: Switching to the Message_Reporter::redirect() method of redirection --- attachment.php | 4 ++-- editcomment.php | 2 +- editreport.php | 2 +- login.php | 9 +++------ newcomment.php | 2 +- newreport.php | 2 +- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/attachment.php b/attachment.php index 7a0f7a2..fc9d025 100755 --- a/attachment.php +++ b/attachment.php @@ -53,7 +53,7 @@ if ($_REQUEST['do'] == 'kill') $log->allowempty = true; $log->log(); - echo "attachment removed"; + $message->redirect('attachment removed', "showreport.php?bugid=$bug[bugid]"); } // ################################################################### @@ -169,7 +169,7 @@ if ($_POST['do'] == 'insert') // update the last post data $db->query("UPDATE " . TABLE_PREFIX . "bug SET lastposttime = $time, lastpostby = " . $bugsys->userinfo['userid'] . " WHERE bugid = $bug[bugid]"); - echo "attachment added"; + $message->redirect('attachment added', "showreport.php?bugid=$bug[bugid]"); } // ################################################################### diff --git a/editcomment.php b/editcomment.php index 5795081..42f53fd 100644 --- a/editcomment.php +++ b/editcomment.php @@ -89,7 +89,7 @@ if ($_POST['do'] == 'update') $log->arguments = array($comment['commentid']); $log->log(); - echo "comment saved"; + $message->redirect('comment saved', "showreport.php?bugid=$bug[bugid]"); } // ################################################################### diff --git a/editreport.php b/editreport.php index 3f60216..25e3b84 100644 --- a/editreport.php +++ b/editreport.php @@ -173,7 +173,7 @@ if ($_POST['do'] == 'update') } else { - echo "done with update bug"; + $message->redirect('done with update bug', "showreport.php?bugid=$bug[bugid]"); } } diff --git a/login.php b/login.php index 9d688c3..a2adcc1 100755 --- a/login.php +++ b/login.php @@ -74,10 +74,7 @@ if ($_POST['do'] == 'login' OR $_POST['do'] == 'cplogin') $message->error('Invalid email or password.'); } - - echo 'You are now logged in :-)'; - - header("Location: $url"); + $message->redirect('You are now logged in :-)', $url); } // ################################################################### @@ -103,11 +100,11 @@ if ($_REQUEST['do'] == 'cplogout') if ($_COOKIE[COOKIE_PREFIX . 'adminsession']) { $funct->cookie(COOKIE_PREFIX . 'adminsession'); - echo 'logged out'; + $message->redirect('logged out', 'admin/'); } else { - echo 'you are not logged in'; + $message->error('you are not logged in'); } } diff --git a/newcomment.php b/newcomment.php index 7421572..85b6e32 100644 --- a/newcomment.php +++ b/newcomment.php @@ -63,7 +63,7 @@ if ($_POST['do'] == 'insert') $log->arguments = array($commentid); $log->log(); - echo "in['bugid']) . "\">comment inserted"; + $message->redirect('comment inesrted', "showreport.php?bugid=" . intval($bugsys->in['bugid'])); } // ################################################################### diff --git a/newreport.php b/newreport.php index f404b7e..5acb6f9 100755 --- a/newreport.php +++ b/newreport.php @@ -129,7 +129,7 @@ if ($_POST['do'] == 'insert') $db->query("UPDATE " . TABLE_PREFIX . "bug SET dateline = $time, initialreport = $initialreport, lastposttime = $time, lastpostby = " . $bugsys->userinfo['userid'] . " WHERE bugid = $bugid"); - echo "bug is done!"; + $message->redirect('bug is done!', "showreport.php?bugid=$bugid"); } // ################################################################### -- 2.43.5