aboutsummaryrefslogtreecommitdiff
path: root/upgrades/2009082901.php
diff options
context:
space:
mode:
Diffstat (limited to 'upgrades/2009082901.php')
-rw-r--r--upgrades/2009082901.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/upgrades/2009082901.php b/upgrades/2009082901.php
new file mode 100644
index 000000000..dfbdf79f4
--- /dev/null
+++ b/upgrades/2009082901.php
@@ -0,0 +1,29 @@
+<?php
+
+/********************************************
+ *
+ * Upgrade from Tidypics 1.5 to 1.6
+ *
+ *********************************************/
+
+global $CONFIG;
+
+// add image class
+$id = get_subtype_id("object", "image");
+if ($id != 0) {
+ $table = $CONFIG->dbprefix . 'entity_subtypes';
+ $result = update_data("UPDATE {$table} set class='TidypicsImage' where id={$id}");
+ if (!$result) {
+ register_error('unable to update tidypics image class');
+ }
+}
+
+// add album class
+$id = get_subtype_id("object", "album");
+if ($id != 0) {
+ $table = $CONFIG->dbprefix . 'entity_subtypes';
+ $result = update_data("UPDATE {$table} set class='TidypicsAlbum' where id={$id}");
+ if (!$result) {
+ register_error('unable to update tidypics album class');
+ }
+}