]> git.mjollnir.org Git - s9y.git/commitdiff
Fix deleting entryproperties without inserting the properly.
authorgarvinhicking <garvinhicking>
Mon, 15 Aug 2005 11:43:52 +0000 (11:43 +0000)
committergarvinhicking <garvinhicking>
Mon, 15 Aug 2005 11:43:52 +0000 (11:43 +0000)
This has lead to some strange re-setting of saved properties and is now fixed.

plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php

index b306459fd7d6cf8f8bee802a05fb2bedd0e4406d..9456eb54742d0947b993d39f283f4c527e4142f8 100644 (file)
@@ -177,7 +177,7 @@ class serendipity_event_entryproperties extends serendipity_event
             $q = "DELETE FROM {$serendipity['dbPrefix']}entryproperties WHERE entryid = " . (int)$eventData['id'] . " AND property = '" . serendipity_db_escape_string($prop_key) . "'";
             serendipity_db_query($q);
 
-            if (!isset($property[$prop_key]) && !empty($prop_val) || $property[$prop_key] != $prop_val && !empty($prop_val)) {
+            if (!empty($prop_val)) {
                 $q = "INSERT INTO {$serendipity['dbPrefix']}entryproperties (entryid, property, value) VALUES (" . (int)$eventData['id'] . ", '" . serendipity_db_escape_string($prop_key) . "', '" . serendipity_db_escape_string($prop_val) . "')";
                 serendipity_db_query($q);
             }