* @param string $given_url
* @return File
*/
- function saveNew(array $redir_data, $given_url) {
+ public static function saveNew(array $redir_data, $given_url) {
// I don't know why we have to keep doing this but I'm adding this last check to avoid
// uniqueness bugs.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
-
-require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
-require_once INSTALLDIR.'/classes/File_redirection.php';
+if (!defined('GNUSOCIAL')) { exit(1); }
/**
* Table Definition for file_oembed
class File_oembed extends Managed_DataObject
{
- ###START_AUTOCODE
- /* the code below is auto generated do not remove the above tag */
-
public $__table = 'file_oembed'; // table name
public $file_id; // int(4) primary_key not_null
public $version; // varchar(20)
public $url; // varchar(255)
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
- /* the code above is auto generated do not remove the tag below */
- ###END_AUTOCODE
-
public static function schemaDef()
{
return array(
* @param object $data Services_oEmbed_Object_*
* @param int $file_id
*/
- function saveNew($data, $file_id) {
+ public static function saveNew($data, $file_id) {
$file_oembed = new File_oembed;
$file_oembed->file_id = $file_id;
if (!isset($data->version)) {