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_30001;
|
||||
|
||||
/* 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;
|
||||
@@ -3823,7 +3823,7 @@ class _Upgrade
|
||||
)
|
||||
) );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 4 ) ) );
|
||||
|
||||
@@ -3872,7 +3872,7 @@ class _Upgrade
|
||||
)
|
||||
) );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 5 ) ) );
|
||||
|
||||
@@ -4319,7 +4319,7 @@ class _Upgrade
|
||||
)
|
||||
) );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 9 ) ) );
|
||||
|
||||
@@ -4432,7 +4432,7 @@ class _Upgrade
|
||||
}
|
||||
|
||||
$num++;
|
||||
$_protected = ( in_array( $dir, array( 'core', 'forums', 'members' ) ) ) ? 1 : 0;
|
||||
$_protected = ( \in_array( $dir, array( 'core', 'forums', 'members' ) ) ) ? 1 : 0;
|
||||
|
||||
\IPS\Db::i()->insert( 'core_applications', array(
|
||||
'app_title' => $appData['application_title'],
|
||||
@@ -4552,7 +4552,7 @@ class _Upgrade
|
||||
{
|
||||
$_perms = unserialize( stripslashes( $row['cal_permissions'] ) );
|
||||
|
||||
if ( is_array( $_perms ) )
|
||||
if ( \is_array( $_perms ) )
|
||||
{
|
||||
$_view = ( $_perms['perm_read'] ) ? ',' . implode( ',', explode( ',', $_perms['perm_read'] ) ) . ',' : '';
|
||||
$_start = ( $_perms['perm_post'] ) ? ',' . implode( ',', explode( ',', $_perms['perm_post'] ) ) . ',' : '';
|
||||
@@ -4613,7 +4613,7 @@ class _Upgrade
|
||||
{
|
||||
$_perms = unserialize( stripslashes( $row['permission_array'] ) );
|
||||
|
||||
if ( is_array( $_perms ) )
|
||||
if ( \is_array( $_perms ) )
|
||||
{
|
||||
$_view = ( $_perms['show_perms'] ) ? ',' . implode( ',', explode( ',', $_perms['show_perms'] ) ) . ',' : '';
|
||||
$_read = ( $_perms['read_perms'] ) ? ',' . implode( ',', explode( ',', $_perms['read_perms'] ) ) . ',' : '';
|
||||
@@ -4699,21 +4699,21 @@ class _Upgrade
|
||||
{
|
||||
/* Convert PMs */
|
||||
$pergo = 200;
|
||||
$start = intval( \IPS\Request::i()->extra );
|
||||
$start = \intval( \IPS\Request::i()->extra );
|
||||
$converted = 0;
|
||||
$seen = 0;
|
||||
|
||||
/* Select max topic ID thus far */
|
||||
$_tmp = \IPS\Db::i()->select( 'MAX(mt_id)', 'message_topics' )->first();
|
||||
|
||||
$topicID = intval( $_tmp['max'] );
|
||||
$topicID = \intval( $_tmp['max'] );
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'message_text', NULL, 'msg_id ASC', array( $start, $pergo ) ) as $post )
|
||||
{
|
||||
$seen++;
|
||||
|
||||
/* Make sure all data is valid */
|
||||
if ( intval( $post['msg_sent_to_count'] ) < 1 )
|
||||
if ( \intval( $post['msg_sent_to_count'] ) < 1 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -4722,7 +4722,7 @@ class _Upgrade
|
||||
$oldTopics = array();
|
||||
|
||||
/* Now fetch all topics */
|
||||
foreach( \IPS\Db::i()->select( '*', 'message_topics_old', array( 'mt_msg_id=?', intval( $post['msg_id'] ) ) ) as $topic )
|
||||
foreach( \IPS\Db::i()->select( '*', 'message_topics_old', array( 'mt_msg_id=?', \intval( $post['msg_id'] ) ) ) as $topic )
|
||||
{
|
||||
/* Got any data? */
|
||||
if ( ! $topic['mt_from_id'] OR ! $topic['mt_to_id'] )
|
||||
@@ -4734,7 +4734,7 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/* Fail safe */
|
||||
if ( ! count( $oldTopics ) )
|
||||
if ( ! \count( $oldTopics ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -4812,7 +4812,7 @@ class _Upgrade
|
||||
'mt_start_time' => $post['msg_date'],
|
||||
'mt_last_post_time' => $post['msg_date'],
|
||||
'mt_invited_members' => serialize( array_keys( $_invited ) ),
|
||||
'mt_to_count' => count( array_keys( $_invited ) ) + 1,
|
||||
'mt_to_count' => \count( array_keys( $_invited ) ) + 1,
|
||||
'mt_to_member_id' => $topicData['mt_to_id'],
|
||||
'mt_replies' => 0,
|
||||
'mt_last_msg_id' => $postID,
|
||||
@@ -4848,7 +4848,7 @@ class _Upgrade
|
||||
{
|
||||
/* Convert block lists */
|
||||
$pergo = 200;
|
||||
$start = intval( \IPS\Request::i()->extra );
|
||||
$start = \intval( \IPS\Request::i()->extra );
|
||||
$converted = 0;
|
||||
$seen = 0;
|
||||
|
||||
@@ -4862,7 +4862,7 @@ class _Upgrade
|
||||
$ignored = explode( ',', $member['ignored_users'] );
|
||||
}
|
||||
|
||||
if ( ! is_array( $ignored ) )
|
||||
if ( ! \is_array( $ignored ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -4904,7 +4904,7 @@ class _Upgrade
|
||||
{
|
||||
/* Convert PM block lists */
|
||||
$pergo = 200;
|
||||
$start = intval( \IPS\Request::i()->extra );
|
||||
$start = \intval( \IPS\Request::i()->extra );
|
||||
$converted = 0;
|
||||
$seen = 0;
|
||||
|
||||
@@ -4915,7 +4915,7 @@ class _Upgrade
|
||||
/* Already got an entry for this contact? */
|
||||
try
|
||||
{
|
||||
$test = \IPS\Db::i()->select( '*', 'ignored_users', array( "ignore_owner_id=?", intval( $contact['member_id'] ) ) )->first();
|
||||
$test = \IPS\Db::i()->select( '*', 'ignored_users', array( "ignore_owner_id=?", \intval( $contact['member_id'] ) ) )->first();
|
||||
|
||||
\IPS\Db::i()->update( 'ignored_users', array( 'ignore_messages' => 1 ), 'ignore_id=' . $test['ignore_id'] );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user