Get rid of no category global constant
[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
+	 *
+	 * @const
+	 */
+	const NoCategory = 'none';
 
 	/**
 	 * constructor
@@ -64,7 +65,7 @@
 	protected function InstantiateProject($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,7 +84,7 @@
 
 		$this->ApplyGitConfig($projectObj);
 
-		if ($projectCat != GITPHP_NO_CATEGORY)
+		if ($projectCat != GitPHP_ProjectListArrayLegacy::NoCategory)
 			$projectObj->SetCategory($projectCat);
 
 		return $projectObj;

comments