]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Notice.php
remove duplicate save of Notice and streamline attachment detection
[quix0rs-gnu-social.git] / classes / Notice.php
index 442eb00fdb2333de84025cee7f1c5e2241e30108..28d5b8ddf940bb2f7bbed2e50c2ea69e7a8140ff 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); }
 
 /**
  * Table Definition for notice
@@ -58,7 +58,7 @@ class Notice extends Memcached_DataObject
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
 
-    /* Notice types */ 
+    /* Notice types */
     const LOCAL_PUBLIC    =  1;
     const REMOTE_OMB      =  0;
     const LOCAL_NONPUBLIC = -1;
@@ -248,17 +248,6 @@ class Notice extends Memcached_DataObject
 
             $notice->saveUrls();
 
-            // FIXME: why do we have to re-render the content?
-            // Remove this if it's not necessary.
-
-            $orig2 = clone($notice);
-
-            $notice->rendered = common_render_content($final, $notice);
-            if (!$notice->update($orig2)) {
-                common_log_db_error($notice, 'UPDATE', __FILE__);
-                return _('Problem saving notice.');
-            }
-
             $notice->query('COMMIT');
 
             Event::handle('EndNoticeSave', array($notice));