Skip to content

Commit d57a300

Browse files
authored
Merge pull request #28 from richard67/patch-1
Fix SQL code style null to NULL, correct column name for ucm_content table also for postgresql
2 parents de47469 + de404c2 commit d57a300

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-07-27.sql

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ ALTER TABLE `#__tags` MODIFY COLUMN `checked_out_time` DATETIME NULL DEFAULT NUL
1010
ALTER TABLE `#__ucm_content` MODIFY COLUMN `core_checked_out_time` DATETIME NULL DEFAULT NULL;
1111
ALTER TABLE `#__user_notes` MODIFY COLUMN `checked_out_time` DATETIME NULL DEFAULT NULL;
1212

13-
UPDATE `#__banner_clients` SET `checked_out_time` = null WHERE `checked_out_time` = '0000-00-00 00:00:00';
14-
UPDATE `#__categories` SET `checked_out_time` = null WHERE `checked_out_time` = '0000-00-00 00:00:00';
15-
UPDATE `#__content` SET `checked_out_time` = null WHERE `checked_out_time` = '0000-00-00 00:00:00';
16-
UPDATE `#__extensions` SET `checked_out_time` = null WHERE `checked_out_time` = '0000-00-00 00:00:00';
17-
UPDATE `#__fields` SET `checked_out_time` = null WHERE `checked_out_time` = '0000-00-00 00:00:00';
18-
UPDATE `#__fields_groups` SET `checked_out_time` = null WHERE `checked_out_time` = '0000-00-00 00:00:00';
19-
UPDATE `#__finder_filters` SET `checked_out_time` = null WHERE `checked_out_time` = '0000-00-00 00:00:00';
20-
UPDATE `#__menu` SET `checked_out_time` = null WHERE `checked_out_time` = '0000-00-00 00:00:00';
21-
UPDATE `#__tags` SET `checked_out_time` = null WHERE `checked_out_time` = '0000-00-00 00:00:00';
22-
UPDATE `#__ucm_content` SET `core_checked_out_time` = null WHERE `core_checked_out_time` = '0000-00-00 00:00:00';
23-
UPDATE `#__user_notes` SET `checked_out_time` = null WHERE `checked_out_time` = '0000-00-00 00:00:00';
13+
UPDATE `#__banner_clients` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00';
14+
UPDATE `#__categories` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00';
15+
UPDATE `#__content` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00';
16+
UPDATE `#__extensions` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00';
17+
UPDATE `#__fields` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00';
18+
UPDATE `#__fields_groups` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00';
19+
UPDATE `#__finder_filters` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00';
20+
UPDATE `#__menu` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00';
21+
UPDATE `#__tags` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00';
22+
UPDATE `#__ucm_content` SET `core_checked_out_time` = NULL WHERE `core_checked_out_time` = '0000-00-00 00:00:00';
23+
UPDATE `#__user_notes` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00';

administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-07-27.sql

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ ALTER TABLE "#__menu" ALTER COLUMN "checked_out_time" DROP DEFAULT;
1616
ALTER TABLE "#__menu" ALTER COLUMN "checked_out_time" DROP NOT NULL;
1717
ALTER TABLE "#__tags" ALTER COLUMN "checked_out_time" DROP DEFAULT;
1818
ALTER TABLE "#__tags" ALTER COLUMN "checked_out_time" DROP NOT NULL;
19-
ALTER TABLE "#__ucm_content" ALTER COLUMN "checked_out_time" DROP DEFAULT;
20-
ALTER TABLE "#__ucm_content" ALTER COLUMN "checked_out_time" DROP NOT NULL;
19+
ALTER TABLE "#__ucm_content" ALTER COLUMN "core_checked_out_time" DROP DEFAULT;
20+
ALTER TABLE "#__ucm_content" ALTER COLUMN "core_checked_out_time" DROP NOT NULL;
2121
ALTER TABLE "#__user_notes" ALTER COLUMN "checked_out_time" DROP DEFAULT;
2222
ALTER TABLE "#__user_notes" ALTER COLUMN "checked_out_time" DROP NOT NULL;
2323

24-
UPDATE "#__banner_clients" SET "checked_out_time" = null WHERE "checked_out_time" = '1970-01-01 00:00:00';
25-
UPDATE "#__categories" SET "checked_out_time" = null WHERE "checked_out_time" = '1970-01-01 00:00:00';
26-
UPDATE "#__content" SET "checked_out_time" = null WHERE "checked_out_time" = '1970-01-01 00:00:00';
27-
UPDATE "#__extensions" SET "checked_out_time" = null WHERE "checked_out_time" = '1970-01-01 00:00:00';
28-
UPDATE "#__fields" SET "checked_out_time" = null WHERE "checked_out_time" = '1970-01-01 00:00:00';
29-
UPDATE "#__fields_groups" SET "checked_out_time" = null WHERE "checked_out_time" = '1970-01-01 00:00:00';
30-
UPDATE "#__finder_filters" SET "checked_out_time" = null WHERE "checked_out_time" = '1970-01-01 00:00:00';
31-
UPDATE "#__menu" SET "checked_out_time" = null WHERE "checked_out_time" = '1970-01-01 00:00:00';
32-
UPDATE "#__tags" SET "checked_out_time" = null WHERE "checked_out_time" = '1970-01-01 00:00:00';
33-
UPDATE "#__ucm_content" SET "checked_out_time" = null WHERE "checked_out_time" = '1970-01-01 00:00:00';
34-
UPDATE "#__user_notes" SET "checked_out_time" = null WHERE "checked_out_time" = '1970-01-01 00:00:00';
24+
UPDATE "#__banner_clients" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00';
25+
UPDATE "#__categories" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00';
26+
UPDATE "#__content" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00';
27+
UPDATE "#__extensions" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00';
28+
UPDATE "#__fields" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00';
29+
UPDATE "#__fields_groups" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00';
30+
UPDATE "#__finder_filters" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00';
31+
UPDATE "#__menu" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00';
32+
UPDATE "#__tags" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00';
33+
UPDATE "#__ucm_content" SET "core_checked_out_time" = NULL WHERE "core_checked_out_time" = '1970-01-01 00:00:00';
34+
UPDATE "#__user_notes" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00';

administrator/components/com_checkin/Model/CheckinModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function checkin($ids = array())
110110
$query = $db->getQuery(true)
111111
->update($db->quoteName($tn))
112112
->set($db->quoteName('checked_out') . ' = DEFAULT')
113-
->set($db->quoteName('checked_out_time') . ' = null')
113+
->set($db->quoteName('checked_out_time') . ' = NULL')
114114
->where($db->quoteName('checked_out') . ' > 0');
115115

116116
$db->setQuery($query);

0 commit comments

Comments
 (0)