[dev] Form & select time

Marko Djukic mdjukic at horde.org
Thu Feb 5 19:48:52 PST 2004


Hi Steve,

Can you tell me what is the purpose of these two patches? I couldn't quite
figure it out from the code.

Plus can you please send patches in using the unified format (-u) and attach
them to the email as opposed to inline. Your first patch here I managed to
apply, the second would not, was giving me parse errors.

m.

Quoting steve <mailling at gmx.co.uk>:

> Here is a patch to offer more options about what we are going to show:
> RCS file: /repository/framework/Form/Form.php,v
> retrieving revision 1.220
> diff -w -b -r1.220 Form.php
> 2314c2314,2318
> <             return array('hour' => '', 'minute' => '', 'second' => '');
> ---
>  >             return array('hour' => '',
>  >             'minute' => '',
>  >             'second' => '',
>  >             'stepMinute' => 1,
>  >             'stepSecond' => 1);
> 2319c2323,2325
> <                      'second' => $time->getSecond());
> ---
>  >                      'second' => $time->getSecond(),
>  >             		'stepMinute' => 1,
>  >             		'stepSecond' => 1);
>
>
>
> And
> RCS file: /repository/framework/UI/UI/VarRenderer/html.php,v
> retrieving revision 1.15
> diff -w -b -r1.15 html.php
> 259a260,263
>  >         $time = $var->type->getTimeParts($var->getValue($vars, $index));
>  >         $stepMinutes = isset($time['stepMinute'])?	$time['stepMinute']:	1;
>  >         $stepSeconds = isset($time['stepSecond'])?	$time['stepSecond']:	1;
>  >
> 260a265,269
>  > 		if ($stepMinutes < 60)
>  > 	        $minutes = array('' => _("MM"));
>  > 		if ($stepSeconds < 60)
>  > 	        $seconds = array('' => _("SS"));
>  >
> 264,265c273
> <         $minutes = array('' => _("MM"));
> <         for ($i = 0; $i <= 59; $i++) {
> ---
>  >         for ($i = 0; $i <= 59; $i=$i+$stepMinutes) {
> 268,269c276
> <         $seconds = array('' => _("SS"));
> <         for ($i = 0; $i <= 59; $i++) {
> ---
>  >         for ($i = 0; $i <= 59; $i=$i+$stepSeconds) {
> 272d278
> <         $time = $var->type->getTimeParts($var->getValue($vars, $index));
>
> --
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
>


--
Marko Djukic
Horde Project (http://horde.org)


More information about the dev mailing list