aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Controllers')
-rw-r--r--h-source/Application/Controllers/GenericController.php26
-rw-r--r--h-source/Application/Controllers/HistoryController.php2
2 files changed, 27 insertions, 1 deletions
diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php
index 2e7a45b..ed36952 100644
--- a/h-source/Application/Controllers/GenericController.php
+++ b/h-source/Application/Controllers/GenericController.php
@@ -236,6 +236,8 @@ class GenericController extends BaseController
if (!$this->s['registered']->checkCsrf($clean['token'])) $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'wrong token..');
if ($this->m['UsersModel']->isBlocked($this->s['registered']->status['id_user'])) $this->redirect('my/home/'.$this->lang,2,'your account has been blocked..');
+
+ if ($this->m['HardwareModel']->isCleared($clean['id_hard'])) $this->redirect('generic/cleared/'.$this->lang,0);
$deleted = $this->m['HardwareModel']->select("hardware.deleted")->where(array("id_hard"=>$clean['id_hard']))->limit(1)->toList('deleted')->send();
@@ -472,6 +474,17 @@ class GenericController extends BaseController
$this->append($data);
}
+ public function cleared($lang = 'en')
+ {
+ $data['title'] = 'page permanently deleted - '.Website::$generalName;
+
+ $data['tree'] = "device page permanently deleted";
+
+ $this->append($data);
+
+ $this->loadViewAll('cleared');
+ }
+
protected function view($lang = 'en', $id_hard = 0, $name = null)
{
$this->shift(3);
@@ -488,6 +501,8 @@ class GenericController extends BaseController
$data['isDeleted'] = false;
$data['md_javascript'] = "moderator_dialog(\"devicehide\",\"device\");moderator_dialog(\"deviceshow\",\"device\");moderator_dialog(\"deviceapprove\",\"device_app\");moderator_dialog(\"deviceclear\",\"device_cl\");";
+
+ if ($this->m['HardwareModel']->isCleared($clean['id_hard'])) $this->redirect('generic/cleared/'.$this->lang,0);
if ($this->mod->checkType($clean['id_hard']))
{
@@ -542,6 +557,8 @@ class GenericController extends BaseController
$data['title'] = 'history - '.Website::$generalName;
$data['isDeleted'] = $this->m['HardwareModel']->isDeleted($clean['id']);
+
+ if ($this->m['HardwareModel']->isCleared($clean['id'])) $this->redirect('generic/cleared/'.$this->lang,0);
//get the first revision
$res = $this->m['RevisionsModel']->db->select('revisions','id_rev','id_hard='.$clean['id'],null,'id_rev',1);
@@ -595,6 +612,9 @@ class GenericController extends BaseController
if (count($data['table']) > 0)
{
$data['id_hard'] = (int)$data['table'][0]['revisions']['id_hard'];
+
+ if ($this->m['HardwareModel']->isCleared($data['id_hard'])) $this->redirect('generic/cleared/'.$this->lang,0);
+
$data['ne_name'] = $this->m['HardwareModel']->getTheModelName($data['id_hard']);
$data['name'] = encodeUrl($data['ne_name']);
$data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($data['id_hard'],$data['ne_name'])." &raquo; " . $this->getHistoryLink($data['id_hard']) . " &raquo; <span class='last_tree_element'>revision</span>";
@@ -627,6 +647,8 @@ class GenericController extends BaseController
$data['showDiff'] = false;
$diffArray = array();
+
+ if ($this->m['HardwareModel']->isCleared($clean['id_hard'])) $this->redirect('generic/cleared/'.$this->lang,0);
if (strcmp($clean['id_hard'],0) !== 0 and strcmp($clean['id_rev'],0) !== 0)
{
@@ -692,6 +714,8 @@ class GenericController extends BaseController
$clean['id_rev'] = (int)$id_rev;
$clean['id_hard'] = (int)$this->m['RevisionsModel']->getIdHard($clean['id_rev']);
+
+ if ($this->m['HardwareModel']->isCleared($clean['id_hard'])) $this->redirect('generic/cleared/'.$this->lang,0);
if ($clean['id_hard'] !== 0)
{
@@ -751,6 +775,8 @@ class GenericController extends BaseController
$data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($clean['id_hard'],$data['ne_name'])." &raquo; <span class='last_tree_element'>talk</span>";
$data['isDeleted'] = $this->m['HardwareModel']->isDeleted($clean['id_hard']);
+
+ if ($this->m['HardwareModel']->isCleared($clean['id_hard'])) $this->redirect('generic/cleared/'.$this->lang,0);
if (isset($_POST['insertAction']))
{
diff --git a/h-source/Application/Controllers/HistoryController.php b/h-source/Application/Controllers/HistoryController.php
index ee68381..8c14bb0 100644
--- a/h-source/Application/Controllers/HistoryController.php
+++ b/h-source/Application/Controllers/HistoryController.php
@@ -195,7 +195,7 @@ class HistoryController extends BaseController
'to_status' => 'yes',
'exec_string' => 'The device page has been permanently deleted. Just reload the page',
'error_string' => 'Error: the device page has already been permanently deleted',
-// 'method' => 'oupdate',
+ 'method' => 'permanentlyDelete',
),
);