/[drupal]/contributions/modules/ubercart/uc_order/uc_order.module
ViewVC logotype

Diff of /contributions/modules/ubercart/uc_order/uc_order.module

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

revision 1.11.2.18 by rszrama, Wed Sep 23 19:14:42 2009 UTC revision 1.11.2.19 by rszrama, Wed Nov 18 21:13:32 2009 UTC
# Line 1227  function uc_order_admin_sort_form_submit Line 1227  function uc_order_admin_sort_form_submit
1227   * Create a new order and redirect to its edit screen.   * Create a new order and redirect to its edit screen.
1228   */   */
1229  function uc_order_create($uid = NULL) {  function uc_order_create($uid = NULL) {
   global $user;  
   
   if ($uid !== NULL) {  
     $order = uc_order_new($uid, 'post_checkout');  
     uc_order_comment_save($order->order_id, $user->uid, t('Order created by the administration.'), 'admin');  
     drupal_goto('admin/store/orders/'. $order->order_id .'/edit');  
   }  
   
1230    uc_add_js(drupal_get_path('module', 'uc_order') .'/uc_order.js');    uc_add_js(drupal_get_path('module', 'uc_order') .'/uc_order.js');
1231    
1232    $output = '<div style="position: relative; top: 2px; cursor: pointer;" '    $output = '<div style="position: relative; top: 2px; cursor: pointer;" '
# Line 1292  function uc_order_create_form() { Line 1284  function uc_order_create_form() {
1284  }  }
1285    
1286  function uc_order_create_form_submit($form_id, $form_values) {  function uc_order_create_form_submit($form_id, $form_values) {
1287    uc_order_create($form_values['uid']);    global $user;
1288    
1289      $order = uc_order_new($form_values['uid'], 'post_checkout');
1290      uc_order_comment_save($order->order_id, $user->uid, t('Order created by the administration.'), 'admin');
1291    
1292      return 'admin/store/orders/'. $order->order_id .'/edit';
1293  }  }
1294    
1295  /**  /**

Legend:
Removed from v.1.11.2.18  
changed lines
  Added in v.1.11.2.19

  ViewVC Help
Powered by ViewVC 1.1.3