public function run() { $G = new Github(); $G->load_user(); $G->load_repos(); $arr = array(); foreach ($G->repos as $k => $v) { if ($v->owner->id == $_SESSION['user']['github_id']) { $owner = "You"; } else { $owner = $v->owner->login; } $arr[] = array('id' => $v->id, 'name' => $v->name, 'fullname' => $v->full_name, 'dateraw' => strtotime($v->updated_at), 'date' => strftime("%x", strtotime($v->updated_at)), 'url' => $v->html_url, 'owner' => $owner, 'status' => $v->status, 'confirmations' => $v->confirmations, 'address' => $v->address, 'transaction_hash' => $v->transaction_hash); } usort($arr, "arrsort"); $this->state['debug'] = print_r($G->repos, 1); $this->state['repos'] = $arr; $this->_load("dash.html"); }