PageRenderTime 34ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/updates/DM-063-064-Update.php

https://bitbucket.org/mpercy/deeemm-cms
PHP | 28 lines | 8 code | 9 blank | 11 comment | 0 complexity | 4ee6ace3071878dcf856ffc7e0e1dbb6 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause
  1. <?php
  2. defined( '_INDM' ) or die( 'POSSIBLE HACK ATTEMPT!' );
  3. //===========================================================================
  4. $new_version = '0.6.4 (BETA)';
  5. /*===========================================================================
  6. //>update version number
  7. ===========================================================================*/
  8. mysql_query("UPDATE `" . $db_table_prefix . "admin` SET `version` = '$new_version' WHERE `id` = 0") OR DIE ("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $sql_query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
  9. echo $version . ' -> ' . $new_version . ' Update<br><br>';
  10. /*===========================================================================
  11. //>update control tables in database
  12. ===========================================================================*/
  13. mysql_query("ALTER TABLE `" . $db_table_prefix . "core_users` ADD UNIQUE(`user_name`)") OR DIE ("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $sql_query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
  14. mysql_query("ALTER TABLE `" . $db_table_prefix . "core_structure` ADD `allow_comments` varchar(2) NOT NULL AFTER `display_in_sitemap`") OR DIE ("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $sql_query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
  15. /*===========================================================================
  16. //>update non control (content) tables in database
  17. ===========================================================================*/
  18. //No changes
  19. ?>