Merge "Return to LESS multiple value escape mechanism to prevent invalid output"
[lhc/web/wiklou.git] / includes / skins / Skin.php
index e31bc06..7a2679e 100644 (file)
@@ -716,10 +716,12 @@ abstract class Skin extends ContextSource {
         */
        function getUndeleteLink() {
                $action = $this->getRequest()->getVal( 'action', 'view' );
+               $title = $this->getTitle();
 
-               if ( $this->getTitle()->userCan( 'deletedhistory', $this->getUser() ) &&
-                       ( !$this->getTitle()->exists() || $action == 'history' ) ) {
-                       $n = $this->getTitle()->isDeleted();
+               if ( ( !$title->exists() || $action == 'history' ) &&
+                       $title->userCan( 'deletedhistory', $this->getUser() )
+               ) {
+                       $n = $title->isDeleted();
 
                        if ( $n ) {
                                if ( $this->getTitle()->quickUserCan( 'undelete', $this->getUser() ) ) {