KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.2KB

  1. <?php
  2. function remove_signature_add_updated_at() {
  3. if (SQL::current()->query("SELECT signature FROM __comments"))
  4. echo __("Removing signature column from comments table...", "comments").
  5. test(SQL::current()->query("ALTER TABLE __comments DROP COLUMN signature"));
  6. if (!SQL::current()->query("SELECT updated_at FROM __comments"))
  7. echo __("Adding updated_at column to comments table...", "comments").
  8. test(SQL::current()->query("ALTER TABLE __comments ADD updated_at DATETIME DEFAULT NULL AFTER created_at"));
  9. }
  10. function remove_defensio_set_akismet() {
  11. if (!Config::check("defensio_api_key")) {
  12. Config::fallback("defensio_api_key", " ", "Adding a temporary defensio_api_key...");
  13. Config::set("akismet_api_key", " ", "Creating akismet_api_key setting...");
  14. Config::remove("defensio_api_key");
  15. } else {
  16. Config::remove("defensio_api_key");
  17. Config::set("akismet_api_key", " ", "Creating akismet_api_key setting...");
  18. }
  19. }
  20. Config::fallback("auto_reload_comments", 30);
  21. Config::fallback("enable_reload_comments", false);
  22. remove_signature_add_updated_at();
  23. remove_defensio_set_akismet();