svn: /web/doc-editor/trunk/php/ ExtJsController.php

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Fri, 04 Dec 2009 21:27:05 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=291717

Log:
Ensure that Rev2 is always greater than Rev1 for getDiff2() method

Changed paths:
    U   web/doc-editor/trunk/php/ExtJsController.php

Modified: web/doc-editor/trunk/php/ExtJsController.php
===================================================================
--- web/doc-editor/trunk/php/ExtJsController.php	2009-12-04 21:25:08 UTC (rev 291716)
+++ web/doc-editor/trunk/php/ExtJsController.php	2009-12-04 21:27:05 UTC (rev 291717)
@@ -588,6 +588,14 @@
         $Rev1 = $this->getRequestVariable('Rev1');
         $Rev2 = $this->getRequestVariable('Rev2');

+        // Ensure Rev2 is always a value greater than Rev1
+        if( $Rev2 < $Rev1 )
+        {
+            $tmp = $Rev2;
+            $Rev2 = $Rev1;
+            $Rev1 = $tmp;
+        }
+
         $file = new File($FileLang, $FilePath, $FileName);
         $r = $file->vcsDiff($Rev1, $Rev2);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.