Make Horde_Vcs_File#logs public.
authorJan Schneider <jan@horde.org>
Tue, 24 Aug 2010 14:47:53 +0000 (16:47 +0200)
committerJan Schneider <jan@horde.org>
Tue, 24 Aug 2010 14:47:53 +0000 (16:47 +0200)
framework/Vcs/lib/Horde/Vcs.php
framework/Vcs/lib/Horde/Vcs/Cvs.php
framework/Vcs/lib/Horde/Vcs/Git.php
framework/Vcs/lib/Horde/Vcs/Svn.php

index 34972aa..c29a79b 100644 (file)
@@ -852,7 +852,7 @@ abstract class Horde_Vcs_File
     /**
      * TODO
      */
-    protected $_logs = array();
+    public $logs = array();
 
     /**
      * TODO
@@ -964,10 +964,10 @@ abstract class Horde_Vcs_File
      */
     public function queryLastLog()
     {
-        if (!isset($this->_revs[0]) || !isset($this->_logs[$this->_revs[0]])) {
+        if (!isset($this->_revs[0]) || !isset($this->logs[$this->_revs[0]])) {
             throw new Horde_Vcs_Exception('No revisions');
         }
-        return $this->_logs[$this->_revs[0]];
+        return $this->logs[$this->_revs[0]];
     }
 
     /**
@@ -994,7 +994,7 @@ abstract class Horde_Vcs_File
             break;
         }
 
-        uasort($this->_logs, array($this, 'sortBy' . $func));
+        uasort($this->logs, array($this, 'sortBy' . $func));
         return true;
     }
 
@@ -1061,8 +1061,8 @@ abstract class Horde_Vcs_File
     public function queryLogs($rev = null)
     {
         return is_null($rev)
-            ? $this->_logs
-            : (isset($this->_logs[$rev]) ? $this->_logs[$rev] : null);
+            ? $this->logs
+            : (isset($this->logs[$rev]) ? $this->logs[$rev] : null);
     }
 
     /**
index c05584d..57fc53c 100644 (file)
@@ -479,7 +479,7 @@ class Horde_Vcs_File_Cvs extends Horde_Vcs_File
 
                     if ($onbranch) {
                         $this->_revs[] = $rev;
-                        $this->_logs[$rev] = $log;
+                        $this->logs[$rev] = $log;
                     }
 
                     $this->_accum = array();
index 2190bb3..1c8d908 100644 (file)
@@ -504,7 +504,7 @@ class Horde_Vcs_File_Git extends Horde_Vcs_File
         }
 
         foreach ($log_list as $val) {
-            $this->_logs[$val] = $rep->getLogObject($this, $val);
+            $this->logs[$val] = $rep->getLogObject($this, $val);
         }
     }
 
@@ -517,10 +517,10 @@ class Horde_Vcs_File_Git extends Horde_Vcs_File
      */
     public function getHashForRevision($rev)
     {
-        if (!isset($this->_logs[$rev])) {
+        if (!isset($this->logs[$rev])) {
             throw new Horde_Vcs_Exception('This file doesn\'t exist at that revision');
         }
-        return $this->_logs[$rev]->getHashForPath($this->queryModulePath());
+        return $this->logs[$rev]->getHashForPath($this->queryModulePath());
     }
 
     /**
@@ -600,8 +600,8 @@ class Horde_Vcs_File_Git extends Horde_Vcs_File
 
         $rev = reset($this->_revlist[$this->_branch]);
         if (!is_null($rev)) {
-            if (isset($this->_logs[$rev])) {
-                return $this->_logs[$rev];
+            if (isset($this->logs[$rev])) {
+                return $this->logs[$rev];
             }
         }
 
index 5417bab..c91073e 100644 (file)
@@ -315,7 +315,7 @@ class Horde_Vcs_File_Svn extends Horde_Vcs_File
             try {
                 $log = $rep->getLogObject($this, null);
                 $rev = $log->queryRevision();
-                $this->_logs[$rev] = $log;
+                $this->logs[$rev] = $log;
                 $this->_revs[] = $rev;
             } catch (Horde_Vcs_Exception $e) {}