reverse order of queries for galleries
darcs-hash:20080911144742-84dde-235a1af2d958500b1f1c503f21785284ca4b5c8a.gz
This commit is contained in:
parent
9805deccb3
commit
a482123fea
|
@ -31,17 +31,22 @@ class GalleryAction extends Action {
|
||||||
|
|
||||||
function handle($args) {
|
function handle($args) {
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
$nickname = $this->arg('nickname');
|
$nickname = common_canonical_nickname($this->arg('nickname'));
|
||||||
$profile = Profile::staticGet('nickname', $nickname);
|
|
||||||
if (!$profile) {
|
$user = User::staticGet('nickname', $nickname);
|
||||||
$this->no_such_user();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$user = User::staticGet($profile->id);
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
$this->no_such_user();
|
$this->no_such_user();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$profile = $user->getProfile();
|
||||||
|
|
||||||
|
if (!$profile) {
|
||||||
|
$this->server_error(_('User without matching profile in system.'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$page = $this->arg('page');
|
$page = $this->arg('page');
|
||||||
if (!$page) {
|
if (!$page) {
|
||||||
$page = 1;
|
$page = 1;
|
||||||
|
@ -99,7 +104,7 @@ class GalleryAction extends Action {
|
||||||
common_log(LOG_WARNING, 'No matching profile for ' . $other_id);
|
common_log(LOG_WARNING, 'No matching profile for ' . $other_id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
common_element_start('li');
|
common_element_start('li');
|
||||||
|
|
||||||
common_element_start('a', array('title' => ($other->fullname) ?
|
common_element_start('a', array('title' => ($other->fullname) ?
|
||||||
|
|
Loading…
Reference in New Issue