|
@@ 511-514 (lines=4) @@
|
| 508 |
|
showPage($page, $id); |
| 509 |
|
break; |
| 510 |
|
|
| 511 |
|
case 'restore': |
| 512 |
|
$success = $wikiPage->setRevision($page, $id); |
| 513 |
|
redirect_header('pages.php?page=' . $page . '&op=history', 2, $success ? _MD_GWIKI_DBUPDATED : _MD_GWIKI_ERRORINSERT); |
| 514 |
|
break; |
| 515 |
|
|
| 516 |
|
case 'fix': |
| 517 |
|
confirmAction('fix', $page, Request::getInt('id', 0, 'GET')); |
|
@@ 520-523 (lines=4) @@
|
| 517 |
|
confirmAction('fix', $page, Request::getInt('id', 0, 'GET')); |
| 518 |
|
break; |
| 519 |
|
|
| 520 |
|
case 'fixit': |
| 521 |
|
$success = fixRevision($page, $id); |
| 522 |
|
redirect_header('pages.php?page=' . $page . '&op=history', 2, $success ? _MD_GWIKI_DBUPDATED : _MD_GWIKI_ERRORINSERT); |
| 523 |
|
break; |
| 524 |
|
|
| 525 |
|
case 'tool': |
| 526 |
|
showPageTool($page, Request::getInt('id', 0, 'GET')); |
|
@@ 540-546 (lines=7) @@
|
| 537 |
|
confirmAction('delete', $page); |
| 538 |
|
break; |
| 539 |
|
|
| 540 |
|
case 'deleteit': |
| 541 |
|
// mark all versions inactive -- these will disappear as they age and the database is cleaned |
| 542 |
|
$sql = 'UPDATE ' . $xoopsDB->prefix('gwiki_pages') . " SET active = 0 WHERE keyword='{$page}' "; |
| 543 |
|
|
| 544 |
|
$success = $xoopsDB->query($sql); |
| 545 |
|
redirect_header('pages.php?op=manage', 2, $success ? _MD_GWIKI_DBUPDATED : _MD_GWIKI_ERRORINSERT); |
| 546 |
|
break; |
| 547 |
|
|
| 548 |
|
case 'clean': |
| 549 |
|
confirmAction('clean'); |
|
@@ 572-577 (lines=6) @@
|
| 569 |
|
confirmAction('lock', $page); |
| 570 |
|
break; |
| 571 |
|
|
| 572 |
|
case 'lockit': |
| 573 |
|
$sql = 'UPDATE ' . $xoopsDB->prefix('gwiki_pages') . " SET admin_lock = 1 WHERE keyword='{$page}' "; |
| 574 |
|
|
| 575 |
|
$success = $xoopsDB->query($sql); |
| 576 |
|
redirect_header('pages.php?op=manage', 2, $success ? _MD_GWIKI_DBUPDATED : _MD_GWIKI_ERRORINSERT); |
| 577 |
|
break; |
| 578 |
|
|
| 579 |
|
case 'unlock': |
| 580 |
|
confirmAction('unlock', $page); |
|
@@ 583-588 (lines=6) @@
|
| 580 |
|
confirmAction('unlock', $page); |
| 581 |
|
break; |
| 582 |
|
|
| 583 |
|
case 'unlockit': |
| 584 |
|
$sql = 'UPDATE ' . $xoopsDB->prefix('gwiki_pages') . " SET admin_lock = 0 WHERE keyword='{$page}' "; |
| 585 |
|
|
| 586 |
|
$success = $xoopsDB->query($sql); |
| 587 |
|
redirect_header('pages.php?op=manage', 2, $success ? _MD_GWIKI_DBUPDATED : _MD_GWIKI_ERRORINSERT); |
| 588 |
|
break; |
| 589 |
|
|
| 590 |
|
case 'partition': |
| 591 |
|
if (checkForPartitions()) { |