aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bottomley <JBottomley@Parallels.com>2013-04-28 08:49:57 -0700
committerJames Bottomley <JBottomley@Parallels.com>2013-04-28 08:49:57 -0700
commitf7b42ea5c24eefdb848202d938e773dac27ba4dd (patch)
treeca512f151943157a557c44ec4788ce11ead09c41
parent3e415efba84bcea8c3d568d55b597bea12e4731a (diff)
downloadasterisk-aastra-f7b42ea5c24eefdb848202d938e773dac27ba4dd.tar.gz
Refactor the $this->back url handler of BaseAastra.class
Almost everything sets it to the current URL, so make that the default behaviour. If you *don't* want a back action, set it to null. Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--include/BaseAastra.class.php1
-rw-r--r--include/Blacklist.class.php4
2 files changed, 1 insertions, 4 deletions
diff --git a/include/BaseAastra.class.php b/include/BaseAastra.class.php
index 50f21e7..7d35682 100644
--- a/include/BaseAastra.class.php
+++ b/include/BaseAastra.class.php
@@ -45,6 +45,7 @@ abstract class BaseAastra {
$this->fullurl = $this->url . $_SERVER['REQUEST_URI'];
$this->url .= $baseurl;
$this->user = $this->asm->get_user();
+ $this->back = $this->url;
}
function init() {
diff --git a/include/Blacklist.class.php b/include/Blacklist.class.php
index 9fd76ec..55984cb 100644
--- a/include/Blacklist.class.php
+++ b/include/Blacklist.class.php
@@ -28,7 +28,6 @@ class Blacklist extends BaseAastra {
}
function del_entry($list) {
- $this->back = $this->url;
if (isset($_GET['yesno'])) {
if ($_GET['yesno'] == 'yes') {
$this->asm->database_del($list, $this->lastnumber);
@@ -45,7 +44,6 @@ class Blacklist extends BaseAastra {
}
function black() {
- $this->back = $this->url;
if (isset($_GET['yesno'])) {
if ($_GET['yesno'] == 'yes') {
$this->asm->database_del('whitelist',$this->lastnumber);
@@ -65,7 +63,6 @@ class Blacklist extends BaseAastra {
$this->start();
return;
}
- $this->back = $this->url;
$this->displayObject(new AastraIPPhoneInputScreen());
$this->do->setParameter('num');
$this->do->setType('number');
@@ -83,7 +80,6 @@ class Blacklist extends BaseAastra {
$this->asm->database_put('whitelist',$this->lastnumber,'"'.$_GET['description'].'"');
return;
}
- $this->back = $this->url;
$this->displayObject(new AastraIPPhoneInputScreen());
$this->do->setParameter('description');
$this->do->setType('string');