Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Installer
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @since 3 Apr 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\Setup;
|
||||
@@ -113,7 +112,6 @@ class _Install
|
||||
'message' => \IPS\Member::loggedIn()->language()->addToStack( 'requirements_mb_fail' ),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/* Extensions */
|
||||
foreach ( array(
|
||||
@@ -150,6 +148,12 @@ class _Install
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Recommend GD freetype */
|
||||
if( extension_loaded('gd') AND !function_exists( 'imagettfbbox' ) )
|
||||
{
|
||||
$return['advice'][] = \IPS\Member::loggedIn()->language()->addToStack( 'requirements_missing_imagettfbbox' );
|
||||
}
|
||||
|
||||
/* Memory Limit */
|
||||
$_memoryLimit = @ini_get('memory_limit');
|
||||
@@ -639,6 +643,7 @@ class _Install
|
||||
{
|
||||
\IPS\Settings::i()->member_group = 4;
|
||||
$member = new \IPS\Member;
|
||||
$member->pp_photo_type = '';
|
||||
$member->name = $this->adminName;
|
||||
$member->email = $this->adminEmail;
|
||||
$member->ip_address = \IPS\Request::i()->ipAddress();
|
||||
@@ -872,7 +877,7 @@ class _Install
|
||||
\IPS\Log::log( $e, 'install_error' );
|
||||
}
|
||||
|
||||
/* Insert default emoticons */
|
||||
/* Insert default emoticons and reaction */
|
||||
if( $app == 'core' )
|
||||
{
|
||||
$setId = md5( uniqid() );
|
||||
@@ -903,6 +908,19 @@ class _Install
|
||||
{
|
||||
\IPS\Db::i()->insert( 'core_emoticons', $inserts );
|
||||
}
|
||||
|
||||
$position = 0;
|
||||
foreach( array( 'like', 'thanks', 'haha', 'confused', 'sad' ) AS $reaction )
|
||||
{
|
||||
$fileObj = \IPS\File::create( 'core_Reaction', "react_{$reaction}.png", file_get_contents( \IPS\ROOT_PATH . '/' . \IPS\CP_DIRECTORY . "/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_icon' => (string) $fileObj,
|
||||
'reaction_position' => ++$position,
|
||||
'reaction_enabled' => 1,
|
||||
) );
|
||||
\IPS\Lang::saveCustom( 'core', 'reaction_title_' . $id, ucwords( $reaction ) );
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user