Add a function that returns a list of categories the page is a member of
[lhc/web/wiklou.git] / includes / OutputPage.php
index 96a503e..83a7d3f 100644 (file)
@@ -3024,6 +3024,7 @@ $templates
                        'wgCurRevisionId' => $latestRevID,
                        'wgArticleId' => $pageID,
                        'wgIsArticle' => $this->isArticle(),
+                       'wgIsRedirect' => $title->isRedirect(),
                        'wgAction' => Action::getActionName( $this->getContext() ),
                        'wgUserName' => $user->isAnon() ? null : $user->getName(),
                        'wgUserGroups' => $user->getEffectiveGroups(),
@@ -3051,6 +3052,8 @@ $templates
                if ( $wgContLang->hasVariants() ) {
                        $vars['wgUserVariant'] = $wgContLang->getPreferredVariant();
                }
+               // Same test as SkinTemplate
+               $vars['wgIsProbablyEditable'] = $title->quickUserCan( 'edit', $user ) && ( $title->exists() || $title->quickUserCan( 'create', $user ) );
                foreach ( $title->getRestrictionTypes() as $type ) {
                        $vars['wgRestriction' . ucfirst( $type )] = $title->getRestrictions( $type );
                }