summaryrefslogtreecommitdiff
path: root/includes/db_schema/db_schema_20_21.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/db_schema/db_schema_20_21.php')
-rw-r--r--includes/db_schema/db_schema_20_21.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/includes/db_schema/db_schema_20_21.php b/includes/db_schema/db_schema_20_21.php
index 3d7529d6c6..e6756b3526 100644
--- a/includes/db_schema/db_schema_20_21.php
+++ b/includes/db_schema/db_schema_20_21.php
@@ -27,20 +27,15 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
// Delete old settings
-self::exec("DELETE FROM `##gedcom_setting` WHERE setting_name IN ('MEDIA_EXTERNAL')");
+WT_DB::exec("DELETE FROM `##gedcom_setting` WHERE setting_name IN ('MEDIA_EXTERNAL')");
// Delete old table
-self::exec("DROP TABLE IF EXISTS `##media_mapping`");
+WT_DB::exec("DROP TABLE IF EXISTS `##media_mapping`");
// Make this table look like all the others
try {
- self::exec(
+ WT_DB::exec(
"ALTER TABLE `##media`" .
" DROP m_id," .
" CHANGE m_media m_id VARCHAR(20) COLLATE utf8_unicode_ci NOT NULL," .
@@ -57,8 +52,7 @@ try {
}
// Populate the new column
-self::exec("UPDATE `##media` SET m_type = SUBSTRING_INDEX(SUBSTRING_INDEX(m_gedcom, '\n3 TYPE ', -1), '\n', 1) WHERE m_gedcom like '%\n3 TYPE %'");
+WT_DB::exec("UPDATE `##media` SET m_type = SUBSTRING_INDEX(SUBSTRING_INDEX(m_gedcom, '\n3 TYPE ', -1), '\n', 1) WHERE m_gedcom like '%\n3 TYPE %'");
// Update the version to indicate success
WT_Site::setPreference($schema_name, $next_version);
-