Revision: 2639
https://sourceforge.net/p/mrbs/code/2639/
Author: cimorrison
Date: 2013-01-08 15:34:06 +0000 (Tue, 08 Jan 2013)
Log Message:
-----------
Slightly cleaner version of the fix in Rev 2637
Revision Links:
--------------
https://sourceforge.net/p/mrbs/code/2637/
Modified Paths:
--------------
mrbs/trunk/web/js/edit_entry.js.php
Modified: mrbs/trunk/web/js/edit_entry.js.php
===================================================================
--- mrbs/trunk/web/js/edit_entry.js.php 2013-01-08 15:00:01 UTC (rev 2638)
+++ mrbs/trunk/web/js/edit_entry.js.php 2013-01-08 15:34:06 UTC (rev 2639)
@@ -682,25 +682,27 @@
duration = durFormat(duration/60);
}
}
-
<?php
- // duration can be either a number or a string from now on
- // (durFormat returns a string), so we use == and not ===
+ // As durFormat returns a string, duration can now be either
+ // a number or a string, so convert it to a string so that we
+ // know what we are dealing with
?>
+ duration.toString();
+
if (days !== 0)
{
text += days + ' ';
text += (days === 1) ? vocab.days.singular : vocab.days.plural;
- if (duration != 0)
+ if (duration !== '0')
{
text += ', ';
}
}
- if (duration != 0)
+ if (duration !== '0')
{
text += duration + ' ';
- text += (duration == 1) ? vocab[durUnits].singular :
vocab[durUnits].plural;
+ text += (duration === '1') ? vocab[durUnits].singular :
vocab[durUnits].plural;
}
return text;
}
------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits