Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

1498
 
1860
 
1860
 
actions.php
_> 55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
  77 
<> 8 -  Copyright (c) 2006 osCommerce
   8+  Copyright (c) 2007 osCommerce
99 
  1010   This program is free software; you can redistribute it and/or modify
  1111   it under the terms of the GNU General Public License v2 (1991)
  1212   as published by the Free Software Foundation.
  1313 */
  1414 
<>  15+/**
   16+ * The osC_Actions class loads action modules to execute specific tasks
   17+ */
   18+
1519   class osC_Actions {
<> 16 -    function parse() {
  17 -      if (isset($_GET['action']) && !empty($_GET['action'])) {
  18 -        $_GET['action'] = basename($_GET['action']);
1920 
<> 20 -        if (file_exists('includes/modules/actions/' . $_GET['action'] . '.php')) {
  21 -          include('includes/modules/actions/' . $_GET['action'] . '.php');
   21+/**
   22+ * Loads the action module to execute
   23+ *
   24+ * @param string $module The name of the module to execute
   25+ * @access public
   26+ */
2227 
<> 23 -          call_user_func(array('osC_Actions_' . $_GET['action'], 'execute'));
  24 -        }
   28+    public static function parse($module) {
   29+      $module = basename($module);
   30+
   31+      if ( !empty($module) && file_exists('includes/modules/actions/' . $module . '.php') ) {
   32+        include('includes/modules/actions/' . $module . '.php');
   33+
   34+        call_user_func(array('osC_Actions_' . $module, 'execute'));
<_ 2535       }
  2636     }
  2737   }