Re: [Tiki-devel] [Tikiwiki-cvs/svn] SF.net SVN: tikiwiki:[62607] trunk/tiki-editpage.php

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [Tiki-devel] [Tikiwiki-cvs/svn] SF.net SVN: tikiwiki:[62607] trunk/tiki-editpage.php

luciash d' being
Ah, goddamnit! Can anybody explain to me why when preference
feature_multilingual is enabled it reports different version numbers
(actually version-1) when saving a page than when it is disabled?

:-p

luci



On 05/16/2017 05:07 PM, luciash wrote:

>> Well, to ask more simply, do you agree the commit will actually change behavior for most edits?
> No, I disagree. Just test before assuming.
>
>> I did not analyze the previous situation, but my point is that
>> (empty($info['version']) || $info['version'] === 0) is superfluous.
>> (empty($info['version'])) should suffice (this is documented in
>> empty()'s manual).
> Maybe it is in the manual, but it did not work for me :-p
>
> luci
>
>
>>> luci
>>>
>>>
>>>>> -----Message d'origine-----
>>>>> De : [hidden email] [mailto:[hidden email]]
>>>>> Envoyé : 16 mai 2017 10:24
>>>>> À : [hidden email]
>>>>> Objet : [Tikiwiki-cvs/svn] SF.net SVN: tikiwiki:[62607] trunk/tiki-editpage.php
>>>>>
>>>>> Revision: 62607
>>>>>              http://sourceforge.net/p/tikiwiki/code/62607
>>>>> Author:   luciash
>>>>> Date:     2017-05-16 14:24:17 +0000 (Tue, 16 May 2017)
>>>>> Log Message:
>>>>> -----------
>>>>> [FIX] wiki page edits: better fix for comparing the versions after save - just in case it is empty
>>>>> sometimes? (thanks jonnyb)
>>>>>
>>>>> Modified Paths:
>>>>> --------------
>>>>>        trunk/tiki-editpage.php
>>>>>
>>>>> Modified: trunk/tiki-editpage.php
>>>>> ===================================================================
>>>>> --- trunk/tiki-editpage.php 2017-05-16 12:21:56 UTC (rev 62606)
>>>>> +++ trunk/tiki-editpage.php 2017-05-16 14:24:17 UTC (rev 62607)
>>>>> @@ -1351,13 +1351,17 @@
>>>>>     }
>>>>>     }
>>>>>
>>>>> - if ($prefs['feature_history'] === 'y' && $tiki_p_wiki_view_history === 'y' && $info['version'] >
>>>>> 0) {
>>>>> - $linktodiff = '<div class="linktodiff">' . tr('To review the changes you have just made
>>>>> %0compare the versions%1 in history of this page.', "<a href=\"tiki-pagehistory.php?page=" .
>>>>> urlencode($page) . "&newver=0&oldver=" . $info['version'] . "\">", '</a>') . '</div>';
>>>>> + if (empty($info['version']) || $info['version'] === 0) {
>>>>> + $info['version'] = 1;
>>>>> + }
>>>>> +
>>>>> + if ($prefs['feature_history'] === 'y' && $tiki_p_wiki_view_history === 'y' && $info['version'] >
>>>>> 1) {
>>>>> + $linktodiff = '<div class="linktodiff">' . tr('To review the changes you have just made
>>>>> %0compare the versions%1 in history of this page.', "<a href=\"tiki-pagehistory.php?page=" .
>>>>> urlencode($page) . "&newver=0&oldver=" . ($info['version'] - 1) . "\">", '</a>') . '</div>';
>>>>>     } else {
>>>>>     $linktodiff = '';
>>>>>     }
>>>>>
>>>>> - Feedback::success(tr('Page %0 saved (version %1).', $_REQUEST["page"], $info['version']+1) .
>>>>> $linktodiff, 'session');
>>>>> + Feedback::success(tr('Page %0 saved (version %1).', $_REQUEST["page"], $info['version']) .
>>>>> $linktodiff, 'session');
>>>>>
>>>>>     if (!empty($_REQUEST['hdr'])) {
>>>>>     $tmp = $parserlib->parse_data($edit); // fills $anch[] so page refreshes
>>>>> at the section being edited
>>>>>
>>>>> This was sent by the SourceForge.net collaborative development platform, the world's largest
>>> Open
>>>>> Source development site.
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Check out the vibrant tech community on one of the world's most
>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> _______________________________________________
>>>>> Tikiwiki-cvs mailing list
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
>>>> ------------------------------------------------------------------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> _______________________________________________
>>>> Tikiwiki-cvs mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Tikiwiki-cvs mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Tikiwiki-cvs mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Tikiwiki-cvs mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel