Clean up projectlist docblocks
[gitphp.git] / include / git / projectlist / ProjectListArrayLegacy.class.php
blob:a/include/git/projectlist/ProjectListArrayLegacy.class.php -> blob:b/include/git/projectlist/ProjectListArrayLegacy.class.php
--- a/include/git/projectlist/ProjectListArrayLegacy.class.php
+++ b/include/git/projectlist/ProjectListArrayLegacy.class.php
@@ -1,9 +1,4 @@
 <?php
-/**
- * Constant for no category indicator
- */
-define('GITPHP_NO_CATEGORY', 'none');
-
 /**
  * Lists all projects in a multidimensional array (Legacy array format)
  *
@@ -14,6 +9,12 @@
  */
 class GitPHP_ProjectListArrayLegacy extends GitPHP_ProjectListBase
 {
+	/**
+	 * No category indicator
+	 *
+	 * @var string
+	 */
+	const NoCategory = 'none';
 
 	/**
 	 * constructor
@@ -38,17 +39,17 @@
 	 */
 	protected function PopulateProjects()
 	{
-		foreach ($this->projectConfig as $cat => $plist) {
+		foreach ($this->projectConfig as $plist) {
 			if (is_array($plist)) {
-				foreach ($plist as $pname => $ppath) {
+				foreach ($plist as $ppath) {
 					try {
-						$projObj = $this->InstantiateProject($ppath);
+						$projObj = $this->LoadProject($ppath);
 						if ($projObj) {
 							$this->projects[$ppath] = $projObj;
 							unset($projObj);
 						}
 					} catch (Exception $e) {
-						GitPHP_DebugLog::GetInstance()->Log($e->getMessage());
+						$this->Log('Project error', $e->getMessage());
 					}
 				}
 			}
@@ -56,15 +57,15 @@
 	}
 
 	/**
-	 * Instantiates project object
+	 * Loads a project
 	 *
 	 * @param string $proj project
 	 * @return GitPHP_Project project
 	 */
-	protected function InstantiateProject($proj)
+	protected function LoadProject($proj)
 	{
 		$found = false;
-		$projectCat = GITPHP_NO_CATEGORY;
+		$projectCat = GitPHP_ProjectListArrayLegacy::NoCategory;
 		foreach ($this->projectConfig as $cat => $plist) {
 			if (is_array($plist) && (array_search($proj, $plist) !== false)) {
 				$found = true;
@@ -83,8 +84,10 @@
 
 		$this->ApplyGitConfig($projectObj);
 
-		if ($projectCat != GITPHP_NO_CATEGORY)
+		if ($projectCat != GitPHP_ProjectListArrayLegacy::NoCategory)
 			$projectObj->SetCategory($projectCat);
+
+		$this->InjectProjectDependencies($projectObj);
 
 		return $projectObj;
 	}

comments