Ejemplo n.º 1
0
 /**
  * Standard modular run function.
  *
  * @param  array		A map of parameters.
  * @return tempcode	The result of execution.
  */
 function run($map)
 {
     unset($map);
     require_lang('version');
     require_code('version2');
     require_css('adminzone');
     $table = get_future_version_information();
     return do_template('BLOCK_MAIN_STAFF_NEW_VERSION', array('_GUID' => '43c7b18d3d44e825247579df23a2ad9c', 'VERSION' => ocp_version_full(), 'VERSION_TABLE' => $table));
 }
Ejemplo n.º 2
0
 /**
  * Standard modular run function for OcCLE hooks.
  *
  * @param  array	The options with which the command was called
  * @param  array	The parameters with which the command was called
  * @param  array	A reference to the OcCLE filesystem object
  * @return array	Array of stdcommand, stdhtml, stdout, and stderr responses
  */
 function run($options, $parameters, &$occle_fs)
 {
     require_code('version');
     require_code('version2');
     require_lang('version');
     if (array_key_exists('h', $options) || array_key_exists('help', $options)) {
         return array('', do_command_help('version', array('h', 'f', 't', 'v', 'm'), array()), '', '');
     } elseif (array_key_exists('f', $options) || array_key_exists('future', $options)) {
         return array('', get_future_version_information(), '', '');
     } elseif (array_key_exists('t', $options) || array_key_exists('time', $options)) {
         return array('', '', ocp_version_time(), '');
     } elseif ((array_key_exists('v', $options) || array_key_exists('major-version', $options)) && (!array_key_exists('m', $options) && !array_key_exists('minor-version', $options))) {
         return array('', '', ocp_version(), '');
     } elseif ((array_key_exists('m', $options) || array_key_exists('minor-version', $options)) && (!array_key_exists('v', $options) && !array_key_exists('major-version', $options))) {
         return array('', '', ocp_version_minor(), '');
     } elseif ((array_key_exists('g', $options) || array_key_exists('general-version', $options)) && (!array_key_exists('v', $options) && !array_key_exists('major-version', $options))) {
         return array('', '', ocp_version_number(), '');
     } else {
         return array('', '', ocp_version_full(), '');
     }
 }