Use square brackets instead of curly braces for char of a string
[lhc/web/wiklou.git] / includes / Article.php
index 928fda0..ecbc59f 100644 (file)
@@ -1201,10 +1201,15 @@ class Article implements Page {
 
                wfRunHooks( 'ShowMissingArticle', array( $this ) );
 
+               // Give extensions a chance to hide their (unrelated) log entries
+               $logTypes = array( 'delete', 'move' );
+               $conds = array( "log_action != 'revision'" );
+               wfRunHooks( 'Article::MissingArticleConditions', array( &$conds, $logTypes ) );
+
                # Show delete and move logs
-               LogEventsList::showLogExtract( $outputPage, array( 'delete', 'move' ), $this->getTitle(), '',
+               LogEventsList::showLogExtract( $outputPage, $logTypes, $this->getTitle(), '',
                        array( 'lim' => 10,
-                               'conds' => array( "log_action != 'revision'" ),
+                               'conds' => $conds,
                                'showIfEmpty' => false,
                                'msgKey' => array( 'moveddeleted-notice' ) )
                );
@@ -1238,7 +1243,8 @@ class Article implements Page {
                } elseif ( $this->getTitle()->quickUserCan( 'create', $this->getContext()->getUser() )
                        && $this->getTitle()->quickUserCan( 'edit', $this->getContext()->getUser() )
                ) {
-                       $text = wfMessage( 'noarticletext' )->plain();
+                       $message = $this->getContext()->getUser()->isLoggedIn() ? 'noarticletext' : 'noarticletextanon';
+                       $text = wfMessage( $message )->plain();
                } else {
                        $text = wfMessage( 'noarticletext-nopermission' )->plain();
                }