| @@ -104,8 +104,8 @@ | ||
| 104 | 104 |    $products = entity_load('commerce_product'); | 
| 105 | 105 | $products_key = array_keys($products); | 
| 106 | 106 | $products_number = count($products_key); | 
| 107 | - $count = $products_number < $items_number ? $products_number: $items_number; | |
| 108 | -  for($i = 0; $i < $count; $i++) { | |
| 107 | + $count = $products_number < $items_number ? $products_number : $items_number; | |
| 108 | +  for ($i = 0; $i < $count; $i++) { | |
| 109 | 109 | $product = $products[$products_key[rand(0, $products_number - 1)]]; | 
| 110 | 110 | $line_item = commerce_product_line_item_new($product, 1, $order->order_id); | 
| 111 | 111 | commerce_line_item_save($line_item); | 
| @@ -89,6 +89,9 @@ discard block | ||
| 89 | 89 | * @param $items_number | 
| 90 | 90 | * @param $order_state | 
| 91 | 91 | */ | 
| 92 | +/** | |
| 93 | + * @param integer $items_number | |
| 94 | + */ | |
| 92 | 95 |  function _df_commerce_create_order($uid, $items_number, $is_cart = FALSE) { | 
| 93 | 96 | // Create order as a cart. | 
| 94 | 97 | $order = commerce_order_new($uid, 'cart'); | 
| @@ -171,7 +174,7 @@ discard block | ||
| 171 | 174 | * Helper function to update the order status and set the message. | 
| 172 | 175 | * | 
| 173 | 176 | * @param $order | 
| 174 | - * @param $status | |
| 177 | + * @param string $status | |
| 175 | 178 | */ | 
| 176 | 179 |  function _df_commerce_update_order_status($order, $status) { | 
| 177 | 180 | // We need to harcode the previous state, as the entity will not | 
| @@ -17,7 +17,7 @@ | ||
| 17 | 17 | // have control over that file via build scripts. | 
| 18 | 18 | // If RestWS had a real way to deal with CORS/preflight, we would use that. | 
| 19 | 19 |    if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { | 
| 20 | - echo "";die; | |
| 20 | + echo ""; die; | |
| 21 | 21 | } | 
| 22 | 22 | } | 
| 23 | 23 | |
| @@ -21,9 +21,9 @@ discard block | ||
| 21 | 21 | 'category' => 'Add HTML', | 
| 22 | 22 | 'reusable' => false, | 
| 23 | 23 | 'uuid' => $uuid, | 
| 24 | - 'field_raw_html' => array ( | |
| 25 | - 'und' => array ( | |
| 26 | - 0 => array ( | |
| 24 | + 'field_raw_html' => array( | |
| 25 | + 'und' => array( | |
| 26 | + 0 => array( | |
| 27 | 27 | 'value' => $html, | 
| 28 | 28 | 'format' => 'raw_html', | 
| 29 | 29 | ), | 
| @@ -50,16 +50,16 @@ discard block | ||
| 50 | 50 | 'category' => 'Add Map', | 
| 51 | 51 | 'reusable' => false, | 
| 52 | 52 | 'uuid' => $uuid, | 
| 53 | - 'field_map_address' => array ( | |
| 54 | - 'und' => array ( | |
| 55 | - 0 => array ( | |
| 53 | + 'field_map_address' => array( | |
| 54 | + 'und' => array( | |
| 55 | + 0 => array( | |
| 56 | 56 | 'value' => $address, | 
| 57 | 57 | ), | 
| 58 | 58 | ), | 
| 59 | 59 | ), | 
| 60 | - 'field_map_information' => array ( | |
| 61 | - 'und' => array ( | |
| 62 | - 0 => array ( | |
| 60 | + 'field_map_information' => array( | |
| 61 | + 'und' => array( | |
| 62 | + 0 => array( | |
| 63 | 63 | 'value' => $info, | 
| 64 | 64 | 'format' => 'full_html', | 
| 65 | 65 | ), | 
| @@ -3,7 +3,7 @@ | ||
| 3 | 3 | /** | 
| 4 | 4 | * Implements of hook_menu() | 
| 5 | 5 | */ | 
| 6 | -function dfs_med_base_menu(){ | |
| 6 | +function dfs_med_base_menu() { | |
| 7 | 7 | $items['empty-page'] = array( | 
| 8 | 8 | 'title' => 'Redirect', | 
| 9 | 9 | 'description' => 'Redirect user.', | 
| @@ -1,1 +1,1 @@ | ||
| 1 | -<span id="views_slideshow_controls_text_previous_<?php print $variables['vss_id']; ?>" class="<?php print $classes;?> slide-nav-wrap"><a href="#"><img src="<?php print base_path() . path_to_theme(); ?>/images/hero-carousel-prev.svg"></a></span> | |
| 1 | +<span id="views_slideshow_controls_text_previous_<?php print $variables['vss_id']; ?>" class="<?php print $classes; ?> slide-nav-wrap"><a href="#"><img src="<?php print base_path().path_to_theme(); ?>/images/hero-carousel-prev.svg"></a></span> | |
| @@ -210,7 +210,7 @@ | ||
| 210 | 210 | |
| 211 | 211 | <?php if ($site_name) :?> | 
| 212 | 212 | <div class="copyright large-12 columns"> | 
| 213 | -        © <?php print date('Y') . ' ' . check_plain($site_name) . ' ' . t('All rights reserved.'); ?> | |
| 213 | +        © <?php print date('Y').' '.check_plain($site_name).' '.t('All rights reserved.'); ?> | |
| 214 | 214 | </div> | 
| 215 | 215 | <?php endif; ?> | 
| 216 | 216 | </footer> | 
| @@ -1,1 +1,1 @@ | ||
| 1 | -<span id="views_slideshow_controls_text_next_<?php print $variables['vss_id']; ?>" class="<?php print $classes; ?> slide-nav-wrap"><a href="#"><img src="<?php print base_path() . path_to_theme(); ?>/images/hero-carousel-next.svg"></a></span> | |
| 1 | +<span id="views_slideshow_controls_text_next_<?php print $variables['vss_id']; ?>" class="<?php print $classes; ?> slide-nav-wrap"><a href="#"><img src="<?php print base_path().path_to_theme(); ?>/images/hero-carousel-next.svg"></a></span> | |
| @@ -12,7 +12,7 @@ | ||
| 12 | 12 | <?php endif; ?> | 
| 13 | 13 | <ul class="small-block-grid-2 medium-block-grid-4 large-block-grid-4"> | 
| 14 | 14 | <?php foreach ($rows as $id => $row): ?> | 
| 15 | -  <li<?php if ($classes_array[$id]) { print ' class="' . $classes_array[$id] .'"';  } ?>> | |
| 15 | +  <li<?php if ($classes_array[$id]) { print ' class="'.$classes_array[$id].'"'; } ?>> | |
| 16 | 16 | <?php print $row; ?> | 
| 17 | 17 | </li> | 
| 18 | 18 | <?php endforeach; ?> | 
| 19 | 19 | \ No newline at end of file | 
| @@ -30,10 +30,10 @@ | ||
| 30 | 30 |    if ($form_id == 'search_block_form') { | 
| 31 | 31 |      $form['search_block_form']['#title'] = t('Search'); // Change the text on the label element | 
| 32 | 32 | $form['search_block_form']['#title_display'] = 'invisible'; // Toggle label visibilty | 
| 33 | - $form['search_block_form']['#size'] = 40; // define size of the textfield | |
| 33 | + $form['search_block_form']['#size'] = 40; // define size of the textfield | |
| 34 | 34 |      $form['search_block_form']['#default_value'] = t('Search'); // Set a default value for the textfield | 
| 35 | 35 |      $form['actions']['submit']['#value'] = t('GO!'); // Change the text on the submit button | 
| 36 | -    $form['actions']['submit'] = array('#type' => 'image_button', '#src' => base_path() . path_to_theme() . '/images/search-button.png'); | |
| 36 | +    $form['actions']['submit'] = array('#type' => 'image_button', '#src' => base_path().path_to_theme().'/images/search-button.png'); | |
| 37 | 37 | // Add extra attributes to the text box | 
| 38 | 38 |      $form['search_block_form']['#attributes']['onblur'] = "if (this.value == '') {this.value = 'Search';}"; | 
| 39 | 39 |      $form['search_block_form']['#attributes']['onfocus'] = "if (this.value == 'Search') {this.value = '';}"; |