[Rt-commit] r3427 - in rt/branches/3.5-TESTING: . html/Widgets

trs at bestpractical.com trs at bestpractical.com
Fri Jul 8 00:40:35 EDT 2005


Author: trs
Date: Fri Jul  8 00:40:31 2005
New Revision: 3427

Modified:
   rt/branches/3.5-TESTING/   (props changed)
   rt/branches/3.5-TESTING/html/Widgets/TitleBoxStart
Log:
 r4866 at wintermute:  tom | 2005-07-08 00:38:36 -0400
 Bullet-proofed the ID generation


Modified: rt/branches/3.5-TESTING/html/Widgets/TitleBoxStart
==============================================================================
--- rt/branches/3.5-TESTING/html/Widgets/TitleBoxStart	(original)
+++ rt/branches/3.5-TESTING/html/Widgets/TitleBoxStart	Fri Jul  8 00:40:31 2005
@@ -63,9 +63,7 @@
 $color => "#336699"
 $id => undef
 </%ARGS>
-<%once>
-my $cache;
-</%once>
+
 <%init>
 #
 # This should be pretty bulletproof
@@ -75,7 +73,7 @@
             join '--', ($class, $bodyclass, $title, $id);
 
 my $i = 0;
-$i++ while $cache->{"$tid-$i"};
-$cache->{"$tid-$i"}++;
+$i++ while $m->notes("$tid-$i");
+$m->notes("$tid-$i" => 1);
 $tid = "$tid-$i";
 </%init>


More information about the Rt-commit mailing list