From 76ed2e494b220780d8e247f9348f8f09a9d5fee8 Mon Sep 17 00:00:00 2001 From: mensonge Date: Tue, 19 Feb 2008 14:43:00 +0000 Subject: [PATCH] Interface fix: add a link to last editor profile in common description. Don't count a change if a user saves with no modifications. git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@46 b3834d28-1941-0410-a4f8-b48e95affb8f --- locales/fr_FR/LC_MESSAGES/messages.mo | Bin 18583 -> 18582 bytes locales/fr_FR/LC_MESSAGES/messages.po | 6 +++--- locales/messages.po | 4 ++-- services/commondescriptionservice.php | 14 ++++++++++++++ .../bookmarkcommondescriptionedit.tpl.php | 4 ++-- templates/tagcommondescriptionedit.tpl.php | 4 ++-- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/locales/fr_FR/LC_MESSAGES/messages.mo b/locales/fr_FR/LC_MESSAGES/messages.mo index a80e071f7f381675cee1fb0eaea3134ffb27e056..aeb0b2fb67c97c7d2e2c63244afe41090973bec3 100644 GIT binary patch delta 2623 zcmXZdeN5F=9LMo<;l|TNMNkk#o)nM=6}SQlnSjXSl$fHRh7LDj6vIL^Tl%Ai;oO|N zcq4mQThVB%~6T z%YCjPcc2w%jHyd7#*HoL!Bz~yE)2$Ja4$ZO;dl${@s1O3PBbQrxB@j#J=WqL48#G{ zxOXrWhf&{6CK}5G(D;FlXuORfcn?>jE6JEen2Mq3#WLK271)DX;0x4u6R7c%n2tYT zHijh|qm33~1lFJu+MjIMnYYoQ9duz7o<>b{0abz59p83*4^^RI)Py6b%1z)Z{1!F- z4@|@VPz$D}7_%JnP~)pC8rpdsYQPcHPCHQpPT~RVMGg2Fwcs=^#((e;45M6{ry85^ z5Nf^=%)slYd1sMRGxMl~t>`uOgei_*)E~;xjgR6MY{0eX$MyIr>Q2mH6>j5TH{&^c z7(d5{Fp%xHVJHUTQ>cv`$9UE^r)VV6@fwnp8AWCOBgWwrKA4CDT|pd*nkWTJFb%V? z6}3~p;~2&e-$5n5fL>fnP=yC@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X{#U_?>gU=X<^f`vR_) z0du}4tyTHcpWS8rqeG-GA5k{upD<_FrGop zdmHb?LDY9+NyaikG=5-UA>P2*cpFnNDA|}fn2KSTjm5YQOYtyjgD+6ujiTm{p$~t; zbo4AX<{r$$2rNehv~#g#N4|>zouC7i5ev0Y4=Mw%JHF-kJ}N_ls0D{mnH$9f{1!F; z4@|}XP#dN$F=hc~q2@ne(a_1aq9!zz>rNrJW@b`fvp{ zqfXlEID*miZ=wR%k1SY@etZ-Y*x&Ti(21^~?&fz?F@>?3iY6MBx-<;JY*ek}qBbZ- z1yqYnHFc<~>vrr#H~lv;6#G&8e1Pv*E;godf`K-UK}yUWJjr-mx-n7o-^(zj9xviv zOeWfD>_y@?6BvdqD~*|toj4b}Q5o!W#?L$BmyxnDU!$dnZqcAX%^lRqlQQiq$Ut35 z4r-xV^kXNk#Szqoe_;fASJ|0KKwZf))N9&~I&m|4@DOU>W2=Z?jTafv$zR1I_>p7b zYGd}$zk~`Pn+uG^3Jk$rn2haCKY)4#FQWoFi`w`i>MF0Hu3{XOv8gQb7fEA=0d3&T zwkP^j28(4?^sA8N&r9F<3sH@nA3ivtHvpbHp7(mURL}g+ciNS=CUX5== zeP538Sb<)>pB5Tv3>-kE>WcQG7C4H!(>|yFF|MG074_Y3 zsCOPrWomvZs=pGo&o;D_${HGr@Ckep52GebqEdMaqcMDg{r;DrzHh-!JcI6Cj0;KT+~8U*o8HyiDQ_F zL8W#-3sdMnf*QAw7|c1W#A#HGm2S3wzZ;c-(-sZg)n};U`vybt25RG9P**gCiFg~` z7~{7WOhBdDk4o)!)bF3d5ZsNLcK}_ee|m-s?zW5>_|^Mtkn40$>%320rY9p}y{oRL mHKNgVYT&DglXG0j0}Y9T9(QKJ>b#!Vw54j~4-}\n" "Language-Team: fr-FR \n" "MIME-Version: 1.0\n" @@ -566,7 +566,7 @@ msgstr "Description" #: ../../../templates/bookmarkcommondescriptionedit.tpl.php:28 #: ../../../templates/tagcommondescriptionedit.tpl.php:21 -msgid "Last modification: " +msgid "Last modification:" msgstr "Dernière modification :" #: ../../../templates/bookmarkcommondescriptionedit.tpl.php:39 diff --git a/locales/messages.po b/locales/messages.po index f279fa5..f9d9c84 100644 --- a/locales/messages.po +++ b/locales/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-02-19 10:28+0100\n" +"POT-Creation-Date: 2008-02-19 15:30+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -553,7 +553,7 @@ msgstr "" #: ../../../templates/bookmarkcommondescriptionedit.tpl.php:28 #: ../../../templates/tagcommondescriptionedit.tpl.php:21 -msgid "Last modification: " +msgid "Last modification:" msgstr "" #: ../../../templates/bookmarkcommondescriptionedit.tpl.php:39 diff --git a/services/commondescriptionservice.php b/services/commondescriptionservice.php index 7e34219..6c591a9 100644 --- a/services/commondescriptionservice.php +++ b/services/commondescriptionservice.php @@ -16,6 +16,13 @@ class CommonDescriptionService { } function addTagDescription($tag, $desc, $uId, $time) { + // Check if no modification + $lastDesc = $this->getLastTagDescription($tag); + if($lastDesc['cdDescription'] == $desc) { + return true; + } + + // If modification $datetime = gmdate('Y-m-d H:i:s', $time); $values = array('tag'=>$tag, 'cdDescription'=>$desc, 'uId'=>$uId, 'cdDatetime'=>$datetime); $sql = 'INSERT INTO '. $this->getTableName() .' '. $this->db->sql_build_array('INSERT', $values); @@ -81,6 +88,13 @@ class CommonDescriptionService { } function addBookmarkDescription($bHash, $title, $desc, $uId, $time) { + // Check if no modification + $lastDesc = $this->getLastBookmarkDescription($bHash); + if($lastDesc['cdTitle'] == $title && $lastDesc['cdDescription'] == $desc) { + return true; + } + + // If modification $datetime = gmdate('Y-m-d H:i:s', $time); $values = array('bHash'=>$bHash, 'cdTitle'=>$title, 'cdDescription'=>$desc, 'uId'=>$uId, 'cdDatetime'=>$datetime); $sql = 'INSERT INTO '. $this->getTableName() .' '. $this->db->sql_build_array('INSERT', $values); diff --git a/templates/bookmarkcommondescriptionedit.tpl.php b/templates/bookmarkcommondescriptionedit.tpl.php index c1723de..39f20ae 100644 --- a/templates/bookmarkcommondescriptionedit.tpl.php +++ b/templates/bookmarkcommondescriptionedit.tpl.php @@ -25,9 +25,9 @@ window.onload = function() { 0) { - echo T_('Last modification: ').$description['cdDatetime'].', '; + echo T_('Last modification:').' '.$description['cdDatetime'].', '; $lastUser = $userservice->getUser($description['uId']); - echo $lastUser['username']; + echo ''.$lastUser['username'].''; } ?> diff --git a/templates/tagcommondescriptionedit.tpl.php b/templates/tagcommondescriptionedit.tpl.php index 6e09374..158142e 100644 --- a/templates/tagcommondescriptionedit.tpl.php +++ b/templates/tagcommondescriptionedit.tpl.php @@ -18,9 +18,9 @@ window.onload = function() { 0) { - echo T_('Last modification: ').$description['cdDatetime'].', '; + echo T_('Last modification:').' '.$description['cdDatetime'].', '; $lastUser = $userservice->getUser($description['uId']); - echo $lastUser['username']; + echo ''.$lastUser['username'].''; } ?>