[dev] [commits] Horde branch master updated. c1f241be16aa88a278d0e51fc7baa78e39008cca

Michael Rubinsky mrubinsk at horde.org
Sat Jul 31 22:53:33 UTC 2010


Quoting Michael M Slusarz <slusarz at horde.org>:


> commit 79bf8f469ae19a69c1de18c50528aeb89eeef24a
> Author: Michael M Slusarz <slusarz at curecanti.org>
> Date:   Fri Jul 30 01:47:44 2010 -0600
>
>     Better random string generation.
>
>     Use either Horde_Support_Uuid or uniqid(mt_rand()) (the former is more
>     random and should be used for things like persistent data; the latter is
>     useful for things like cache-busting).
>
>  ansel/lib/Ansel.php                                   |    2 +-
>  ansel/xppublish.php                                   |    4 +-
>  fima/lib/Driver/sql.php                               |    4 +-
>  fima/lib/Forms/CreateLedger.php                       |    2 +-
>  folks/lib/Friends/shared.php                          |    9 +-----
>  framework/Block/lib/Horde/Block/Layout/Manager.php    |    4 +-
>  framework/Core/lib/Horde/Config.php                   |   10 +++---
>  framework/Core/lib/Horde/Core/Ui/VarRenderer/Html.php |    2 +-
>  framework/Core/package.xml                            |    4 +++
>  framework/Model/lib/Horde/Form/VarRenderer/Xhtml.php  |    2 +-
>  framework/Prefs/lib/Horde/Prefs/Identity.php          |    2 +-
>  framework/Rpc/lib/Horde/Rpc/Webdav.php                |    2 +-
>  framework/Secret/lib/Horde/Secret.php                 |    2 +-
>  framework/SyncML/SyncML/Backend/Sql.php               |   23  
> +---------------
>  framework/SyncML/package.xml                          |    4 +++
>  framework/Token/lib/Horde/Token.php                   |    2 +-
>  framework/Util/lib/Horde/Util.php                     |    2 +-
>  framework/iCalendar/iCalendar/vevent.php              |    4 +--
>  framework/iCalendar/package.xml                       |    4 +++
>  gollem/lib/Api.php                                    |    2 +-
>  gollem/selectlist.php                                 |    2 +-
>  horde/admin/alarms.php                                |    4 +--
>  horde/templates/contents/open_view_win.js             |    2 +-
>  hylax/lib/Driver/spandsp.php                          |    2 +-
>  imp/attachment.php                                    |    2 +-
>  imp/lib/Compose.php                                   |    2 +-
>  imp/lib/Injector/Binder/Imaptree.php                  |    2 +-
>  ingo/config/backends.php.dist                         |    2 +-
>  kronolith/lib/Driver/Sql.php                          |    2 +-
>  kronolith/lib/Kronolith.php                           |    2 +-
>  kronolith/lib/Resource.php                            |    4 +-
>  mnemo/lib/Driver.php                                  |   14 ----------
>  mnemo/lib/Driver/kolab.php                            |    4 +-
>  mnemo/lib/Driver/sql.php                              |    6 ++--
>  mnemo/lib/Forms/CreateNotepad.php                     |    2 +-
>  nag/lib/Driver.php                                    |   16 +-----------
>  nag/lib/Driver/Kolab.php                              |    4 +-
>  nag/lib/Driver/Sql.php                                |    6 ++--
>  nag/lib/Nag.php                                       |    2 +-
>  skoli/lib/Driver.php                                  |   13 ---------
>  skoli/lib/Driver/sql.php                              |    4 +-
>  skoli/lib/Forms/CreateClass.php                       |    2 +-
>  trean/lib/Bookmarks.php                               |    2 +-
>  turba/lib/Driver.php                                  |   16 +-----------
>  turba/lib/Driver/Kolab.php                            |   10 +++----
>  turba/lib/Driver/Sql.php                              |    2 +-
>  turba/scripts/upgrades/public_to_horde_share.php      |    4 +-
>  turba/search.php                                      |    2 +-
>  whups/lib/Query.php                                   |    2 +-
>  whups/lib/View/Results.php                            |    2 +-
>  wicked/scripts/mail-filter.php                        |    2 +-
>  51 files changed, 79 insertions(+), 152 deletions(-)

>  kronolith/templates/edit/edit.inc       |    3 ---
>  kronolith/templates/javascript_defs.php |    5 ++++-
>  7 files changed, 10 insertions(+), 14 deletions(-)
>
> http://git.horde.org/diff.php/kronolith/js/calendar-panel.js?rt=horde-git&r1=d3ad60793bf4e8c0a5fd5a8bff97f2d450338c7d&r2=435cc81395b87ea57ac5b81dbb55c08b199bc574
> http://git.horde.org/diff.php/kronolith/js/edit.js?rt=horde-git&r1=83cab23538795560cc52939c1e0fee65eb96e4fe&r2=435cc81395b87ea57ac5b81dbb55c08b199bc574
> http://git.horde.org/diff.php/kronolith/js/goto.js?rt=horde-git&r1=22d919cb7dd2ae3c69f420c3dc0df7a419904e73&r2=435cc81395b87ea57ac5b81dbb55c08b199bc574
> http://git.horde.org/diff.php/kronolith/js/views.js?rt=horde-git&r1=ae0bd709a1f03a74b10c7485b655a63b20ea062c&r2=435cc81395b87ea57ac5b81dbb55c08b199bc574
> http://git.horde.org/diff.php/kronolith/templates/common-header.inc?rt=horde-git&r1=a0ce9ace9c3114b59d4926dd43c89cd19f4794c4&r2=435cc81395b87ea57ac5b81dbb55c08b199bc574
> http://git.horde.org/diff.php/kronolith/templates/edit/edit.inc?rt=horde-git&r1=83cab23538795560cc52939c1e0fee65eb96e4fe&r2=435cc81395b87ea57ac5b81dbb55c08b199bc574
> http://git.horde.org/diff.php/kronolith/templates/javascript_defs.php?rt=horde-git&r1=6d1acd383b9a13f5ac979050ab53cd076c2715a5&r2=435cc81395b87ea57ac5b81dbb55c08b199bc574


This change causes problems due to truncation in the database. Some of  
the fields used for ids are VARCHAR(32), so the 36 character UUID is  
being truncated. This is only currently obvious in the dynamic view of  
Kronolith, when trying to open a newly generated event (before the  
screen is refreshed). This fails because we have the (correct) 36  
character string cached, but the database has the truncated string  
stored. In other apps, it's not as obvious since the ids are still  
unique and there is no client side cache of the newly created ids.

It seems un-friendly to require a schema simply because we've changed  
our id generation for these fields. We can truncate the id when it's  
generated in the affected apps, but I'm unsure how that affects the  
uniqueness of the id. Or we could go back to the old way of generating  
the ids in these cases. Not sure why a UUID is needed in some of these  
cases - like for kronolith's event_id field, for instance.

Thoughts?

-- 
Mike

--
The Horde Project (www.horde.org)
mrubinsk at horde.org

"Reality is merely an illusion, albeit a very persistent one." - A. Einstein



More information about the dev mailing list