[Home]WikiBugs/ConfirmDeleteForHomePage

UseModWiki | WikiBugs | RecentChanges | Preferences

Since $HomePage can not be deleted by design, this fix saves one click, so user doesn't need to confirm for action not permitted.

Patch

Option 1

sub DoDeletePage {
...
-  if ($ConfirmDel && !&GetParam('confirm', 0)) {
+  if ($ConfirmDel && !&GetParam('confirm', 0) && ($id ne $HomePage)) {

Option 2

sub GetAdminBar {
...
$result .= &GetPageLockLink($id, 1, T('Lock page'));
  }
+  if  ($id eq $HomePage) {
+    $result .= " | " . Ts('Page non-deletable')
+  } else {
  $result .= " | " . &GetDeleteLink($id, T('Delete this page'), 0);
+  }
I put this in 'Possible Bugs' but it can also to be considered just another design question, then it would go to 'Not A Bug, or Will Not Fix'.

The only reasoning is to save some clicks. --JuanmaMP


UseModWiki | WikiBugs | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited September 25, 2007 9:03 pm by JuanmaMP (diff)
Search: