/[drupal]/contributions/modules/publisher/tools/lib/publisher.lib
ViewVC logotype

Diff of /contributions/modules/publisher/tools/lib/publisher.lib

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3, Wed Apr 2 18:10:25 2008 UTC revision 1.4, Fri Apr 25 18:51:32 2008 UTC
# Line 3  Line 3 
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  /**  /**
# Line 174  function pub_module_hook_exists ($module Line 174  function pub_module_hook_exists ($module
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  }  }
# Line 266  function pub_module_unregister($module) Line 263  function pub_module_unregister($module)
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

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.2