2008-05-08 02:15:42 +09:00
|
|
|
<?php
|
2008-05-21 04:14:12 +09:00
|
|
|
/*
|
2009-08-26 07:14:12 +09:00
|
|
|
* StatusNet - the distributed open-source microblogging tool
|
2009-08-26 07:12:20 +09:00
|
|
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
2008-05-21 04:14:12 +09:00
|
|
|
*
|
2008-05-15 04:26:48 +09:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2008-05-21 04:14:12 +09:00
|
|
|
*
|
2008-05-15 04:26:48 +09:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
2008-05-21 04:14:12 +09:00
|
|
|
*
|
2008-05-15 04:26:48 +09:00
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2009-08-26 23:41:36 +09:00
|
|
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
2008-05-15 04:26:48 +09:00
|
|
|
|
2008-05-08 02:15:42 +09:00
|
|
|
/**
|
|
|
|
* Table Definition for remote_profile
|
|
|
|
*/
|
2008-09-27 01:18:24 +09:00
|
|
|
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
|
2008-05-08 02:15:42 +09:00
|
|
|
|
2010-09-29 06:42:18 +09:00
|
|
|
class Remote_profile extends Memcached_DataObject
|
2008-05-08 02:15:42 +09:00
|
|
|
{
|
|
|
|
###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
|
2008-05-23 03:41:09 +09:00
|
|
|
public $uri; // varchar(255) unique_key
|
2010-09-29 06:42:18 +09:00
|
|
|
public $postnoticeurl; // varchar(255)
|
|
|
|
public $updateprofileurl; // varchar(255)
|
2008-05-08 02:15:42 +09:00
|
|
|
public $created; // datetime() not_null
|
|
|
|
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
|
|
|
|
|
|
|
|
/* Static get */
|
2008-12-24 04:33:23 +09:00
|
|
|
function staticGet($k,$v=null)
|
|
|
|
{ return Memcached_DataObject::staticGet('Remote_profile',$k,$v); }
|
2008-05-08 02:15:42 +09:00
|
|
|
|
|
|
|
/* the code above is auto generated do not remove the tag below */
|
|
|
|
###END_AUTOCODE
|
2010-09-29 06:42:18 +09:00
|
|
|
|
2009-11-26 07:10:55 +09:00
|
|
|
function hasRight($right)
|
|
|
|
{
|
|
|
|
$profile = Profile::staticGet($this->id);
|
|
|
|
if ($profile) {
|
|
|
|
return $profile->hasright($right);
|
|
|
|
} else {
|
2010-07-29 20:36:08 +09:00
|
|
|
// TRANS: Exception thrown when a right for a non-existing user profile is checked.
|
|
|
|
throw new Exception(_("Missing profile."));
|
2009-11-26 07:10:55 +09:00
|
|
|
}
|
|
|
|
}
|
2008-05-08 02:15:42 +09:00
|
|
|
}
|