bit of work on app management

This commit is contained in:
Robin Appelman 2011-08-11 15:11:06 +02:00
parent 592eacf37d
commit bc5bf18eed
2 changed files with 21 additions and 10 deletions

View File

@ -45,8 +45,19 @@ foreach($registeredApps as $app){
} }
} }
$categories=OC_OCSClient::getCategories(); $categories=array_keys(OC_OCSClient::getCategories());
// print_r($categories); $externalApps=OC_OCSClient::getApplications($categories);
foreach($externalApps as $app){
$apps[]=array(
'name'=>$app['name'],
'id'=>$app['id'],
'active'=>false,
'description'=>$app['description'],
'author'=>$app['personid'],
);
}
$tmpl = new OC_Template( "admin", "apps", "user" ); $tmpl = new OC_Template( "admin", "apps", "user" );
$tmpl->assign('apps',$apps); $tmpl->assign('apps',$apps);

View File

@ -80,15 +80,15 @@ class OC_OCSClient{
$tmp=$data->data->content; $tmp=$data->data->content;
for($i = 0; $i < count($tmp); $i++) { for($i = 0; $i < count($tmp); $i++) {
$app=array(); $app=array();
$app['id']=$tmp[$i]->id; $app['id']=(string)$tmp[$i]->id;
$app['name']=$tmp[$i]->name; $app['name']=(string)$tmp[$i]->name;
$app['type']=$tmp[$i]->typeid; $app['type']=(string)$tmp[$i]->typeid;
$app['typename']=$tmp[$i]->typename; $app['typename']=(string)$tmp[$i]->typename;
$app['personid']=$tmp[$i]->personid; $app['personid']=(string)$tmp[$i]->personid;
$app['detailpage']=$tmp[$i]->detailpage; $app['detailpage']=(string)$tmp[$i]->detailpage;
$app['preview']=$tmp[$i]->smallpreviewpic1; $app['preview']=(string)$tmp[$i]->smallpreviewpic1;
$app['changed']=strtotime($tmp[$i]->changed); $app['changed']=strtotime($tmp[$i]->changed);
$app['description']=$tmp[$i]->description; $app['description']=(string)$tmp[$i]->description;
$apps[]=$app; $apps[]=$app;
} }