Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Keep track of current application action

  • Loading branch information...
commit c271fe1d88360328c7443ca6f285e35c6378268e 1 parent 9d04eed
@haraldpdl haraldpdl authored
Showing with 30 additions and 1 deletion.
  1. +30 −1 osCommerce/OM/Core/ApplicationAbstract.php
View
31 osCommerce/OM/Core/ApplicationAbstract.php
@@ -11,8 +11,19 @@
abstract class ApplicationAbstract {
protected $_page_contents = 'main.php';
protected $_page_title;
+
+/**
+ * @since v3.0.3
+ */
+
protected $_ignored_actions = array();
+/**
+ * @since v3.0.3
+ */
+
+ protected $_current_action;
+
public function __construct() {
$this->initialize();
@@ -39,10 +50,18 @@ public function siteApplicationActionExists($action) {
return class_exists('osCommerce\\OM\\Core\\Site\\' . OSCOM::getSite() . '\\Application\\' . OSCOM::getSiteApplication() . '\\Action\\' . $action);
}
+/**
+ * @since v3.0.3
+ */
+
public function ignoreAction($key) {
$this->_ignored_actions[] = $key;
}
+/**
+ * @since v3.0.3
+ */
+
public function runActions() {
$action = null;
$action_index = 1;
@@ -61,7 +80,7 @@ public function runActions() {
}
if ( !empty($requested_action) && self::siteApplicationActionExists($requested_action) ) {
- $action = $requested_action;
+ $this->_current_action = $action = $requested_action;
}
}
@@ -80,6 +99,8 @@ public function runActions() {
call_user_func(array('osCommerce\\OM\\Core\\Site\\' . OSCOM::getSite() . '\\Application\\' . OSCOM::getSiteApplication() . '\\Action\\' . implode('\\', $action) . '\\' . $subaction, 'execute'), $this);
$action[] = $subaction;
+
+ $this->_current_action = $subaction;
} else {
break;
}
@@ -87,5 +108,13 @@ public function runActions() {
}
}
}
+
+/**
+ * @since v3.0.3
+ */
+
+ public function getCurrentAction() {
+ return $this->_current_action;
+ }
}
?>
Please sign in to comment.
Something went wrong with that request. Please try again.