Changeset 1c932d5 in github for program/include/rcube_plugin.php
- Timestamp:
- Apr 26, 2009 12:33:22 PM (4 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 99d8660
- Parents:
- d4d1a25
- File:
-
- 1 edited
-
program/include/rcube_plugin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_plugin.php
rcc97ea0 r1c932d5 102 102 * @see rcmail::gettext() 103 103 */ 104 function gettext($p)104 public function gettext($p) 105 105 { 106 106 return rcmail::get_instance()->gettext($p, $this->ID); 107 107 } 108 108 109 /** 110 * Register this plugin to be responsible for a specific task 111 * 112 * @param string Task name (only characters [a-z0-9_.-] are allowed) 113 */ 114 public function register_task($task) 115 { 116 if ($task != asciiwords($task)) { 117 raise_error(array('code' => 526, 'type' => 'php', 'message' => "Invalid task name: $task. Only characters [a-z0-9_.-] are allowed"), true, false); 118 } 119 else if (in_array(rcmail::$main_tasks, $task)) { 120 raise_error(array('code' => 526, 'type' => 'php', 'message' => "Cannot register taks $task; already taken by another plugin or the application itself"), true, false); 121 } 122 else { 123 rcmail::$main_tasks[] = $task; 124 } 125 } 126 109 127 /** 110 128 * Register a handler for a specific client-request action
Note: See TracChangeset
for help on using the changeset viewer.
