aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV.Krishn <vkrishn4@gmail.com>2016-07-09 19:59:16 +0530
committerV.Krishn <vkrishn4@gmail.com>2016-07-09 19:59:16 +0530
commitc9248a0c1d6c6c92c4e4394676cc37a005305f2f (patch)
tree02fcf505c0aea0ffd5fc116d65add09950c7ffc6
parent903c59f2ae54fa3e7fcfa71e93b28e9a66b3f8b3 (diff)
downloadaport-api-c9248a0c1d6c6c92c4e4394676cc37a005305f2f.tar.bz2
code clean
-rw-r--r--index.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/index.php b/index.php
index 48c34b0..2b57d76 100644
--- a/index.php
+++ b/index.php
@@ -1144,11 +1144,9 @@ function get_all_category() {
$cats = array();
# get all Repoversions available
$res = Repoversion::find();
- foreach($res as $m1) {
- foreach($t as $t1) { $m[$t1][] = $m1->$t1; }
+ foreach($t as $t1) {
+ $cats[$t1] = array_unique(array_column($res->toArray(), $t1));
}
- foreach($t as $t1) { $cats[$t1] = array_values(array_unique($m[$t1])); }
- unset($m, $m1, $res);
return $cats;
}