Index: branches/unlabeled/unlabeled-1.15.2/core/kernel/utility/event.php =================================================================== diff -u -r5497 -r5726 --- branches/unlabeled/unlabeled-1.15.2/core/kernel/utility/event.php (.../event.php) (revision 5497) +++ branches/unlabeled/unlabeled-1.15.2/core/kernel/utility/event.php (.../event.php) (revision 5726) @@ -1,7 +1,7 @@ Init($prefix,$special); $this->Name = getArrayValue($params,'name'); } @@ -146,7 +146,7 @@ } if (isset($specificParams)) $this->specificParams = $specificParams; } - + function setEventParam($name,$value) { $this->specificParams[$name]=$value; @@ -158,14 +158,14 @@ array_unshift($args, $this->specificParams); return call_user_func_array('getArrayValue', $args); // getArrayValue($this->specificParams, $name); } - + function getPrefixSpecial($from_submit=false) { $separator=!$from_submit?'.':'_'; $ret=$this->Prefix.$separator.$this->Special; return rtrim($ret,$separator); } - + /** * Set's pseudo class that differs from * the one specified in $Prefix @@ -177,15 +177,15 @@ { $this->pseudoClass = $this->Prefix.$appendix; } - + function Init($prefix, $special = '') { $this->Prefix = $prefix; $this->pseudoClass = $prefix; // default value $this->Special = $special; $this->Prefix_Special = rtrim($this->Prefix.'.'.$this->Special,'.'); } - + /** * Returns object used in event * @@ -197,7 +197,7 @@ $object =& $this->Application->recallObject($this->Prefix_Special, $this->pseudoClass, $params); return $object; } - + /** * Calls passed event by name in current prefix/special environment * Called event gets this event as MasterEvent, @@ -216,15 +216,15 @@ $child_event->redirect_params = $this->redirect_params; $child_event->redirect_script = $this->redirect_script; $child_event->Name = $name; - + $this->Application->HandleEvent( $child_event ); - + $this->status = $child_event->status; $this->redirect = $child_event->redirect; $this->redirect_params = $child_event->redirect_params; $this->redirect_script = $child_event->redirect_script; } - + /** * Set's redirect param for event * @@ -236,7 +236,7 @@ { $this->redirect_params[$name] = $value; } - + /** * Allows to merge passed redirect params hash with existing ones * @@ -247,7 +247,7 @@ { $this->redirect_params = array_merge_recursive2($this->redirect_params, $params); } - + /** * Returns Master event name if any * @@ -258,9 +258,9 @@ { return is_object($this->MasterEvent) ? $this->MasterEvent->Name : false; } - + /** - * Allows to tell if this event was called some how (e.g. subevent, hook) from event requested + * Allows to tell if this event was called some how (e.g. subevent, hook) from event requested * * @param string $event_key event key in format [prefix[.special]:]event_name * @return unknown @@ -271,10 +271,10 @@ if (strpos($event_key, ':') === false) { $event_key = $this->getPrefixSpecial().':'.$event_key; } - + return $event_manager->eventRunning($event_key); } - + /** * Returns section for current event * @@ -286,16 +286,16 @@ if ($perm_section) { return $perm_section; } - + $top_prefix = $this->getEventParam('top_prefix'); $section = $this->Application->getUnitOption($top_prefix.'.main', 'PermSection'); - + if (!$section) { trigger_error('Permission section not specified for prefix '.$top_prefix.'', E_USER_ERROR); } return $section; } - + } ?> \ No newline at end of file