From: River Tarnell Date: Thu, 8 May 2008 16:06:21 +0000 (+0000) Subject: on SJS Web Server with action paths, 'action' is always set. this caused WatchlistEd... X-Git-Tag: 1.31.0-rc.0~47813 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=6479b425011ed90a7e6ef46b827f1e0e84f5cb94;p=lhc%2Fweb%2Fwiklou.git on SJS Web Server with action paths, 'action' is always set. this caused WatchlistEditor::getMode() to ignore $par when deciding if the user is editing the watchlist, so it would always consider the action to be view. fix by giving precedence to $par over action. --- diff --git a/includes/WatchlistEditor.php b/includes/WatchlistEditor.php index 172cf4bcb3..6a39acb60f 100644 --- a/includes/WatchlistEditor.php +++ b/includes/WatchlistEditor.php @@ -431,7 +431,8 @@ class WatchlistEditor { * @return int */ public static function getMode( $request, $par ) { - $mode = strtolower( $request->getVal( 'action', $par ) ); + if (($mode = $par) === "") + $mode = strtolower( $request->getVal( 'action', "" ) ); switch( $mode ) { case 'clear': return self::EDIT_CLEAR;