summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-02-05 02:08:37 +0000
committerZach Copley <zach@status.net>2010-02-05 02:08:37 +0000
commit8d320d7cc2998a4977c5de4ba571ea4f95b21dce (patch)
treeeb8903c9a07126b88e4112de5d83a22dba2a1073 /actions
parent10dfcde0b2099a169ccd3af0ecfbf2de9da551d6 (diff)
parent509c8fc51589a4cc6a3281e012ce759ab9bed532 (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'actions')
-rw-r--r--actions/apigroupjoin.php2
-rw-r--r--actions/apigroupleave.php2
-rw-r--r--actions/favorited.php3
-rw-r--r--actions/publictagcloud.php3
-rw-r--r--actions/register.php4
-rw-r--r--actions/userauthorization.php21
6 files changed, 24 insertions, 11 deletions
diff --git a/actions/apigroupjoin.php b/actions/apigroupjoin.php
index 3309d63e7..374cf83df 100644
--- a/actions/apigroupjoin.php
+++ b/actions/apigroupjoin.php
@@ -145,7 +145,7 @@ class ApiGroupJoinAction extends ApiAuthAction
switch($this->format) {
case 'xml':
- $this->show_single_xml_group($this->group);
+ $this->showSingleXmlGroup($this->group);
break;
case 'json':
$this->showSingleJsonGroup($this->group);
diff --git a/actions/apigroupleave.php b/actions/apigroupleave.php
index 6f8d40527..9848ece05 100644
--- a/actions/apigroupleave.php
+++ b/actions/apigroupleave.php
@@ -131,7 +131,7 @@ class ApiGroupLeaveAction extends ApiAuthAction
switch($this->format) {
case 'xml':
- $this->show_single_xml_group($this->group);
+ $this->showSingleXmlGroup($this->group);
break;
case 'json':
$this->showSingleJsonGroup($this->group);
diff --git a/actions/favorited.php b/actions/favorited.php
index 9ffa5b844..d8980440d 100644
--- a/actions/favorited.php
+++ b/actions/favorited.php
@@ -186,10 +186,13 @@ class FavoritedAction extends Action
function showContent()
{
$weightexpr = common_sql_weight('fave.modified', common_config('popular', 'dropoff'));
+ $cutoff = sprintf("fave.modified > '%s'",
+ common_sql_date(time() - common_config('popular', 'cutoff')));
$qry = 'SELECT notice.*, '.
$weightexpr . ' as weight ' .
'FROM notice JOIN fave ON notice.id = fave.notice_id ' .
+ "WHERE $cutoff " .
'GROUP BY id,profile_id,uri,content,rendered,url,created,notice.modified,reply_to,is_local,source,notice.conversation ' .
'ORDER BY weight DESC';
diff --git a/actions/publictagcloud.php b/actions/publictagcloud.php
index 9e4478dbb..9993b2d3f 100644
--- a/actions/publictagcloud.php
+++ b/actions/publictagcloud.php
@@ -106,7 +106,10 @@ class PublictagcloudAction extends Action
#Add the aggregated columns...
$tags->selectAdd('max(notice_id) as last_notice_id');
$calc = common_sql_weight('created', common_config('tag', 'dropoff'));
+ $cutoff = sprintf("notice_tag.created > '%s'",
+ common_sql_date(time() - common_config('tag', 'cutoff')));
$tags->selectAdd($calc . ' as weight');
+ $tags->addWhere($cutoff);
$tags->groupBy('tag');
$tags->orderBy('weight DESC');
diff --git a/actions/register.php b/actions/register.php
index 698137346..ccab76cf0 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -280,7 +280,7 @@ class RegisterAction extends Action
function nicknameExists($nickname)
{
$user = User::staticGet('nickname', $nickname);
- return ($user !== false);
+ return is_object($user);
}
/**
@@ -300,7 +300,7 @@ class RegisterAction extends Action
return false;
}
$user = User::staticGet('email', $email);
- return ($user !== false);
+ return is_object($user);
}
// overrrided to add entry-title class
diff --git a/actions/userauthorization.php b/actions/userauthorization.php
index 4321f1302..7f71c60db 100644
--- a/actions/userauthorization.php
+++ b/actions/userauthorization.php
@@ -127,10 +127,10 @@ class UserauthorizationAction extends Action
$location = $params->getLocation();
$avatar = $params->getAvatarURL();
- $this->elementStart('div', array('class' => 'profile'));
$this->elementStart('div', 'entity_profile vcard');
- $this->elementStart('a', array('href' => $profile,
- 'class' => 'url'));
+ $this->elementStart('dl', 'entity_depiction');
+ $this->element('dt', null, _('Photo'));
+ $this->elementStart('dd');
if ($avatar) {
$this->element('img', array('src' => $avatar,
'class' => 'photo avatar',
@@ -138,11 +138,19 @@ class UserauthorizationAction extends Action
'height' => AVATAR_PROFILE_SIZE,
'alt' => $nickname));
}
+ $this->elementEnd('dd');
+ $this->elementEnd('dl');
+
+ $this->elementStart('dl', 'entity_nickname');
+ $this->element('dt', null, _('Nickname'));
+ $this->elementStart('dd');
$hasFN = ($fullname !== '') ? 'nickname' : 'fn nickname';
- $this->elementStart('span', $hasFN);
+ $this->elementStart('a', array('href' => $profile,
+ 'class' => 'url '.$hasFN));
$this->raw($nickname);
- $this->elementEnd('span');
$this->elementEnd('a');
+ $this->elementEnd('dd');
+ $this->elementEnd('dl');
if (!is_null($fullname)) {
$this->elementStart('dl', 'entity_fn');
@@ -214,7 +222,6 @@ class UserauthorizationAction extends Action
$this->elementEnd('li');
$this->elementEnd('ul');
$this->elementEnd('div');
- $this->elementEnd('div');
}
function sendAuthorization()
@@ -350,4 +357,4 @@ class UserauthorizationAction extends Action
}
}
}
-} \ No newline at end of file
+}