return Memcached_DataObject::pkeyGet('Avatar', $kv);
}
- // where should the avatar go for this user?
-
+ /**
+ * Where should the avatar go for this user?
+ */
static function filename($id, $extension, $size=null, $extra=null)
{
if ($size) {
$nonce->consumer_key = $this->consumer_key;
$nonce->delete();
}
-
}
common_date_iso8601($this->modified));
$act->time = strtotime($this->modified);
+ // TRANS: Activity title when marking a notice as favorite.
$act->title = _("Favor");
- $act->content = sprintf(_("%s marked notice %s as a favorite."),
+ // TRANS: Ntofication given when a user marks a notice as favorite.
+ // TRANS: %1$s is a user nickname or full name, %2$s is a notice URI.
+ $act->content = sprintf(_("%1$s marked notice %2$s as a favorite."),
$profile->getBestName(),
$notice->uri);
/**
* Table Definition for file
*/
-
class File extends Memcached_DataObject
{
###START_AUTOCODE
$file_redir->insert();
}
}
-
return Memcached_DataObject::pkeyGet('File_to_post', $kv);
}
}
-
$result = $flink->find(true);
return empty($result) ? null : $flink;
-
}
static function getByForeignID($foreign_id, $service)
return false;
}
}
-
}
*/
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
-class Foreign_service extends Memcached_DataObject
+class Foreign_service extends Memcached_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
public $__table = 'foreign_service'; // table name
public $id; // int(4) primary_key not_null
public $name; // varchar(32) unique_key not_null
- public $description; // varchar(255)
+ public $description; // varchar(255)
public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
*/
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
-class Foreign_subscription extends Memcached_DataObject
+class Foreign_subscription extends Memcached_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
<?php
+
/**
* Table Definition for group_inbox
*/
-
class Group_inbox extends Memcached_DataObject
{
###START_AUTOCODE
$member = Profile::staticGet('id', $this->profile_id);
if (empty($member)) {
- throw new Exception("Profile ID {$this->profile_id} invalid.");
+ // TRANS: Exception thrown providing an invalid profile ID.
+ // TRANS: %s is the invalid profile ID.
+ throw new Exception(sprintf(_("Profile ID %s is invalid."),$this->profile_id));
}
return $member;
$group = User_group::staticGet('id', $this->group_id);
if (empty($group)) {
- throw new Exception("Group ID {$this->group_id} invalid.");
+ // TRANS: Exception thrown providing an invalid group ID.
+ // TRANS: %s is the invalid group ID.
+ throw new Exception(sprintf(_("Group ID %s is invalid."),$this->group_id));
}
return $group;
$act->objects[] = ActivityObject::fromGroup($group);
$act->time = strtotime($this->created);
+ // TRANS: Activity title.
$act->title = _("Join");
// TRANS: Success message for subscribe to group attempt through OStatus.
/**
* Create a new inbox from existing Notice_inbox stuff
*/
-
static function initialize($user_id)
{
$inbox = Inbox::fromNoticeInbox($user_id);
*/
static function insertNotice($user_id, $notice_id)
{
- // Going straight to the DB rather than trusting our caching
- // during an update. Note: not using DB_DataObject::staticGet,
- // which is unsafe to use directly (in-process caching causes
- // memory leaks, which accumulate in queue processes).
+ // Going straight to the DB rather than trusting our caching
+ // during an update. Note: not using DB_DataObject::staticGet,
+ // which is unsafe to use directly (in-process caching causes
+ // memory leaks, which accumulate in queue processes).
$inbox = new Inbox();
if (!$inbox->get('user_id', $user_id)) {
$inbox = Inbox::initialize($user_id);
*/
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
-class Invitation extends Memcached_DataObject
+class Invitation extends Memcached_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
str_replace("\n", " ", $e->getTraceAsString()));
return false;
} else {
- $keys = $this->_allCacheKeys();
+ $keys = $this->_allCacheKeys();
- foreach ($keys as $key) {
- $c->set($key, $this);
- }
+ foreach ($keys as $key) {
+ $c->set($key, $this);
+ }
}
}
return $vstr;
}
}
-
}
static function saveNew($from, $to, $content, $source) {
-
$sender = Profile::staticGet('id', $from);
if (!$sender->hasRight(Right::NEWMESSAGE)) {
{
return array('consumer_key,token' => 'token:consumer_key,token');
}
-
}
1,
1
);
+
if ($conversation->N > 0) {
return true;
}
}
if (Event::handle('StartActivitySource', array(&$this, &$xs))) {
-
if ($source) {
-
$atom_feed = $profile->getAtomFeed();
if (!empty($atom_feed)) {
-
$xs->elementStart('source');
// XXX: we should store the actual feed ID
$options = array();
if (!empty($location_id) && !empty($location_ns)) {
-
$options['location_id'] = $location_id;
$options['location_ns'] = $location_ns;
}
} else if (!empty($lat) && !empty($lon)) {
-
$options['lat'] = $lat;
$options['lon'] = $lon;
$options['location_ns'] = $location->location_ns;
}
} else if (!empty($profile)) {
-
if (isset($profile->lat) && isset($profile->lon)) {
$options['lat'] = $profile->lat;
$options['lon'] = $profile->lon;
*/
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
-class Notice_source extends Memcached_DataObject
+class Notice_source extends Memcached_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
*
* @return void
*/
-
function uploadLogo()
{
if ($_FILES['app_icon']['error'] ==
$oauser->application_id = $this->id;
$oauser->delete();
}
-
}
return empty($result) ? null : $oau;
}
-
}