Changeset a366a32 in github
- Timestamp:
- Jul 13, 2009 2:52:15 PM (4 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- d5515f6
- Parents:
- c6514e0
- Location:
- program/include
- Files:
-
- 2 edited
-
rcube_plugin_api.php (modified) (4 diffs)
-
rcube_template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_plugin_api.php
r8448fca ra366a32 40 40 private $template_contents = array(); 41 41 42 private $required_plugins = array('filesystem_attachments'); 42 private $required_plugins = array('filesystem_attachments'); 43 private $active_hook = false; 43 44 44 45 /** … … 180 181 { 181 182 $args += array('abort' => false); 183 $this->active_hook = $hook; 182 184 183 185 foreach ((array)$this->handlers[$hook] as $callback) { … … 190 192 } 191 193 194 $this->active_hook = false; 192 195 return $args; 193 196 } … … 258 261 } 259 262 263 264 /** 265 * Check if a plugin hook is currently processing. 266 * Mainly used to prevent loops and recursion. 267 * 268 * @param string Hook to check (optional) 269 * @return boolean True if any/the given hook is currently processed, otherwise false 270 */ 271 public function is_processing($hook = null) 272 { 273 return $this->active_hook && (!$hook || $this->active_hook == $hook); 274 } 275 260 276 /** 261 277 * Include a plugin script file in the current HTML page -
program/include/rcube_template.php
rc6514e0 ra366a32 288 288 { 289 289 if ($templ != 'iframe') { 290 // prevent from endless loops 291 if ($this->app->plugins->is_processing('render_page')) { 292 raise_error(array('code' => 505, 'type' => 'php', 'message' => 'Recursion alert: ignoring output->send()'), true, false); 293 return; 294 } 290 295 $this->parse($templ, false); 291 296 }
Note: See TracChangeset
for help on using the changeset viewer.
