From 45dd5ba8aae8b12aaf3e1e2573f4bca1edd00b90 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 30 Dec 2012 23:06:59 +0100 Subject: [PATCH] Print the id in the "page does not exist" message --- admin.php | 2 +- helper.php | 2 +- lang/en/lang.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin.php b/admin.php index d21166f..07b41bd 100644 --- a/admin.php +++ b/admin.php @@ -46,7 +46,7 @@ function getMenuText() { global $INFO; if( !$INFO['exists'] ) - return $this->getLang('menu').' ('.$this->getLang('pm_notexist').')'; + return $this->getLang('menu').' ('.sprintf($this->getLang('pm_notexist'), $INFO['id']).')'; elseif( !$INFO['writable'] ) return $this->getLang('menu').' ('.$this->getLang('pm_notwrite').')'; else diff --git a/helper.php b/helper.php index 0a225fe..c04e0dd 100644 --- a/helper.php +++ b/helper.php @@ -81,7 +81,7 @@ public function move_page(&$opts, $checkonly = false) { // Check we have rights to move this document if ( !page_exists($ID)) { - msg($this->getLang('pm_notexist'), -1); + msg(sprintf($this->getLang('pm_notexist'), $ID), -1); return false; } if ( auth_quickaclcheck($ID) < AUTH_EDIT ) { diff --git a/lang/en/lang.php b/lang/en/lang.php index 4659d70..235e13d 100644 --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -15,7 +15,7 @@ $lang['menu'] = 'Page/Namespace Move/Rename...'; $lang['desc'] = 'Page/Namespace Move/Rename Plugin'; -$lang['pm_notexist'] = 'This page does not exist'; +$lang['pm_notexist'] = 'The page %s does not exist'; $lang['pm_notwrite'] = 'You do not have sufficient permissions to modify this page'; $lang['pm_badns'] = 'Invalid characters in namespace.'; $lang['pm_badname'] = 'Invalid characters in pagename.';