Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100002;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -83,7 +83,7 @@ class _Upgrade
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "core_members SET members_seo_name=''"
|
||||
) ) );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 3 ) ) );
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100003;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -68,7 +68,7 @@ class _Upgrade
|
||||
|
||||
$perCycle = 250;
|
||||
$did = 0;
|
||||
$limit = intval( \IPS\Request::i()->extra );
|
||||
$limit = \intval( \IPS\Request::i()->extra );
|
||||
|
||||
/* Try to prevent timeouts to the extent possible */
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
@@ -236,14 +236,14 @@ class _Upgrade
|
||||
$memberCleanup[] = "CHANGE COLUMN last_post member_last_post INT(10) null DEFAULT null";
|
||||
}
|
||||
|
||||
if( count( $memberCleanup ) )
|
||||
if( \count( $memberCleanup ) )
|
||||
{
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
|
||||
'table' => 'core_members',
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "core_members " . implode( ', ', $memberCleanup )
|
||||
) ) );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 5 ) ) );
|
||||
|
||||
@@ -276,7 +276,7 @@ class _Upgrade
|
||||
{
|
||||
$perCycle = 1000;
|
||||
$did = 0;
|
||||
$limit = intval( \IPS\Request::i()->extra );
|
||||
$limit = \intval( \IPS\Request::i()->extra );
|
||||
|
||||
/* Try to prevent timeouts to the extent possible */
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100004;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100005;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100010;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100011;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100015;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100016;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -32,7 +32,7 @@ class _Upgrade
|
||||
{
|
||||
foreach( \IPS\Db::i()->select( 'qa_id, qa_answers', 'core_question_and_answer' ) as $qa )
|
||||
{
|
||||
if ( is_array( json_decode( $qa['qa_answers'], TRUE ) ) )
|
||||
if ( \is_array( json_decode( $qa['qa_answers'], TRUE ) ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -51,6 +51,6 @@ class _Upgrade
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Updating Question & Answer";
|
||||
return "Updating question & answer";
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100017;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -35,7 +35,7 @@ class _Upgrade
|
||||
$defaultConfig = \IPS\Http\Url\Friendly::furlDefinition( TRUE );
|
||||
$customDefinitions = array();
|
||||
|
||||
if( is_array( $furlDefinitions ) AND count( $furlDefinitions ) )
|
||||
if( \is_array( $furlDefinitions ) AND \count( $furlDefinitions ) )
|
||||
{
|
||||
foreach( $furlDefinitions as $k => $v )
|
||||
{
|
||||
@@ -50,7 +50,7 @@ class _Upgrade
|
||||
}
|
||||
}
|
||||
|
||||
$customDefinitions = count( $customDefinitions ) ? json_encode( $customDefinitions ) : NULL;
|
||||
$customDefinitions = \count( $customDefinitions ) ? json_encode( $customDefinitions ) : NULL;
|
||||
\IPS\Settings::i()->changeValues( array( 'furl_configuration' => $customDefinitions ) );
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100018;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100020;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100021;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -32,7 +32,7 @@ class _Upgrade
|
||||
{
|
||||
$perCycle = 1000;
|
||||
$did = 0;
|
||||
$limit = intval( \IPS\Request::i()->extra );
|
||||
$limit = \intval( \IPS\Request::i()->extra );
|
||||
|
||||
/* Try to prevent timeouts to the extent possible */
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100023;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100024;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100028;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100032;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100033;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -56,7 +56,7 @@ class _Upgrade
|
||||
)
|
||||
) );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 2 ) ) );
|
||||
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100034;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100035;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -102,7 +102,7 @@ class _Upgrade
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "core_members SET member_group_id=" . \IPS\Settings::i()->member_group . " WHERE member_group_id IN( " . implode( ',', $invalidGroups ) . " );"
|
||||
) ) );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 3 ) ) );
|
||||
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100038;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -31,7 +31,7 @@ class _Upgrade
|
||||
{
|
||||
$perCycle = 250;
|
||||
$did = 0;
|
||||
$limit = intval( \IPS\Request::i()->extra );
|
||||
$limit = \intval( \IPS\Request::i()->extra );
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
/* If this is the first cycle, make sure votes column can hold all the votes */
|
||||
@@ -57,12 +57,12 @@ class _Upgrade
|
||||
|
||||
$poll = \IPS\Poll::constructFromData( $poll );
|
||||
|
||||
if( is_array( $poll->choices ) )
|
||||
if( \is_array( $poll->choices ) )
|
||||
{
|
||||
$poll->votes = 0;
|
||||
foreach ( $poll->choices as $key => $data )
|
||||
{
|
||||
$numberOfVotes = ( is_array( $data['votes'] ) ) ? array_sum( $data['votes'] ) : 0;
|
||||
$numberOfVotes = ( \is_array( $data['votes'] ) ) ? array_sum( $data['votes'] ) : 0;
|
||||
if ( $numberOfVotes > $poll->votes )
|
||||
{
|
||||
$poll->votes = $numberOfVotes;
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100041;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100042;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -33,7 +33,7 @@ class _Upgrade
|
||||
$dupes = array();
|
||||
|
||||
/* Find and clear out duplicate CSS rows, saving the most recently edited */
|
||||
foreach( \IPS\Db::i()->query( "SELECT css_set_id, css_app, css_location, css_path, css_name, COUNT( CONCAT_WS(';', css_set_id, css_app, css_location, css_path, css_name) ) as count FROM {$prefix}core_theme_css GROUP BY css_set_id, css_app, css_location, css_path, css_name ORDER BY count DESC" ) as $row )
|
||||
foreach( \IPS\Db::i()->query( "SELECT css_set_id, css_app, css_location, css_path, css_name, count( CONCAT_WS(';', css_set_id, css_app, css_location, css_path, css_name) ) as count FROM {$prefix}core_theme_css GROUP BY css_set_id, css_app, css_location, css_path, css_name ORDER BY count DESC" ) as $row )
|
||||
{
|
||||
if ( $row['count'] < 2 )
|
||||
{
|
||||
@@ -104,11 +104,11 @@ class _Upgrade
|
||||
$queries[] = array( 'table' => 'core_pfields_content', 'query' => "UPDATE " . \IPS\Db::i()->prefix . "core_pfields_content SET field_" . $field['pf_id'] . "='' WHERE field_" . $field['pf_id'] . "='http://';" );
|
||||
}
|
||||
|
||||
if( count( $queries ) )
|
||||
if( \count( $queries ) )
|
||||
{
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $queries );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 4 ) ) );
|
||||
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_100044;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -72,7 +72,7 @@ class _Upgrade
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $toRunQueries );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 'extra' => array( '_upgradeStep' => 3 ) ) );
|
||||
|
||||
|
||||
Whitespace-only changes.
@@ -23,7 +23,7 @@ try
|
||||
}
|
||||
}
|
||||
|
||||
if ( count( $affectedThemes ) )
|
||||
if ( \count( $affectedThemes ) )
|
||||
{
|
||||
$options[] = new \IPS\Helpers\Form\Radio( '101000_globalTemplate_revert', 'no', TRUE, array( 'options' => array( 'yes' => '101000_yes', 'no' => '101000_no' ) ) );
|
||||
}
|
||||
@@ -42,7 +42,7 @@ if ( $application->long_version >= 40000 and !\IPS\NO_WRITES )
|
||||
|
||||
foreach ( \IPS\Application::applications() as $_app )
|
||||
{
|
||||
if ( $_app->enabled and !in_array( $_app->directory, \IPS\Application::$ipsApps ) )
|
||||
if ( $_app->enabled and !\in_array( $_app->directory, \IPS\Application::$ipsApps ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -85,7 +85,7 @@ if ( $application->long_version >= 40000 and !\IPS\NO_WRITES )
|
||||
}
|
||||
}
|
||||
|
||||
if ( count( $disabledAppNames ) OR count( $disabledPluginNames ) )
|
||||
if ( \count( $disabledAppNames ) OR \count( $disabledPluginNames ) )
|
||||
{
|
||||
$_SESSION['upgrade_postUpgrade']['core'][101000] = \IPS\Theme::i()->getTemplate( 'global' )->disabled3rdParty( $disabledAppNames, $disabledPluginNames );
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101000;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -42,7 +42,7 @@ class _Upgrade
|
||||
}
|
||||
}
|
||||
|
||||
if ( count( $templateIds ) )
|
||||
if ( \count( $templateIds ) )
|
||||
{
|
||||
\IPS\Db::i()->delete( 'core_theme_templates', array( \IPS\Db::i()->in( 'template_id', $templateIds ) ) );
|
||||
}
|
||||
@@ -171,7 +171,7 @@ class _Upgrade
|
||||
/* Init */
|
||||
$perCycle = 500;
|
||||
$did = 0;
|
||||
$limit = intval( \IPS\Request::i()->extra );
|
||||
$limit = \intval( \IPS\Request::i()->extra );
|
||||
|
||||
/* Because follow_id gets changed in the process, we have to copy data to a temporary table first */
|
||||
if ( !$limit )
|
||||
@@ -344,7 +344,7 @@ class _Upgrade
|
||||
$columns[] = 'mail_groups';
|
||||
}
|
||||
|
||||
if( count( $columns ) )
|
||||
if( \count( $columns ) )
|
||||
{
|
||||
\IPS\Db::i()->dropColumn( 'core_bulk_mail', $columns );
|
||||
}
|
||||
@@ -513,41 +513,41 @@ class _Upgrade
|
||||
{
|
||||
if ( $_k === 'widget_feed_status' )
|
||||
{
|
||||
if ( in_array( 'open', $_v ) and in_array( 'closed', $_v ) )
|
||||
if ( \in_array( 'open', $_v ) and \in_array( 'closed', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_locked'] = 'any';
|
||||
}
|
||||
else if ( in_array( 'open', $_v ) )
|
||||
else if ( \in_array( 'open', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_locked'] = 'open';
|
||||
}
|
||||
else if ( in_array( 'closed', $_v ) )
|
||||
else if ( \in_array( 'closed', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_locked'] = 'closed';
|
||||
}
|
||||
|
||||
if ( in_array( 'pinned', $_v ) and in_array( 'notpinned', $_v ) )
|
||||
if ( \in_array( 'pinned', $_v ) and \in_array( 'notpinned', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_pinned'] = 'any';
|
||||
}
|
||||
else if ( in_array( 'pinned', $_v ) )
|
||||
else if ( \in_array( 'pinned', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_pinned'] = 'open';
|
||||
}
|
||||
else if ( in_array( 'notpinned', $_v ) )
|
||||
else if ( \in_array( 'notpinned', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_pinned'] = 'closed';
|
||||
}
|
||||
|
||||
if ( in_array( 'featured', $_v ) and in_array( 'notfeatured', $_v ) )
|
||||
if ( \in_array( 'featured', $_v ) and \in_array( 'notfeatured', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_pinned'] = 'any';
|
||||
}
|
||||
else if ( in_array( 'featured', $_v ) )
|
||||
else if ( \in_array( 'featured', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_pinned'] = 'featured';
|
||||
}
|
||||
else if ( in_array( 'notfeatured', $_v ) )
|
||||
else if ( \in_array( 'notfeatured', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_pinned'] = 'notfeatured';
|
||||
}
|
||||
@@ -568,7 +568,7 @@ class _Upgrade
|
||||
$config = array();
|
||||
foreach ( $widgets[ $k ]['configuration'] as $_k => $_v )
|
||||
{
|
||||
if ( in_array( $_k, array( 'tfb_show', 'tfb_sort_dir', 'tfb_use_perms', 'tfb_topic_status' ) ) )
|
||||
if ( \in_array( $_k, array( 'tfb_show', 'tfb_sort_dir', 'tfb_use_perms', 'tfb_topic_status' ) ) )
|
||||
{
|
||||
$_k = str_replace( 'tfb_', 'widget_feed', $_k );
|
||||
}
|
||||
@@ -579,41 +579,41 @@ class _Upgrade
|
||||
|
||||
if ( $_k == 'widget_feed_topic_status' )
|
||||
{
|
||||
if ( in_array( 'open', $_v ) and in_array( 'closed', $_v ) )
|
||||
if ( \in_array( 'open', $_v ) and \in_array( 'closed', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_item_status_locked'] = 'any';
|
||||
}
|
||||
else if ( in_array( 'open', $_v ) )
|
||||
else if ( \in_array( 'open', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_item_status_locked'] = 'open';
|
||||
}
|
||||
else if ( in_array( 'closed', $_v ) )
|
||||
else if ( \in_array( 'closed', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_item_status_locked'] = 'closed';
|
||||
}
|
||||
|
||||
if ( in_array( 'pinned', $_v ) and in_array( 'notpinned', $_v ) )
|
||||
if ( \in_array( 'pinned', $_v ) and \in_array( 'notpinned', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_item_status_pinned'] = 'any';
|
||||
}
|
||||
else if ( in_array( 'pinned', $_v ) )
|
||||
else if ( \in_array( 'pinned', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_item_status_pinned'] = 'open';
|
||||
}
|
||||
else if ( in_array( 'notpinned', $_v ) )
|
||||
else if ( \in_array( 'notpinned', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_item_status_pinned'] = 'closed';
|
||||
}
|
||||
|
||||
if ( in_array( 'featured', $_v ) and in_array( 'notfeatured', $_v ) )
|
||||
if ( \in_array( 'featured', $_v ) and \in_array( 'notfeatured', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_item_status_pinned'] = 'any';
|
||||
}
|
||||
else if ( in_array( 'featured', $_v ) )
|
||||
else if ( \in_array( 'featured', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_item_status_pinned'] = 'featured';
|
||||
}
|
||||
else if ( in_array( 'notfeatured', $_v ) )
|
||||
else if ( \in_array( 'notfeatured', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_item_status_pinned'] = 'notfeatured';
|
||||
}
|
||||
@@ -643,41 +643,41 @@ class _Upgrade
|
||||
|
||||
if ( $_k === 'widget_feed_status' )
|
||||
{
|
||||
if ( in_array( 'open', $_v ) and in_array( 'closed', $_v ) )
|
||||
if ( \in_array( 'open', $_v ) and \in_array( 'closed', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_locked'] = 'any';
|
||||
}
|
||||
else if ( in_array( 'open', $_v ) )
|
||||
else if ( \in_array( 'open', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_locked'] = 'open';
|
||||
}
|
||||
else if ( in_array( 'closed', $_v ) )
|
||||
else if ( \in_array( 'closed', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_locked'] = 'closed';
|
||||
}
|
||||
|
||||
if ( in_array( 'pinned', $_v ) and in_array( 'notpinned', $_v ) )
|
||||
if ( \in_array( 'pinned', $_v ) and \in_array( 'notpinned', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_pinned'] = 'any';
|
||||
}
|
||||
else if ( in_array( 'pinned', $_v ) )
|
||||
else if ( \in_array( 'pinned', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_pinned'] = 'open';
|
||||
}
|
||||
else if ( in_array( 'notpinned', $_v ) )
|
||||
else if ( \in_array( 'notpinned', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_pinned'] = 'closed';
|
||||
}
|
||||
|
||||
if ( in_array( 'featured', $_v ) and in_array( 'notfeatured', $_v ) )
|
||||
if ( \in_array( 'featured', $_v ) and \in_array( 'notfeatured', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_pinned'] = 'any';
|
||||
}
|
||||
else if ( in_array( 'featured', $_v ) )
|
||||
else if ( \in_array( 'featured', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_pinned'] = 'featured';
|
||||
}
|
||||
else if ( in_array( 'notfeatured', $_v ) )
|
||||
else if ( \in_array( 'notfeatured', $_v ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_status_pinned'] = 'notfeatured';
|
||||
}
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101001;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -88,7 +88,7 @@ class _Upgrade
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $toRunQueries );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 'extra' => array( '_upgradeStep' => 3 ) ) );
|
||||
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101006;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -42,7 +42,7 @@ class _Upgrade
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $toRunQueries );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 'extra' => array( '_upgradeStep' => 2 ) ) );
|
||||
|
||||
@@ -125,7 +125,7 @@ class _Upgrade
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $toRunQueries );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 'extra' => array( '_upgradeStep' => 4 ) ) );
|
||||
|
||||
@@ -161,7 +161,7 @@ class _Upgrade
|
||||
{
|
||||
foreach( $ext->getPermissions( array() ) as $name => $data )
|
||||
{
|
||||
$type = is_array( $data ) ? $data[0] : $data;
|
||||
$type = \is_array( $data ) ? $data[0] : $data;
|
||||
|
||||
if( $type == 'Node' )
|
||||
{
|
||||
@@ -181,7 +181,7 @@ class _Upgrade
|
||||
|
||||
foreach( $perms as $k => $v )
|
||||
{
|
||||
if( in_array( $k, $nodeFields ) AND $v == 0 )
|
||||
if( \in_array( $k, $nodeFields ) AND $v == 0 )
|
||||
{
|
||||
$perms[ $k ] = -1;
|
||||
$hasChange = TRUE;
|
||||
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101013;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -31,7 +31,7 @@ class _Upgrade
|
||||
{
|
||||
$perCycle = 50;
|
||||
$did = 0;
|
||||
$limit = intval( \IPS\Request::i()->extra );
|
||||
$limit = \intval( \IPS\Request::i()->extra );
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_menu', array( 'app=? AND extension=?', 'core', 'Menu' ), 'id ASC', array( $limit, $perCycle ) ) as $menuItem )
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101016;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -31,7 +31,7 @@ class _Upgrade
|
||||
{
|
||||
$perCycle = 50;
|
||||
$did = 0;
|
||||
$limit = intval( \IPS\Request::i()->extra );
|
||||
$limit = \intval( \IPS\Request::i()->extra );
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_admin_permission_rows', NULL, 'row_id_type,row_id', array( $limit, $perCycle ) ) as $row )
|
||||
@@ -56,7 +56,7 @@ class _Upgrade
|
||||
foreach ( $perms['applications'] as $k => $app )
|
||||
{
|
||||
/* We've stored ACP permissions in different ways - one way was 'app' => array( 'module1', 'module2' ) */
|
||||
if( is_array( $app ) )
|
||||
if( \is_array( $app ) )
|
||||
{
|
||||
$applications[ $k ] = $app;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ class _Upgrade
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $toRunQueries );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 'extra' => array( '_upgradeStep' => 3 ) ) );
|
||||
|
||||
@@ -206,7 +206,7 @@ class _Upgrade
|
||||
{
|
||||
foreach( json_decode( $config, TRUE ) as $k => $v )
|
||||
{
|
||||
if ( mb_substr( $k, 0, 3 ) !== 'key' and is_numeric( $k ) )
|
||||
if ( mb_substr( $k, 0, 3 ) !== 'key' and \is_numeric( $k ) )
|
||||
{
|
||||
$json[ 'key' . $k ] = $v;
|
||||
}
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101018;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -53,7 +53,7 @@ class _Upgrade
|
||||
{
|
||||
$originalKey = mb_substr( $k, 3 );
|
||||
|
||||
if ( in_array( $originalKey, $existing ) )
|
||||
if ( \in_array( $originalKey, $existing ) )
|
||||
{
|
||||
$json[ $originalKey ] = $v;
|
||||
}
|
||||
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101021;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -32,7 +32,7 @@ class _Upgrade
|
||||
/* Init */
|
||||
$perCycle = 250;
|
||||
$did = 0;
|
||||
$limit = intval( \IPS\Request::i()->extra );
|
||||
$limit = \intval( \IPS\Request::i()->extra );
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
/* Loop */
|
||||
@@ -80,7 +80,7 @@ class _Upgrade
|
||||
$_SESSION['_step1Count'] = \IPS\Db::i()->select( 'COUNT(*)', 'core_member_status_updates', array( "status_imported=?", 1 ) )->first();
|
||||
}
|
||||
|
||||
return "Fixing Imported Status Updates (Upgraded so far: " . ( ( $limit > $_SESSION['_step1Count'] ) ? $_SESSION['_step1Count'] : $limit ) . ' out of ' . $_SESSION['_step1Count'] . ')';
|
||||
return "Fixing imported status updates (Upgraded so far: " . ( ( $limit > $_SESSION['_step1Count'] ) ? $_SESSION['_step1Count'] : $limit ) . ' out of ' . $_SESSION['_step1Count'] . ')';
|
||||
}
|
||||
|
||||
|
||||
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101024;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -41,7 +41,7 @@ class _Upgrade
|
||||
/* Try to prevent timeouts to the extent possible */
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_tags_cache', null, 'tag_cache_date ASC', array( $limit, 500 ) ) as $cache )
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_tags_cache', null, 'tag_cache_key ASC', array( $limit, 500 ) ) as $cache )
|
||||
{
|
||||
if( $cutOff !== null AND time() >= $cutOff )
|
||||
{
|
||||
@@ -54,7 +54,7 @@ class _Upgrade
|
||||
$results = @unserialize( $cache['tag_cache_text'] );
|
||||
$update = null;
|
||||
|
||||
if( is_array( $results ) AND count( $results ) )
|
||||
if( \is_array( $results ) AND \count( $results ) )
|
||||
{
|
||||
$update = $results;
|
||||
}
|
||||
@@ -63,11 +63,11 @@ class _Upgrade
|
||||
/* It may be json_encoded...which is normally fine, but a previous bug may have resulted in the 'tags' array being two levels deep */
|
||||
$results = @json_decode( $cache['tag_cache_text'], true );
|
||||
|
||||
if( is_array( $results ) AND count( $results ) )
|
||||
if( \is_array( $results ) AND \count( $results ) )
|
||||
{
|
||||
if( isset( $results['tags'] ) AND is_array( $results['tags'] ) )
|
||||
if( isset( $results['tags'] ) AND \is_array( $results['tags'] ) )
|
||||
{
|
||||
if( isset( $results['tags'][0] ) AND is_array( $results['tags'][0] ) )
|
||||
if( isset( $results['tags'][0] ) AND \is_array( $results['tags'][0] ) )
|
||||
{
|
||||
$update = array( 'tags' => $results['tags'][0], 'prefix' => $results['prefix'] );
|
||||
}
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101026;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101030;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -171,7 +171,7 @@ class _Upgrade
|
||||
/* Fix reports in report center */
|
||||
$perCycle = 1000;
|
||||
$did = 0;
|
||||
$limit = intval( \IPS\Request::i()->extra );
|
||||
$limit = \intval( \IPS\Request::i()->extra );
|
||||
|
||||
/* Try to prevent timeouts to the extent possible */
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
@@ -221,7 +221,7 @@ class _Upgrade
|
||||
{
|
||||
/* As above, an old Pages bug may have \IPS\cms\Records\Comment stored instead of \IPS\cms\Records\Comment# as the class. What that is
|
||||
the case, the parent item class will not exist, resulting in a fatal error. Look for this and bubble up the exception accordingly. */
|
||||
if ( in_array( 'IPS\Content\Comment', class_parents( $item ) ) )
|
||||
if ( \in_array( 'IPS\Content\Comment', class_parents( $item ) ) )
|
||||
{
|
||||
if ( isset( $item::$itemClass ) )
|
||||
{
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101031;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101034;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -78,7 +78,7 @@ class _Upgrade
|
||||
'query' => "DELETE FROM " . \IPS\Db::i()->prefix . "core_follow WHERE follow_member_id NOT IN (SELECT member_id FROM " . \IPS\Db::i()->prefix . "core_members)"
|
||||
) ) );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 4 ) ) );
|
||||
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101042;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -62,7 +62,7 @@ class _Upgrade
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Updating Friendly URL customisations";
|
||||
return "Updating friendly URL customizations";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,7 +74,7 @@ class _Upgrade
|
||||
{
|
||||
$perCycle = 1000;
|
||||
$did = 0;
|
||||
$doneSoFar = intval( \IPS\Request::i()->extra );
|
||||
$doneSoFar = \intval( \IPS\Request::i()->extra );
|
||||
|
||||
/* Try to prevent timeouts to the extent possible */
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
@@ -106,7 +106,7 @@ class _Upgrade
|
||||
$update['wl_suspend'] = preg_replace( "/^P([0-9]+?)TH$/", "PT$1H", $log['wl_suspend'] );
|
||||
}
|
||||
|
||||
if( count( $update ) )
|
||||
if( \count( $update ) )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_members_warn_logs', $update, "wl_id=" . $log['wl_id'] );
|
||||
}
|
||||
@@ -157,7 +157,7 @@ class _Upgrade
|
||||
{
|
||||
$perms = json_decode( trim( $mod['perms'] ), TRUE );
|
||||
|
||||
if ( is_array( $perms ) and array_key_exists( 'cms', $perms ) )
|
||||
if ( \is_array( $perms ) and array_key_exists( 'cms', $perms ) )
|
||||
{
|
||||
foreach ( \IPS\cms\Databases::databases() as $id => $database )
|
||||
{
|
||||
@@ -184,7 +184,7 @@ class _Upgrade
|
||||
*/
|
||||
public function step3CustomTitle()
|
||||
{
|
||||
return "Updating Pages Database Moderator Permissions";
|
||||
return "Updating pages database moderator permissions";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101056;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101064;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -33,7 +33,7 @@ class _Upgrade
|
||||
/* The setting won't have been inserted yet at this point, so insert it with the key set */
|
||||
\IPS\Db::i()->replace( 'core_sys_conf_settings', array(
|
||||
'conf_key' => 'site_secret_key',
|
||||
'conf_value' => ( defined( 'SITE_SECRET_KEY' ) AND SITE_SECRET_KEY ) ? SITE_SECRET_KEY : md5( \IPS\Settings::i()->sql_pass . \IPS\Settings::i()->board_url . \IPS\Settings::i()->sql_database ),
|
||||
'conf_value' => ( \defined( 'SITE_SECRET_KEY' ) AND SITE_SECRET_KEY ) ? SITE_SECRET_KEY : md5( \IPS\Settings::i()->sql_pass . \IPS\Settings::i()->board_url . \IPS\Settings::i()->sql_database ),
|
||||
'conf_default' => '',
|
||||
'conf_app' => 'core'
|
||||
) );
|
||||
@@ -88,7 +88,7 @@ class _Upgrade
|
||||
*/
|
||||
public function step2CustomTitle()
|
||||
{
|
||||
return "Creating Security Questions";
|
||||
return "Creating security questions";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101071;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -120,7 +120,7 @@ class _Upgrade
|
||||
*/
|
||||
public function step3CustomTitle()
|
||||
{
|
||||
return "Updating Analytics Settings";
|
||||
return "Updating analytics settings";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101079;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -62,7 +62,7 @@ class _Upgrade
|
||||
|
||||
\IPS\Db::i()->insert( 'core_sys_conf_settings', array(
|
||||
'conf_key' => 'diagnostics_reporting',
|
||||
'conf_value' => intval( $_SESSION['upgrade_options']['core']['101079']['diagnostics_reporting'] ),
|
||||
'conf_value' => \intval( $_SESSION['upgrade_options']['core']['101079']['diagnostics_reporting'] ),
|
||||
'conf_default' => 1,
|
||||
'conf_app' => 'core'
|
||||
) );
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101088;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -46,11 +46,11 @@ class _Upgrade
|
||||
\IPS\Db::i()->returnQuery = FALSE;
|
||||
}
|
||||
|
||||
if( count( $queries ) )
|
||||
if( \count( $queries ) )
|
||||
{
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $queries );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 2 ) ) );
|
||||
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101090;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101094;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_101100;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -113,14 +113,14 @@ class _Upgrade
|
||||
catch( \UnderflowException $e ) {}
|
||||
|
||||
/* Is this site affected by any of these issues? */
|
||||
if( !count( $queries ) )
|
||||
if( !\count( $queries ) )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $queries );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 3 ) ) );
|
||||
|
||||
@@ -208,7 +208,7 @@ class _Upgrade
|
||||
$_SESSION['_step3Count'] = \IPS\Db::i()->select( 'COUNT(*)', 'core_dnames_change' )->first();
|
||||
}
|
||||
|
||||
return "Moving Display Name history to the Member History system (Converted so far: " . ( ( $limit > $_SESSION['_step3Count'] ) ? $_SESSION['_step3Count'] : $limit ) . ' out of ' . $_SESSION['_step3Count'] . ')';
|
||||
return "Converting display name history (Converted so far: " . ( ( $limit > $_SESSION['_step3Count'] ) ? $_SESSION['_step3Count'] : $limit ) . ' out of ' . $_SESSION['_step3Count'] . ')';
|
||||
}
|
||||
|
||||
|
||||
@@ -299,7 +299,7 @@ class _Upgrade
|
||||
{
|
||||
$fileObj = \IPS\File::create( 'core_Reaction', "react_{$reaction}.png", file_get_contents( $path . "/install/reaction/react_{$reaction}.png" ), 'reactions', FALSE, NULL, FALSE );
|
||||
$id = \IPS\Db::i()->insert( 'core_reactions', array(
|
||||
'reaction_value' => ( in_array( $reaction, array( 'confused', 'sad' ) ) ) ? 0 : 1,
|
||||
'reaction_value' => ( \in_array( $reaction, array( 'confused', 'sad' ) ) ) ? 0 : 1,
|
||||
'reaction_icon' => (string) $fileObj,
|
||||
'reaction_position' => ++$position,
|
||||
'reaction_enabled' => ( \IPS\Settings::i()->reputation_point_types == 'like' ) ? 1 : 0,
|
||||
@@ -443,7 +443,7 @@ class _Upgrade
|
||||
break;
|
||||
}
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 9 ) ) );
|
||||
|
||||
@@ -606,7 +606,7 @@ class _Upgrade
|
||||
$required[] = "core_pfield_{$row['pf_id']}";
|
||||
}
|
||||
|
||||
if ( count( $required ) )
|
||||
if ( \count( $required ) )
|
||||
{
|
||||
$step = new \IPS\Member\ProfileStep;
|
||||
$step->required = 1;
|
||||
@@ -625,7 +625,7 @@ class _Upgrade
|
||||
$optional[] = "core_pfield_{$row['pf_id']}";
|
||||
}
|
||||
|
||||
if ( count( $optional ) )
|
||||
if ( \count( $optional ) )
|
||||
{
|
||||
$step = new \IPS\Member\ProfileStep;
|
||||
$step->required = 0;
|
||||
@@ -648,7 +648,7 @@ class _Upgrade
|
||||
*/
|
||||
public function step11CustomTitle()
|
||||
{
|
||||
return 'Setting up Profile Completion';
|
||||
return 'Setting up profile completion';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -695,7 +695,7 @@ class _Upgrade
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( $query ) );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 14 ) ) );
|
||||
|
||||
|
||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_102007;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_102010;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -128,7 +128,7 @@ class _Upgrade
|
||||
/* Remove not existing deletion log records */
|
||||
$perCycle = 500;
|
||||
$did = 0;
|
||||
$limit = intval( \IPS\Request::i()->extra );
|
||||
$limit = \intval( \IPS\Request::i()->extra );
|
||||
|
||||
/* Try to prevent timeouts to the extent possible */
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
@@ -158,13 +158,13 @@ class _Upgrade
|
||||
}
|
||||
else
|
||||
{
|
||||
/* App doesn't exist anymore, so it's save to delete it */
|
||||
/* App doesn't exist anymore, so it's safe to delete it */
|
||||
$toDelete[] = $record['dellog_id'];
|
||||
}
|
||||
|
||||
$did++;
|
||||
}
|
||||
if ( count( $toDelete ) > 0 )
|
||||
if ( \count( $toDelete ) > 0 )
|
||||
{
|
||||
\IPS\Db::i()->delete( 'core_deletion_log', \IPS\Db::i()->in( 'dellog_id', $toDelete) );
|
||||
}
|
||||
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\setup\upg_102030;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
Whitespace-only changes.
@@ -12,7 +12,7 @@
|
||||
namespace IPS\core\setup\upg_102037;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
|
||||
Whitespace-only changes.
Loaded 100 of 3791 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user