| 3 |
* @file |
* @file |
| 4 |
* @copyright 2008 Sieb Unlimited, LLC |
* @copyright 2008 Sieb Unlimited, LLC |
| 5 |
* @license @see(LICENSE.txt) |
* @license @see(LICENSE.txt) |
| 6 |
* $Id: publisher.lib,v 1.2 2008/03/15 19:48:39 earnie Exp $ |
* $Id: publisher.lib,v 1.3 2008/04/02 18:10:25 earnie Exp $ |
| 7 |
**/ |
**/ |
| 8 |
|
|
| 9 |
/** |
/** |
| 174 |
function pub_module_hook_call ($module, $hook/*, ...*/) { |
function pub_module_hook_call ($module, $hook/*, ...*/) { |
| 175 |
$args = func_get_args(); |
$args = func_get_args(); |
| 176 |
array_shift($args); array_shift($args); |
array_shift($args); array_shift($args); |
| 177 |
$ret = array(); |
$ret = NULL; |
| 178 |
if (pub_module_hook_exists($module, $hook)) { |
if (pub_module_hook_exists($module, $hook)) { |
| 179 |
$ret = call_user_func_array(pub_module_hook_name($module, $hook), $args); |
$ret = call_user_func_array(pub_module_hook_name($module, $hook), $args); |
|
if (!is_array($ret)) { |
|
|
$ret = array(); |
|
|
} |
|
| 180 |
} |
} |
| 181 |
return $ret; |
return $ret; |
| 182 |
} |
} |
| 263 |
} |
} |
| 264 |
|
|
| 265 |
/** |
/** |
| 266 |
|
* TODO: |
| 267 |
|
*/ |
| 268 |
|
function pub_module_status($module) { |
| 269 |
|
if (pub_module_hook_exists($module, 'status')) { |
| 270 |
|
return pub_module_hook_call($module, 'status'); |
| 271 |
|
} |
| 272 |
|
else { |
| 273 |
|
return "<p><strong>Module $module status is not given!</strong></p>"; |
| 274 |
|
} |
| 275 |
|
} |
| 276 |
|
|
| 277 |
|
/** |
| 278 |
* Disable a publisher tool module. |
* Disable a publisher tool module. |
| 279 |
* |
* |
| 280 |
* @param string $module // Name of disabled |
* @param string $module // Name of disabled |