-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4.0] Cleanup previous date time queries and implement new ones for com_content #26295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
91265df
Cleanup previous date time queries and implement new ones for com_con…
wilsonge 6f639d4
Update AssociationHelper.php
richard67 f4b7154
Update QueryHelper.php
richard67 59a71be
Update ArchiveModel.php
richard67 8f96759
Update ArticleModel.php
richard67 45dc872
Update ArticlesModel.php
richard67 c0b2648
Update default.php
richard67 76dac7f
Update blog_item.php
richard67 96258df
Update default_articles.php
richard67 5c3371e
Update default_item.php
richard67 0132878
Update multilang.php
richard67 ce7e3d9
Update RelatedItemsHelper.php
richard67 969395d
Update pagenavigation.php
richard67 31c8ff8
Fix my silly mistake with "="
richard67 39d6ca7
Last of my error with "="
richard67 a224fb1
Create new content records with null value for published up and down
richard67 a7b4e1a
Set publish down to null when sanitizing table in articles model
richard67 9a52355
Move modified check down to store routine
richard67 a6203d2
SQL for ucm content
richard67 4ba40e5
Revert menu changes which should be done in separate PR
richard67 dddc298
PHP changes for ucm content
richard67 a35045b
Update libraries/src/Table/CoreContent.php
richard67 05b55bb
No use of nulldate for modified column
richard67 f3eb0aa
Don't use nullDate in ArticlesModel
richard67 fb79a4d
Don't handle not nullable ucm content columns
richard67 ef1af29
SQL code style
richard67 3445b7a
Handle also not nullable datetime columns
richard67 e4fd74a
Fix ucm content core modified time
richard67 d18fc52
Handle also #__ucm_history save_date
richard67 f05c532
Merge branch 'bugfix/date-columns' into 4.0-dev-bugfix-datetime-colum…
richard67 7a6f2cb
Merge pull request #41 from richard67/4.0-dev-bugfix-datetime-columns…
wilsonge 772c32b
Merge branch '4.0-dev' into bugfix/date-columns
wilsonge f3ba33f
Remove useless comment
wilsonge 63a64bb
Update modified also on postgresql (#43)
richard67 dbf1e6c
Merge branch '4.0-dev' into bugfix/date-columns
wilsonge dfdc297
Merge branch '4.0-dev' into bugfix/date-columns
569217e
Update components/com_content/Model/ArticlesModel.php
wilsonge edcb35f
Update components/com_content/Model/ArticlesModel.php
wilsonge 1b1ed0e
Merge branch '4.0-dev' into bugfix/date-columns
wilsonge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-08-01.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| ALTER TABLE `#__ucm_content` MODIFY `core_created_time` datetime NOT NULL; | ||
| ALTER TABLE `#__ucm_content` MODIFY `core_modified_time` datetime NOT NULL; | ||
|
|
||
| ALTER TABLE `#__ucm_content` MODIFY `core_publish_up` datetime NULL DEFAULT NULL; | ||
| ALTER TABLE `#__ucm_content` MODIFY `core_publish_down` datetime NULL DEFAULT NULL; | ||
| ALTER TABLE `#__ucm_content` MODIFY `core_checked_out_time` datetime NULL DEFAULT NULL; | ||
|
|
||
| ALTER TABLE `#__ucm_history` MODIFY `save_date` datetime NOT NULL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-14.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| ALTER TABLE `#__content` MODIFY `created` datetime NOT NULL; | ||
| ALTER TABLE `#__content` MODIFY `modified` datetime NOT NULL; | ||
|
|
||
| ALTER TABLE `#__content` MODIFY `publish_up` datetime NULL DEFAULT NULL; | ||
| ALTER TABLE `#__content` MODIFY `publish_down` datetime NULL DEFAULT NULL; | ||
| ALTER TABLE `#__content` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; | ||
|
|
||
| UPDATE `#__content` SET `modified` = `created` WHERE `modified` = '0000-00-00 00:00:00'; | ||
|
|
||
| UPDATE `#__content` SET `publish_up` = NULL WHERE `publish_up` = '0000-00-00 00:00:00'; | ||
| UPDATE `#__content` SET `publish_down` = NULL WHERE `publish_down` = '0000-00-00 00:00:00'; | ||
| UPDATE `#__content` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; | ||
|
|
||
| UPDATE `#__ucm_content` SET `core_modified_time` = `core_created_time` | ||
| WHERE `core_type_alias` = 'com_content.article' | ||
| AND `core_modified_time` = '0000-00-00 00:00:00'; | ||
|
|
||
| UPDATE `#__ucm_content` SET `core_publish_up` = NULL | ||
| WHERE `core_type_alias` = 'com_content.article' | ||
| AND `core_publish_up` = '0000-00-00 00:00:00'; | ||
| UPDATE `#__ucm_content` SET `core_publish_down` = NULL | ||
| WHERE `core_type_alias` = 'com_content.article' | ||
| AND `core_publish_down` = '0000-00-00 00:00:00'; | ||
| UPDATE `#__ucm_content` SET `core_checked_out_time` = NULL | ||
| WHERE `core_type_alias` = 'com_content.article' | ||
| AND `core_checked_out_time` = '0000-00-00 00:00:00'; |
14 changes: 14 additions & 0 deletions
14
administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-08-01.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| ALTER TABLE "#__ucm_content" ALTER COLUMN "core_created_time" DROP DEFAULT; | ||
|
|
||
| ALTER TABLE "#__ucm_content" ALTER COLUMN "core_modified_time" DROP DEFAULT; | ||
|
|
||
| ALTER TABLE "#__ucm_content" ALTER COLUMN "core_publish_up" DROP NOT NULL; | ||
| ALTER TABLE "#__ucm_content" ALTER COLUMN "core_publish_up" DROP DEFAULT; | ||
|
|
||
| ALTER TABLE "#__ucm_content" ALTER COLUMN "core_publish_down" DROP NOT NULL; | ||
| ALTER TABLE "#__ucm_content" ALTER COLUMN "core_publish_down" DROP DEFAULT; | ||
|
|
||
| ALTER TABLE "#__ucm_content" ALTER COLUMN "core_checked_out_time" DROP NOT NULL; | ||
| ALTER TABLE "#__ucm_content" ALTER COLUMN "core_checked_out_time" DROP DEFAULT; | ||
|
|
||
| ALTER TABLE "#__ucm_history" ALTER COLUMN "save_date" DROP DEFAULT; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-14.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| ALTER TABLE "#__content" ALTER COLUMN "created" DROP DEFAULT; | ||
|
|
||
| ALTER TABLE "#__content" ALTER COLUMN "modified" DROP DEFAULT; | ||
|
|
||
| ALTER TABLE "#__content" ALTER COLUMN "publish_up" DROP NOT NULL; | ||
| ALTER TABLE "#__content" ALTER COLUMN "publish_up" DROP DEFAULT; | ||
|
|
||
| ALTER TABLE "#__content" ALTER COLUMN "publish_down" DROP NOT NULL; | ||
| ALTER TABLE "#__content" ALTER COLUMN "publish_down" DROP DEFAULT; | ||
|
|
||
| ALTER TABLE "#__content" ALTER COLUMN "checked_out_time" DROP NOT NULL; | ||
| ALTER TABLE "#__content" ALTER COLUMN "checked_out_time" DROP DEFAULT; | ||
|
|
||
| UPDATE "#__content" SET "modified" = "created" WHERE "modified" = '1970-01-01 00:00:00'; | ||
|
|
||
| UPDATE "#__content" SET "publish_up" = NULL WHERE "publish_up" = '1970-01-01 00:00:00'; | ||
| UPDATE "#__content" SET "publish_down" = NULL WHERE "publish_down" = '1970-01-01 00:00:00'; | ||
| UPDATE "#__content" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; | ||
|
|
||
| UPDATE "#__ucm_content" SET "core_modified_time" = "core_created_time" | ||
| WHERE "core_type_alias" = 'com_content.article' | ||
| AND "core_modified_time" = '1970-01-01 00:00:00'; | ||
|
|
||
| UPDATE "#__ucm_content" SET "core_publish_up" = NULL | ||
| WHERE "core_type_alias" = 'com_content.article' | ||
| AND "core_publish_up" = '1970-01-01 00:00:00'; | ||
| UPDATE "#__ucm_content" SET "core_publish_down" = NULL | ||
| WHERE "core_type_alias" = 'com_content.article' | ||
| AND "core_publish_down" = '1970-01-01 00:00:00'; | ||
| UPDATE "#__ucm_content" SET "core_checked_out_time" = NULL | ||
| WHERE "core_type_alias" = 'com_content.article' | ||
| AND "core_checked_out_time" = '1970-01-01 00:00:00'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
$nullDate = $db->quote($db->getNullDate());.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do in my PR for George.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update in Article
sModel.phpThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 470. You updated another file
ArticleModel.phpwithout thesinArticle.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah i was looking on administrator file ;-)
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, made new PR for George for double space removal only.Sorry wrong place.