]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
using elgg_delete_river() rather than custom SQL in blog save action
authorcash <cash.costello@gmail.com>
Sat, 18 Jun 2011 19:57:37 +0000 (15:57 -0400)
committercash <cash.costello@gmail.com>
Sat, 18 Jun 2011 19:57:37 +0000 (15:57 -0400)
mod/blog/actions/blog/save.php

index c42845037ac3257df7b59f53cbd00308d95676fd..0720d61638ace28901d9f15818c670fb87377ba8 100644 (file)
@@ -148,9 +148,10 @@ if (!$error) {
                                $blog->save();
                        }
                } elseif ($old_status == 'published' && $status == 'draft') {
-                       $q = "DELETE FROM {$db_prefix}river
-                               WHERE object_guid = $blog->guid AND action_type = 'create'";
-                       delete_data($q);
+                       elgg_delete_river(array(
+                               'object_guid' => $blog->guid,
+                               'action_type' => 'create',
+                       ));
                }
 
                if ($blog->status == 'published') {