logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

cvs: smarty / NEWS /libs/plugins function.html_select_date.php: msg#00005

Subject: cvs: smarty / NEWS /libs/plugins function.html_select_date.php
mohrt           Tue Mar  6 20:13:55 2007 UTC

  Modified files:              
    /smarty     NEWS 
    /smarty/libs/plugins        function.html_select_date.php 
  Log:
  fix html_select_date separator when parts are missing (thanks to kayk for the 
patch)
  
  
http://cvs.php.net/viewvc.cgi/smarty/NEWS?r1=1.553&r2=1.554&diff_format=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.553 smarty/NEWS:1.554
--- smarty/NEWS:1.553   Tue Mar  6 10:37:54 2007
+++ smarty/NEWS Tue Mar  6 20:13:55 2007
@@ -1,3 +1,6 @@
+- fix html_select_date separator when parts are missing (hayk,
+  monte)
+
 Version 2.6.17 (Mar 5th, 2007)
 ------------------------------
 
http://cvs.php.net/viewvc.cgi/smarty/libs/plugins/function.html_select_date.php?r1=1.35&r2=1.36&diff_format=u
Index: smarty/libs/plugins/function.html_select_date.php
diff -u smarty/libs/plugins/function.html_select_date.php:1.35 
smarty/libs/plugins/function.html_select_date.php:1.36
--- smarty/libs/plugins/function.html_select_date.php:1.35      Wed Nov  1 
20:35:08 2006
+++ smarty/libs/plugins/function.html_select_date.php   Tue Mar  6 20:13:55 2007
@@ -178,7 +178,9 @@
 
     $html_result = $month_result = $day_result = $year_result = "";
 
+    $field_separator_count = -1;
     if ($display_months) {
+       $field_separator_count++;
         $month_names = array();
         $month_values = array();
         if(isset($month_empty)) {
@@ -216,6 +218,7 @@
     }
 
     if ($display_days) {
+       $field_separator_count++;
         $days = array();
         if (isset($day_empty)) {
             $days[''] = $day_empty;
@@ -251,6 +254,7 @@
     }
 
     if ($display_years) {
+       $field_separator_count++;
         if (null !== $field_array){
             $year_name = $field_array . '[' . $prefix . 'Year]';
         } else {
@@ -314,7 +318,7 @@
                 break;
         }
         // Add the field seperator
-        if($i != 2) {
+        if($i < $field_separator_count) {
             $html_result .= $field_separator;
         }
     }

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>