Index: trunk/phase3/includes/Image.php |
— | — | @@ -41,7 +41,8 @@ |
42 | 42 | */ |
43 | 43 | function Image( $name, $recache = false ) { |
44 | 44 | |
45 | | - global $wgUseSharedUploads, $wgUseLatin1, $wgSharedLatin1, $wgLang, $wgMemc, $wgDBname; |
| 45 | + global $wgUseSharedUploads, $wgUseLatin1, $wgSharedLatin1, $wgLang, $wgMemc, $wgDBname, |
| 46 | + $wgSharedUploadDBname; |
46 | 47 | |
47 | 48 | $this->name = $name; |
48 | 49 | $this->title = Title::makeTitleSafe( NS_IMAGE, $this->name ); |
— | — | @@ -811,7 +812,7 @@ |
812 | 813 | |
813 | 814 | if ( $id == 0 ) { |
814 | 815 | $article = new Article( $descTitle ); |
815 | | - $article->insertNewArticle( $textdesc, $desc, false, false ); |
| 816 | + $article->insertNewArticle( $textdesc, $desc, false, false, true ); |
816 | 817 | } |
817 | 818 | } else { |
818 | 819 | # Collision, this is an update of an image |
Index: trunk/phase3/includes/SpecialLog.php |
— | — | @@ -260,7 +260,7 @@ |
261 | 261 | $comment = $this->skin->commentBlock( $s->log_comment ); |
262 | 262 | $paramArray = LogPage::extractParams( $s->log_params ); |
263 | 263 | |
264 | | - $action = LogPage::actionText( $s->log_type, $s->log_action, $titleLink, $paramArray ); |
| 264 | + $action = LogPage::actionText( $s->log_type, $s->log_action, $titleLink, $paramArray, true ); |
265 | 265 | $out = "<li>$time $userLink $action $comment</li>\n"; |
266 | 266 | return $out; |
267 | 267 | } |
Index: trunk/phase3/includes/LogPage.php |
— | — | @@ -141,7 +141,7 @@ |
142 | 142 | /** |
143 | 143 | * @static |
144 | 144 | */ |
145 | | - function actionText( $type, $action, $titleLink = NULL, $params = array() ) { |
| 145 | + function actionText( $type, $action, $titleLink = NULL, $params = array(), $filterWikilinks=false ) { |
146 | 146 | static $actions = array( |
147 | 147 | 'block/block' => 'blocklogentry', |
148 | 148 | 'block/unblock' => 'unblocklogentry', |
— | — | @@ -158,17 +158,22 @@ |
159 | 159 | $key = "$type/$action"; |
160 | 160 | if( isset( $actions[$key] ) ) { |
161 | 161 | if( is_null( $titleLink ) ) { |
162 | | - return wfMsgForContent( $actions[$key] ); |
| 162 | + $rv=wfMsgForContent( $actions[$key] ); |
163 | 163 | } elseif ( count( $params ) == 0 ) { |
164 | | - return wfMsgForContent( $actions[$key], $titleLink ); |
| 164 | + $rv=wfMsgForContent( $actions[$key], $titleLink ); |
165 | 165 | } else { |
166 | 166 | array_unshift( $params, $titleLink ); |
167 | | - return wfMsgReal( $actions[$key], $params, true, true ); |
| 167 | + $rv=wfMsgReal( $actions[$key], $params, true, true ); |
168 | 168 | } |
169 | 169 | } else { |
170 | 170 | wfDebug( "LogPage::actionText - unknown action $key\n" ); |
171 | | - return "$action $titleLink"; |
| 171 | + $rv="$action $titleLink"; |
172 | 172 | } |
| 173 | + if($filterWikilinks) { |
| 174 | + $rv=str_replace("[[","",$rv); |
| 175 | + $rv=str_replace("]]","",$rv); |
| 176 | + } |
| 177 | + return $rv; |
173 | 178 | } |
174 | 179 | |
175 | 180 | /** |