diff options
author | 2009-07-05 13:55:03 -0400 | |
---|---|---|
committer | 2009-07-05 13:55:03 -0400 | |
commit | 919316aa252440a3f9beed2c1276b4d70a827bab (patch) | |
tree | 197edb7e83a87318b03748ecc37d6193f6ea5ce7 /shared | |
parent | Separated configurations from builds of those configurations, added configura... (diff) | |
download | ingenue-919316aa252440a3f9beed2c1276b4d70a827bab.tar.gz ingenue-919316aa252440a3f9beed2c1276b4d70a827bab.tar.bz2 ingenue-919316aa252440a3f9beed2c1276b4d70a827bab.zip |
Add javascript-based searching to package adding stage
Diffstat (limited to 'shared')
-rw-r--r-- | shared/classes/profile.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/shared/classes/profile.php b/shared/classes/profile.php index 980599e..77603e2 100644 --- a/shared/classes/profile.php +++ b/shared/classes/profile.php @@ -67,15 +67,15 @@ class sql_profile extends sql_row_obj { } list($name, $val)=array_merge(explode(': ', $line, 2), array(null)); if ($name == 'CPV') { - if (preg_match('#^([^/]+)/(.+?)-([^-]+)((?:-r[0-9]+)?)$#', $val, $match)) { - list(, $cat, $name, $ver, $r)=$match; + if (preg_match('#^([^/-]+)([^/]*)/(.+?)-([^-]+)((?:-r[0-9]+)?)$#', $val, $match)) { + list(, $bcat, $lcat, $name, $ver, $r)=$match; $ver.=$r; } else { debug("Unsplittable atom: $val"); continue; } - if (isset($p[$cat][$name][$ver])) { - debug("Duplicate package $cat/$name-$ver"); + if (isset($p[$bcat][$lcat][$name][$ver])) { + debug("Duplicate package $bcat$lcat/$name-$ver"); // We don't really care about having correct info /* global $conf; $tbz=$conf['pkgdir_root'].'/'.$this->pkgdir.'/'.(isset($p[$cat][$name][$ver]['path'])?$p[$cat][$name][$ver]['path']:"$cat/$name-$ver.tbz2"); @@ -86,8 +86,8 @@ class sql_profile extends sql_row_obj { debug($this->pkgdir.": Duplicate package $cat/$name-$ver - current entry invalid, using new entry"); }*/ } - $p[$cat][$name][$ver]=array(); - $cur=&$p[$cat][$name][$ver]; + $p[$bcat][$lcat][$name][$ver]=array(); + $cur=&$p[$bcat][$lcat][$name][$ver]; } elseif (isset($cur, $val)) { switch($name) { case 'KEYWORDS': |