]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/File_thumbnail.php
Improve name validation checks on local File references
[quix0rs-gnu-social.git] / classes / File_thumbnail.php
index 44b92a2fadd005c4be6282a100a55f0ee12200fc..f8b70356c7eda8a0cfbb64a5aafe1e6d29f187ec 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
- * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, 2009, Control Yourself, Inc.
+ * StatusNet - the distributed open-source microblogging tool
+ * Copyright (C) 2008, 2009, StatusNet, Inc.
  *
  * 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
@@ -17,7 +17,7 @@
  * along with this program.     If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
 
 require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
 
@@ -51,9 +51,9 @@ class File_thumbnail extends Memcached_DataObject
     function saveNew($data, $file_id) {
         $tn = new File_thumbnail;
         $tn->file_id = $file_id;
-        $tn->url = $data['thumbnail_url'];
-        $tn->width = intval($data['thumbnail_width']);
-        $tn->height = intval($data['thumbnail_height']);
+        $tn->url = $data->thumbnail_url;
+        $tn->width = intval($data->thumbnail_width);
+        $tn->height = intval($data->thumbnail_height);
         $tn->insert();
     }
 }