Version 5.0.0 beta 1

This commit is contained in:
Neo committed 2025-12-19 16:27:35 -08:00
1 parent 25ddeb65d6
commit 15c7beabc5
6736 files changed
+627902 -497943

No files matched your search

@@ -12,16 +12,20 @@
namespace IPS\cms\setup\upg_107022;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
use IPS\Db;
use function defined;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* 4.7.1 Upgrade Code
*/
class _Upgrade
class Upgrade
{
/**
* Set record published date to fix issue in 4.7.1. Only fix records created after the beta was released.
@@ -30,9 +34,9 @@ class _Upgrade
*/
public function step1()
{
foreach( \IPS\Db::i()->select( '*', 'cms_databases' ) as $database )
foreach( Db::i()->select( '*', 'cms_databases' ) as $database )
{
\IPS\Db::i()->query('UPDATE `' . \IPS\Db::i()->prefix .'cms_custom_database_' . $database['database_id'] . '` SET record_publish_date = record_saved, record_future_date = 1 WHERE record_publish_date = 0 AND record_saved > 1659372642 ' );
Db::i()->query('UPDATE `' . Db::i()->prefix .'cms_custom_database_' . $database['database_id'] . '` SET record_publish_date = record_saved, record_future_date = 1 WHERE record_publish_date = 0 AND record_saved > 1659372642 ' );
}
return TRUE;