* i18n/L10n and translator documentation updates.
* whitespace and indentation updates
This commit is contained in:
parent
b03ece26eb
commit
9587f9f55b
@ -103,7 +103,6 @@ class Profile extends Memcached_DataObject
|
||||
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');
|
||||
@ -790,13 +789,14 @@ class Profile extends Memcached_DataObject
|
||||
* @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)
|
||||
{
|
||||
|
@ -23,7 +23,6 @@ class Profile_tag extends Memcached_DataObject
|
||||
###END_AUTOCODE
|
||||
|
||||
static function getTags($tagger, $tagged) {
|
||||
|
||||
$tags = array();
|
||||
|
||||
# XXX: store this in memcached
|
||||
@ -44,7 +43,6 @@ class Profile_tag extends Memcached_DataObject
|
||||
}
|
||||
|
||||
static function setTags($tagger, $tagged, $newtags) {
|
||||
|
||||
$newtags = array_unique($newtags);
|
||||
$oldtags = Profile_tag::getTags($tagger, $tagged);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*/
|
||||
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 */
|
||||
@ -16,11 +16,15 @@ class Remember_me extends Memcached_DataObject
|
||||
|
||||
/* 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);
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
*/
|
||||
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 */
|
||||
@ -32,8 +32,8 @@ class Remote_profile extends Memcached_DataObject
|
||||
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
|
||||
|
||||
@ -43,7 +43,7 @@ class Remote_profile extends Memcached_DataObject
|
||||
|
||||
/* the code above is auto generated do not remove the tag below */
|
||||
###END_AUTOCODE
|
||||
|
||||
|
||||
function hasRight($right)
|
||||
{
|
||||
$profile = Profile::staticGet($this->id);
|
||||
|
@ -287,4 +287,3 @@ class Safe_DataObject extends DB_DataObject
|
||||
return Safe_DataObject::$iniCache[$key];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*/
|
||||
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 */
|
||||
@ -22,7 +22,7 @@ class Sms_carrier extends Memcached_DataObject
|
||||
|
||||
/* the code above is auto generated do not remove the tag below */
|
||||
###END_AUTOCODE
|
||||
|
||||
|
||||
function toEmailAddress($sms)
|
||||
{
|
||||
return sprintf($this->email_pattern, $sms);
|
||||
|
@ -168,16 +168,16 @@ class Status_network extends Safe_DataObject
|
||||
$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
|
||||
@ -313,7 +313,7 @@ class Status_network extends Safe_DataObject
|
||||
if (empty($result)) {
|
||||
return explode('|', $this->tags);
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -331,7 +331,7 @@ class Status_network extends Safe_DataObject
|
||||
$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.
|
||||
@ -356,7 +356,7 @@ class Status_network extends Safe_DataObject
|
||||
|
||||
$tag->free();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if this site record has a particular meta-info tag attached.
|
||||
* @param string $tag
|
||||
|
@ -26,7 +26,7 @@ class Status_network_tag extends Safe_DataObject
|
||||
|
||||
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
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ class Status_network_tag extends Safe_DataObject
|
||||
{
|
||||
global $config;
|
||||
global $_DB_DATAOBJECT;
|
||||
|
||||
|
||||
$sn = new Status_network();
|
||||
$sn->_connect();
|
||||
|
||||
|
@ -251,8 +251,11 @@ class Subscription extends Memcached_DataObject
|
||||
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());
|
||||
|
||||
|
@ -465,7 +465,6 @@ class User_group extends Memcached_DataObject
|
||||
}
|
||||
|
||||
static function register($fields) {
|
||||
|
||||
// MAGICALLY put fields into current scope
|
||||
|
||||
extract($fields);
|
||||
|
@ -18,7 +18,9 @@ class User_username extends Memcached_DataObject
|
||||
|
||||
/* 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
|
||||
@ -37,6 +39,7 @@ class User_username extends Memcached_DataObject
|
||||
$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{
|
||||
@ -57,5 +60,4 @@ class User_username extends Memcached_DataObject
|
||||
function keys() {
|
||||
return array('provider_name' => 'K', 'username' => 'K');
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user