update.php 622 B

1234567891011121314151617
  1. <?php
  2. define('LYCHEE', true);
  3. // Include
  4. require('check.php');
  5. if($error=='') {
  6. if(!$database->query("SELECT `public` FROM `lychee_albums`;")) $database->query("ALTER TABLE `lychee_albums` ADD `public` TINYINT( 1 ) NOT NULL DEFAULT '0'");
  7. if(!$database->query("SELECT `password` FROM `lychee_albums`;")) $database->query("ALTER TABLE `lychee_albums` ADD `password` VARCHAR( 100 ) NULL DEFAULT NULL");
  8. $database->query("UPDATE `lychee_photos` SET url = replace(url, 'uploads/big/', ''), thumbUrl = replace(thumbUrl, 'uploads/thumb/', '')");
  9. echo "\nUpdate complete!";
  10. } else {
  11. echo "\nCould not Update!";
  12. }
  13. ?>