From: Alexandre Emsenhuber Date: Thu, 29 Sep 2011 19:03:57 +0000 (+0000) Subject: Per Aaron, fix for r98012: make Title object be handled correctly and document where... X-Git-Tag: 1.31.0-rc.0~27367 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_del%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=b5cbe8d677bad5dc06fbfff98949be041e0bb868;p=lhc%2Fweb%2Fwiklou.git Per Aaron, fix for r98012: make Title object be handled correctly and document where there can now be a Title object --- diff --git a/docs/hooks.txt b/docs/hooks.txt index d661e9dfb9..72a8e55282 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1191,8 +1191,8 @@ $code: language code 'LogEventsListShowLogExtract': called before the string is added to OutputPage. Returning false will prevent the string from being added to the OutputPage &$s: html string to show for the log extract -$types: String or Array (''isn't documented on showLogExtract() yet, not sure what it is'') -$page: String The page title to show log entries for +$types: String or Array Log types to show +$page: String or Title The page title to show log entries for $user: String The user who made the log entries $param: Associative Array with the following additional options: - lim Integer Limit of items to show, default is 50 diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 4df521bd79..284e537f4d 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -600,8 +600,8 @@ class LogEventsList { * Show log extract. Either with text and a box (set $msgKey) or without (don't set $msgKey) * * @param $out OutputPage|String-by-reference - * @param $types String or Array - * @param $page String The page title to show log entries for + * @param $types String|Array Log types to show + * @param $page String|Title The page title to show log entries for * @param $user String The user who made the log entries * @param $param Associative Array with the following additional options: * - lim Integer Limit of items to show, default is 50 @@ -679,8 +679,11 @@ class LogEventsList { } if( $pager->getNumRows() > $pager->mLimit ) { # Show "Full log" link $urlParam = array(); - if ( $page != '') + if ( $page instanceof Title ) { + $urlParam['page'] = $page->getPrefixedDBkey(); + } elseif ( $page != '' ) { $urlParam['page'] = $page; + } if ( $user != '') $urlParam['user'] = $user; if ( !is_array( $types ) ) # Make it an array, if it isn't @@ -758,7 +761,7 @@ class LogPager extends ReverseChronologicalPager { * @param $list LogEventsList * @param $types String or Array: log types to show * @param $performer String: the user who made the log entries - * @param $title String or Title: the page title the log entries are for + * @param $title String|Title: the page title the log entries are for * @param $pattern String: do a prefix search rather than an exact title match * @param $conds Array: extra conditions for the query * @param $year Integer: the year to start from