2009082901.php 742 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /********************************************
  3. *
  4. * Upgrade from Tidypics 1.5 to 1.6
  5. *
  6. *********************************************/
  7. global $CONFIG;
  8. // add image class
  9. $id = get_subtype_id("object", "image");
  10. if ($id != 0) {
  11. $table = $CONFIG->dbprefix . 'entity_subtypes';
  12. $result = update_data("UPDATE {$table} set class='TidypicsImage' where id={$id}");
  13. if (!$result) {
  14. register_error('unable to update tidypics image class');
  15. }
  16. }
  17. // add album class
  18. $id = get_subtype_id("object", "album");
  19. if ($id != 0) {
  20. $table = $CONFIG->dbprefix . 'entity_subtypes';
  21. $result = update_data("UPDATE {$table} set class='TidypicsAlbum' where id={$id}");
  22. if (!$result) {
  23. register_error('unable to update tidypics album class');
  24. }
  25. }