foreach (array(AVATAR_PROFILE_SIZE, AVATAR_STREAM_SIZE, AVATAR_MINI_SIZE) as $size) {
# We don't do a scaled one if original is our scaled size
if (!($avatar->width == $size && $avatar->height == $size)) {
-
$scaled_filename = $imagefile->resize($size);
//$scaled = DB_DataObject::factory('avatar');
* @param $right string Name of the right, usually a constant in class Right
* @return boolean whether the user has the right in question
*/
-
function hasRight($right)
{
$result = false;
+
if ($this->hasRole(Profile_role::DELETED)) {
return false;
}
+
if (Event::handle('UserRightsCheck', array($this, $right, &$result))) {
switch ($right)
{
###END_AUTOCODE
static function getTags($tagger, $tagged) {
-
$tags = array();
# XXX: store this in memcached
}
static function setTags($tagger, $tagged, $newtags) {
-
$newtags = array_unique($newtags);
$oldtags = Profile_tag::getTags($tagger, $tagged);
*/
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
-class Remember_me extends Memcached_DataObject
+class Remember_me extends Memcached_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
/* Static get */
function staticGet($k,$v=null)
- { return Memcached_DataObject::staticGet('Remember_me',$k,$v); }
+ {
+ return Memcached_DataObject::staticGet('Remember_me',$k,$v);
+ }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
function sequenceKey()
- { return array(false, false); }
+ {
+ return array(false, false);
+ }
}
*/
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
-class Remote_profile extends Memcached_DataObject
+class Remote_profile extends Memcached_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
public $__table = 'remote_profile'; // table name
public $id; // int(4) primary_key not_null
public $uri; // varchar(255) unique_key
- public $postnoticeurl; // varchar(255)
- public $updateprofileurl; // varchar(255)
+ public $postnoticeurl; // varchar(255)
+ public $updateprofileurl; // varchar(255)
public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
-
+
function hasRight($right)
{
$profile = Profile::staticGet($this->id);
return Safe_DataObject::$iniCache[$key];
}
}
-
*/
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
-class Sms_carrier extends Memcached_DataObject
+class Sms_carrier extends Memcached_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
-
+
function toEmailAddress($sms)
{
return sprintf($this->email_pattern, $sms);
$orig->decache();
$result = $this->query($qry);
$this->decache();
-
+
return $result;
}
-
+
function delete()
{
$this->decache(); # while we still have the values!
return parent::delete();
}
-
+
/**
* @param string $servername hostname
* @param string $wildcard hostname suffix to match wildcard config
if (empty($result)) {
return explode('|', $this->tags);
}
-
+
return $result;
}
$snt->site_id = $this->site_id;
$snt->tag = $tag;
$snt->created = common_sql_now();
-
+
$id = $snt->insert();
if (!$id) {
// TRANS: Exception thrown when a tag cannot be saved.
$tag->free();
}
-
+
/**
* Check if this site record has a particular meta-info tag attached.
* @param string $tag
public $__table = 'status_network_tag'; // table name
public $site_id; // int(4) primary_key not_null
- public $tag; // varchar(64) primary_key not_null
+ public $tag; // varchar(64) primary_key not_null
public $created; // datetime() not_null
{
global $config;
global $_DB_DATAOBJECT;
-
+
$sn = new Status_network();
$sn->_connect();
common_date_iso8601($this->created));
$act->time = strtotime($this->created);
+ // TRANS: Activity tile when subscribing to another person.
$act->title = _("Follow");
- $act->content = sprintf(_("%s is now following %s."),
+ // TRANS: Notification given when one person starts following another.
+ // TRANS: %1$s is the subscriber, %2$s is the subscribed.
+ $act->content = sprintf(_("%1$s is now following %2$s."),
$subscriber->getBestName(),
$subscribed->getBestName());
}
static function register($fields) {
-
// MAGICALLY put fields into current scope
extract($fields);
/* Static get */
function staticGet($k,$v=null)
- { return Memcached_DataObject::staticGet('User_username',$k,$v); }
+ {
+ return Memcached_DataObject::staticGet('User_username',$k,$v);
+ }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
$user_username->provider_name = $provider_name;
$user_username->username = $username;
$user_username->created = DB_DataObject_Cast::dateTime();
+
if($user_username->insert()){
return $user_username;
}else{
function keys() {
return array('provider_name' => 'K', 'username' => 'K');
}
-
}