]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Status_network.php
Fix PHP syntax errors introduced during localization fixups in a few files.
[quix0rs-gnu-social.git] / classes / Status_network.php
index 339f4c813b5f6d030bd59cf69c550d8ca3cb1435..70c7a58eb7488040b3df886c54ade9e361f770be 100644 (file)
@@ -167,9 +167,8 @@ class Status_network extends Safe_DataObject
             ' WHERE nickname = ' . $this->_quote($this->nickname);
         $orig->decache();
         $result = $this->query($qry);
-        if ($result) {
-            $this->encache();
-        }
+        $this->decache();
+        
         return $result;
     }
     
@@ -308,22 +307,20 @@ class Status_network extends Safe_DataObject
      */
     function getTags()
     {
-        $result = array();
-        
-        $tags = new Status_network_tag();
-        $tags->site_id = $this->site_id;
-        if ($tags->find()) {
-            while ($tags->fetch()) {
-                $result[] = $tags->tag;
-            }
-        }
+        $result = Status_network_tag::getTags($this->site_id);
 
+        // XXX : for backwards compatibility
+        if (empty($result)) {
+            return explode('|', $this->tags);
+        }
+        
         return $result;
     }
 
     /**
      * Save a given set of tags
      * @param array tags
+     * @fixme only add/remove differentials
      */
     function setTags($tags)
     {
@@ -337,6 +334,7 @@ class Status_network extends Safe_DataObject
                 
                 $id = $snt->insert();
                 if (!$id) {
+                    // TRANS: Exception thrown when a tag cannot be saved.
                     throw new Exception(_("Unable to save tag."));
                 }
             }