/** * @see wcf\data\DatabaseObjectList::readObjects() */ public function readObjects() { parent::readObjects(); foreach ($this->objects as &$application) { $application = new ViewableApplication($application); } unset($application); }
function showContent() { $offset = ($this->page - 1) * APPS_PER_PAGE; $limit = APPS_PER_PAGE + 1; $application = new Oauth_application(); $application->owner = $this->scoped->getID(); $application->whereAdd("name != 'anonymous'"); $application->limit($offset, $limit); $application->orderBy('created DESC'); $application->find(); $cnt = 0; if ($application) { $al = new ApplicationList($application, $this->scoped, $this); $cnt = $al->show(); if (0 == $cnt) { $this->showEmptyListMessage(); } } $this->elementStart('p', array('id' => 'application_register')); $this->element('a', array('href' => common_local_url('newapplication'), 'class' => 'more'), 'Register a new application'); $this->elementEnd('p'); $this->pagination($this->page > 1, $cnt > APPS_PER_PAGE, $this->page, 'oauthappssettings'); }
/** * Content area of the page * * @return void */ function showContent() { $user = common_current_user(); $profile = $user->getProfile(); $offset = ($this->page - 1) * APPS_PER_PAGE; $limit = APPS_PER_PAGE + 1; $application = $profile->getApplications($offset, $limit); $cnt = 0; if (!empty($application)) { $al = new ApplicationList($application, $user, $this, true); $cnt = $al->show(); } if ($cnt == 0) { $this->showEmptyListMessage(); } $this->pagination($this->page > 1, $cnt > APPS_PER_PAGE, $this->page, 'connectionssettings', array('nickname' => $user->nickname)); }