Version 4.5.0
No files matched your search
@@ -6,7 +6,7 @@ has been used throughout Invision Community to add style, flair and functionalit
|
||||
to our product.
|
||||
|
||||
NULLING
|
||||
Last Updated: 18 September 2018
|
||||
Last Updated: 18 August 2020
|
||||
Author: IPBMafia.ru
|
||||
|
||||
AES implementation in PHP
|
||||
@@ -16,23 +16,24 @@ AES implementation in PHP
|
||||
Website: http://www.movable-type.co.uk/scripts/aes-php.html
|
||||
License: http://creativecommons.org/licenses/by/3.0/
|
||||
|
||||
BMDoHyeon font package
|
||||
Description: Provides unicode font files for Korean language
|
||||
Location: system/3rd_party/Fonts
|
||||
Website: http://font.woowahan.com/dohyeon/
|
||||
License: Open Font License
|
||||
Clipboard
|
||||
Description: Cross browser copy to clipboard functionality
|
||||
Location: applications/core/interface/clipboard
|
||||
Included version: 2.0.4
|
||||
Website: clipboardjs.com
|
||||
License: https://zenorocha.mit-license.org
|
||||
|
||||
CKEditor
|
||||
Description: Provides the editor functionality for submitting content.
|
||||
Location: In development: applications/core/dev/ckeditor (custom build with additional plugins)
|
||||
Included version: 4.10
|
||||
Included version: 4.14.1
|
||||
Website: http://ckeditor.com
|
||||
License: http://www.gnu.org/copyleft/lesser.html
|
||||
|
||||
Codemirror (with C-like, CSS, HTMLMixed, JavaScript, PHP, SQL and XML modes and merge, search, and searchcursor addons)
|
||||
Description: Provides code editor for adding code to content, editing templates in the AdminCP, etc.
|
||||
Location: In development: applications/core/dev/codemirror
|
||||
Included version: 5.25.2
|
||||
Included version: 5.49.2
|
||||
Website: http://codemirror.net
|
||||
License: http://codemirror.net/LICENSE
|
||||
|
||||
@@ -48,14 +49,14 @@ Devices Icon Pack
|
||||
Location: In development: applications/core/dev/resources/front/devices
|
||||
Website: https://www.iconfinder.com/iconsets/devices-42
|
||||
License: Free for commercial use
|
||||
|
||||
EmojiOne
|
||||
Description: Emoji images
|
||||
Location: Served from CDN
|
||||
Included version: 3.1
|
||||
Website: https://www.emojione.com
|
||||
License: https://d1j8pt39hxlh3d.cloudfront.net/license-free.pdf
|
||||
|
||||
|
||||
dotdotdot
|
||||
Description: Javascript library for truncating long strings
|
||||
Location: library/jquery/jquery.dotdotdot.min.js
|
||||
Included version: 1.8.3
|
||||
Website: https://dotdotdot.frebsite.nl/
|
||||
License: Commercial license
|
||||
|
||||
FontAwesome
|
||||
Description: General icons for UI
|
||||
Location: Font files in applications/core/interface/font and CSS in development in applications/core/dev/css/global/framework/fonts.css (mixed with other CSS and modified to use correct path to font files)
|
||||
@@ -65,7 +66,7 @@ FontAwesome
|
||||
|
||||
Google Charts
|
||||
Description: Generates charts for statistics in the AdminCP
|
||||
Location: Loaded from CDN https://www.google.com/jsapi
|
||||
Location: Loaded from CDN https://www.gstatic.com/charts/loader.js
|
||||
Website: https://developers.google.com/chart/
|
||||
|
||||
google-code-prettify
|
||||
@@ -82,12 +83,12 @@ google-diff-mode-patch
|
||||
Website: https://code.google.com/p/google-diff-match-patch/
|
||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Hanazono Mincho font package
|
||||
Description: Provides unicode font files for CJK (Chinese, Japanese and Korean) languages
|
||||
Note: We only include HanMinA (a HanMinB file is also available with additional glyphs)
|
||||
Location: system/3rd_party/Fonts
|
||||
Website: http://fonts.jp/hanazono/
|
||||
License: Hanazono Font License or Open Font License
|
||||
graphql-php
|
||||
Description: PHP implementation of the GraphQL standard
|
||||
Location: system/3rd_party/graphql-php
|
||||
Included version: 0.13.8
|
||||
Website: https://webonyx.github.io/graphql-php/
|
||||
License: http://opensource.org/licenses/MIT
|
||||
|
||||
history.js
|
||||
Description: HTML5 history API, used extensively in controllers
|
||||
@@ -99,21 +100,14 @@ history.js
|
||||
Howler
|
||||
Description: HTML5 audio api
|
||||
Location: applications/core/interface/howler
|
||||
Included version: 2.0.9
|
||||
Included version: 2.1.2
|
||||
Website: https://github.com/goldfire/howler.js
|
||||
License: http://opensource.org/licenses/MIT
|
||||
|
||||
HTML5shiv
|
||||
Description: Provides some HTML5 compatability for IE8
|
||||
Location: applications/core/interface/html5shiv/html5shiv.js
|
||||
Included version: 3.7.3
|
||||
Website: https://github.com/afarkas/html5shiv
|
||||
License: License: http://opensource.org/licenses/MIT
|
||||
|
||||
HTMLPurifier
|
||||
Description: Validates and cleans submitted HTML for content
|
||||
Location: system/3rd_party/HTMLPurifier
|
||||
Included version: 4.10.0
|
||||
Included version: 4.12.0
|
||||
Website: http://htmlpurifier.org
|
||||
License: http://www.gnu.org/copyleft/lesser.html
|
||||
|
||||
@@ -122,11 +116,18 @@ IcoMoon
|
||||
Location: Font files in applications/core/interface/font and CSS in development in applications/core/dev/css/global/framework/fonts.css (mixed with other CSS and modified to use correct path to font files)
|
||||
Website: https://icomoon.io/
|
||||
License: http://creativecommons.org/licenses/by/4.0/
|
||||
|
||||
|
||||
IntersectionObserver Polyfill
|
||||
Description: W3C polyfill for IntersectionObserver in browsers that don't support it (Webkit & IE)
|
||||
Location: dev/js/library/IntersectionObserver/IntersectionObserver.js
|
||||
Included version: [no version number]
|
||||
Website: https://github.com/w3c/IntersectionObserver/tree/master/polyfill
|
||||
License: https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
|
||||
jQuery
|
||||
Description: JavaScript Library
|
||||
Location: In development: dev/js/library/jquery/jquery.js
|
||||
Included version: 2.2.4
|
||||
Location: In development: dev/js/library/jquery/jquery-3.5.1.min.js
|
||||
Included version: 3.5.1
|
||||
Website: http://jquery.com
|
||||
License: http://jquery.org/license
|
||||
|
||||
@@ -158,6 +159,13 @@ jQuery.menuaim.js
|
||||
Website: https://github.com/kamens/jQuery-menu-aim
|
||||
License: http://opensource.org/licenses/MIT
|
||||
|
||||
jQuery Migrate
|
||||
Description: Migration tool for jQuery
|
||||
Location: In development: dev/js/library/jquery/jquery-migrate-3.3.0.js
|
||||
Included version: 3.3.0
|
||||
Website: https://github.com/jquery/jquery-migrate/
|
||||
License: https://github.com/jquery/jquery-migrate/blob/master/LICENSE.txt
|
||||
|
||||
jQuery.nestedSortable.js
|
||||
Description: Extends jqueryui's sortable with nested support
|
||||
Location: applications/core/interface/jquery/jquery.nestedSortable.js
|
||||
@@ -192,18 +200,11 @@ jQuery UI TouchPunch
|
||||
Included version: 0.2.3
|
||||
Website: http://touchpunch.furf.com/
|
||||
License: http://opensource.org/licenses/MIT
|
||||
|
||||
JSColor
|
||||
Description: Color selector polyfill
|
||||
Location: applications/core/interface/jscolor
|
||||
Included version: 1.4.5 (2.x API isn't compatible at this time)
|
||||
Website: http://jscolor.com
|
||||
License: http://www.gnu.org/copyleft/lesser.html
|
||||
|
||||
JShrink
|
||||
Description: Provides JavaScript minifcation
|
||||
Description: Provides JavaScript minification
|
||||
Location: system/3rd_party/JShrink
|
||||
Included version: 1.1.0
|
||||
Included version: 1.3.1
|
||||
Website: https://github.com/tedious/JShrink
|
||||
License: https://github.com/tedious/JShrink/blob/master/LICENSE
|
||||
|
||||
@@ -234,13 +235,6 @@ Normalize.css
|
||||
Included version: 6.0.0
|
||||
Website: http://necolas.github.io/normalize.css/
|
||||
License: http://opensource.org/licenses/MIT
|
||||
|
||||
Noto font package
|
||||
Description: Provides unicode font files for many of the world's languages
|
||||
Note: We do not include all of the font files available in the Noto package
|
||||
Location: system/3rd_party/Fonts
|
||||
Website: https://www.google.com/get/noto
|
||||
License: SIL OFL 1.1 (http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL)
|
||||
|
||||
parseUri
|
||||
Description: Used to parse URLs in JS
|
||||
@@ -279,7 +273,7 @@ PHP Diff Implementation
|
||||
php-punycode
|
||||
Description: A library for Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)
|
||||
Location: system/3rd_party/php-punycode
|
||||
Included version: 2.1.0
|
||||
Included version: 2.1.1
|
||||
Website: https://github.com/true/php-punycode
|
||||
License: https://github.com/true/php-punycode/blob/master/LICENSE
|
||||
|
||||
@@ -309,6 +303,13 @@ Preloaders.net
|
||||
Website: http://preloaders.net/
|
||||
License: http://preloaders.net/en/terms_of_use
|
||||
|
||||
Spectrum
|
||||
Description: Color selector polyfill
|
||||
Location: applications/core/interface/spectrum
|
||||
Included version: 2.0.0
|
||||
Website: https://seballot.github.io/spectrum/
|
||||
License: https://github.com/seballot/spectrum/blob/master/LICENSE
|
||||
|
||||
success.mp3 Notification Sound by RCP Tones
|
||||
Description: "Success" sound used in ips.ui.uploader.js
|
||||
Location: /applications/core/interface/sounds/success.mp3
|
||||
@@ -332,7 +333,7 @@ Underscore.js
|
||||
Whoops
|
||||
Description: Provides error handling for development mode
|
||||
Location: dev/Whoops
|
||||
Included Version: 2.1.8
|
||||
Included Version: 2.5.0
|
||||
Website: http://filp.github.io/whoops/
|
||||
License: https://github.com/filp/whoops/blob/master/LICENSE.md
|
||||
|
||||
|
||||
@@ -29,15 +29,15 @@ class IPSUtf8
|
||||
mb_internal_encoding('UTF-8');
|
||||
|
||||
/* Constants */
|
||||
define( 'THIS_PATH', __DIR__ );
|
||||
\define( 'THIS_PATH', __DIR__ );
|
||||
|
||||
$bits = explode( DIRECTORY_SEPARATOR, THIS_PATH );
|
||||
$bit = array_pop( $bits );
|
||||
$bit2 = array_pop( $bits );
|
||||
|
||||
define( 'ROOT_PATH', preg_replace( '#' . preg_quote( DIRECTORY_SEPARATOR, '#' ) . $bit2 . preg_quote( DIRECTORY_SEPARATOR, '#' ) . $bit . '$#', '', THIS_PATH ) );
|
||||
\define( 'ROOT_PATH', preg_replace( '#' . preg_quote( DIRECTORY_SEPARATOR, '#' ) . $bit2 . preg_quote( DIRECTORY_SEPARATOR, '#' ) . $bit . '$#', '', THIS_PATH ) );
|
||||
|
||||
define( 'IS_CLI', ( PHP_SAPI == 'cli' || empty( $_SERVER['REMOTE_ADDR'] ) ) ? true : false );
|
||||
\define( 'IS_CLI', ( PHP_SAPI == 'cli' || empty( $_SERVER['REMOTE_ADDR'] ) ) ? true : false );
|
||||
|
||||
/* Set Options - deliberately do not use root constants */
|
||||
if ( file_exists( './constants.php' ) )
|
||||
@@ -47,9 +47,9 @@ class IPSUtf8
|
||||
|
||||
foreach( static::defaultConstants() AS $k => $v )
|
||||
{
|
||||
if ( !defined( $k ) )
|
||||
if ( !\defined( $k ) )
|
||||
{
|
||||
define( $k, $v );
|
||||
\define( $k, $v );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ class IPSUtf8
|
||||
public static function errorHandler( $errno, $errstr, $errfile, $errline, $trace=NULL )
|
||||
{
|
||||
/* We don't care about these in production */
|
||||
if ( in_array( $errno, array( E_WARNING, E_NOTICE, E_STRICT, E_DEPRECATED ) ) )
|
||||
if ( \in_array( $errno, array( E_WARNING, E_NOTICE, E_STRICT, E_DEPRECATED ) ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -253,7 +253,7 @@ IPSUtf8::init();
|
||||
eval( '
|
||||
function mb_ucfirst()
|
||||
{
|
||||
$text = func_get_arg( 0 );
|
||||
$text = \func_get_arg( 0 );
|
||||
return mb_strtoupper( mb_substr( $text, 0, 1 ) ) . mb_substr( $text, 1 );
|
||||
}
|
||||
');
|
||||
@@ -67,7 +67,7 @@ class archive extends \IPSUtf8\Dispatcher\Controller
|
||||
$percent = round( ($json['convertedCount'] / \IPSUtf8\Convert\Archive::i()->getTotalRowsToConvert()) * 100, 2 );
|
||||
$msg = "Processing " . \IPSUtf8\Session::i()->current_table . ' (Total: ' . $percent . '%)';
|
||||
|
||||
if ( in_array( \IPSUtf8\Convert\Archive::ARCHIVE_TABLE, array_keys( \IPSUtf8\Session::i()->completed_json ) ) )
|
||||
if ( \in_array( \IPSUtf8\Convert\Archive::ARCHIVE_TABLE, array_keys( \IPSUtf8\Session::i()->completed_json ) ) )
|
||||
{
|
||||
\IPSUtf8\Session::i()->status = 'completed';
|
||||
\IPSUtf8\Session::i()->save();
|
||||
@@ -132,14 +132,14 @@ class archive extends \IPSUtf8\Dispatcher\Controller
|
||||
exit();
|
||||
}
|
||||
|
||||
if ( ! count( \IPSUtf8\Session::i()->has_archive ) )
|
||||
if ( ! \count( \IPSUtf8\Session::i()->has_archive ) )
|
||||
{
|
||||
\IPSUtf8\Output\Browser::i()->error("Cannot locate a separate database for the post archive.");
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
if ( ! count( \IPSUtf8\Session::i()->tables ) )
|
||||
if ( ! \count( \IPSUtf8\Session::i()->tables ) )
|
||||
{
|
||||
\IPSUtf8\Output\Browser::i()->error("No tables found for processing. Please check to ensure the correct database name and prefix are being used.");
|
||||
exit();
|
||||
|
||||
@@ -160,7 +160,7 @@ class browser extends \IPSUtf8\Dispatcher\Controller
|
||||
exit();
|
||||
}
|
||||
|
||||
if ( ! count( \IPSUtf8\Session::i()->tables ) )
|
||||
if ( ! \count( \IPSUtf8\Session::i()->tables ) )
|
||||
{
|
||||
\IPSUtf8\Output\Browser::i()->error("No tables found for processing. Please check to ensure the correct database name and prefix are being used.");
|
||||
exit();
|
||||
|
||||
@@ -34,6 +34,15 @@ class tools extends \IPSUtf8\Dispatcher\Controller
|
||||
*/
|
||||
public function collation()
|
||||
{
|
||||
if( ( version_compare( \IPSUtf8\Db::i()->server_info, '5.5.3', '>=' ) AND \IPSUtf8\Db::i('utf8')->set_charset('utf8mb4') !== FALSE ) )
|
||||
{
|
||||
$sessionData = \IPSUtf8\Session::i()->json;
|
||||
$sessionData['use_utf8mb4'] = 1;
|
||||
|
||||
\IPSUtf8\Session::i()->json = $sessionData;
|
||||
\IPSUtf8\Session::i()->save();
|
||||
}
|
||||
|
||||
\IPSUtf8\Convert::i()->fixCollation();
|
||||
|
||||
$this->manage( "Collation checked and fixed where appropriate" );
|
||||
|
||||
@@ -77,7 +77,7 @@ class cli
|
||||
|
||||
if ( \IPSUtf8\Session::i()->has_archive )
|
||||
{
|
||||
if ( ! count( \IPSUtf8\Convert\Archive::i()->getNonUtf8Tables ) )
|
||||
if ( ! \count( \IPSUtf8\Convert\Archive::i()->getNonUtf8Tables ) )
|
||||
{
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput( "You have an archive table in a different database, and it is UTF8 and collations are correct." );
|
||||
}
|
||||
@@ -103,7 +103,7 @@ class cli
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! count( \IPSUtf8\Session::i()->tables ) )
|
||||
if ( ! \count( \IPSUtf8\Session::i()->tables ) )
|
||||
{
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput("No tables found for processing. Please check to ensure the correct database name and prefix are being used.");
|
||||
exit();
|
||||
@@ -114,7 +114,7 @@ class cli
|
||||
if ( $convertClass::i()->databaseIsUtf8() )
|
||||
{
|
||||
/* Check collations */
|
||||
if ( ! count( $convertClass::i()->getNonUtf8CollationTables() ) )
|
||||
if ( ! \count( $convertClass::i()->getNonUtf8CollationTables() ) )
|
||||
{
|
||||
/* We're golden! */
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput("The database is set to UTF-8, collations are correct and doesn't need converting.\n<choice>[x] Enter 'x' to exit the conversion (RECOMMENDED).\n[y] Enter 'y' to perform a full conversion anyway</choice>", 100 );
|
||||
@@ -141,29 +141,15 @@ class cli
|
||||
}
|
||||
}
|
||||
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput( "\n" . count( $convertClass::i()->getNonUtf8Tables() ) . " table(s) are not UTF-8 and need converting.\n");
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput( "\n" . \count( $convertClass::i()->getNonUtf8Tables() ) . " table(s) are not UTF-8 and need converting.\n");
|
||||
$origUtf8Charset = \IPSUtf8\Db::i('utf8')->getCharset();
|
||||
$canMb4 = (bool) \IPSUtf8\Db::i('utf8')->set_charset( 'utf8mb4' );
|
||||
\IPSUtf8\Db::i('utf8')->set_charset( $origUtf8Charset );
|
||||
if ( version_compare( \IPSUtf8\Db::i()->server_info, '5.5.3', '>=' ) AND $canMb4 !== FALSE )
|
||||
{
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput("Use 4-byte UTF-8 Encoding (utf8mb4)?\nSome non-common symbols (such as historical scripts, music symbols and Emoji) require more space in the database to be stored. If you choose 'no', users will not be able to use these symbols on your site. If 'yes', these characters will be able to be used, but the database will use more disk space.\n<choice>[y] Enter 'y' for Yes\n[n] Enter 'n' for No\n[x] Enter 'x' to exit</choice>", 100 );
|
||||
|
||||
$sessionData = \IPSUtf8\Session::i()->json;
|
||||
|
||||
if ( \IPSUtf8\Output\Cli::i()->response === 'y' )
|
||||
{
|
||||
$sessionData['use_utf8mb4'] = 1;
|
||||
}
|
||||
else if ( \IPSUtf8\Output\Cli::i()->response === 'n' )
|
||||
{
|
||||
$sessionData['use_utf8mb4'] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$sessionData['use_utf8mb4'] = 1;
|
||||
|
||||
\IPSUtf8\Session::i()->json = $sessionData;
|
||||
\IPSUtf8\Session::i()->save();
|
||||
}
|
||||
@@ -179,7 +165,7 @@ class cli
|
||||
else
|
||||
{
|
||||
$date = date('D j F Y', \IPSUtf8\Session::i()->updated );
|
||||
$count = count( array_keys( \IPSUtf8\Session::i()->completed_json ) );
|
||||
$count = \count( array_keys( \IPSUtf8\Session::i()->completed_json ) );
|
||||
$pcent = round( ( \IPSUtf8\Session::i()->json['convertedCount'] / $convertClass::i()->getTotalRowsToConvert() * 100 ) );
|
||||
|
||||
$more = "<warning>You have a conversion session unfinished. The session was last updated on " . $date . " and has processed " . $count . " tables (" . $pcent . "%) so far.</warning>";
|
||||
@@ -230,7 +216,7 @@ class cli
|
||||
{
|
||||
$convertClass = static::$convertClass;
|
||||
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput("The database is set to UTF-8 and all tables are UTF-8 but " . count( $convertClass::i()->getNonUtf8CollationTables() ) . " table(s) have incorrect collations and need fixing.\n<choice>[f] Enter 'f' to fix table and field collations (RECOMMENDED)\n[y] Enter 'y' to perform a full conversion\n[x] Enter 'x' to exit the conversion</choice>", 100 );
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput("The database is set to UTF-8 and all tables are UTF-8 but " . \count( $convertClass::i()->getNonUtf8CollationTables() ) . " table(s) have incorrect collations and need fixing.\n<choice>[f] Enter 'f' to fix table and field collations (RECOMMENDED)\n[y] Enter 'y' to perform a full conversion\n[x] Enter 'x' to exit the conversion</choice>", 100 );
|
||||
|
||||
if ( \IPSUtf8\Output\Cli::i()->response === 'x' )
|
||||
{
|
||||
@@ -297,7 +283,7 @@ class cli
|
||||
|
||||
$convertClass::i()->renameTables();
|
||||
|
||||
if ( count( $convertClass::i()->getNonUtf8CollationTables() ) )
|
||||
if ( \count( $convertClass::i()->getNonUtf8CollationTables() ) )
|
||||
{
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput( "Checking and fixing collations." );
|
||||
$convertClass::i()->fixCollation();
|
||||
@@ -407,7 +393,7 @@ class cli
|
||||
|
||||
$toConvert = $convertClass::i()->getNonUtf8Tables();
|
||||
|
||||
if ( ! count( $toConvert ) )
|
||||
if ( ! \count( $toConvert ) )
|
||||
{
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput("Nothing to convert!");
|
||||
exit();
|
||||
|
||||
@@ -117,7 +117,7 @@ class Archive extends \IPSUtf8\Convert
|
||||
\IPSUtf8\Session::i()->current_pkey = 'archive_id';
|
||||
\IPSUtf8\Session::i()->save();
|
||||
|
||||
if ( in_array( self::ARCHIVE_TABLE, array_keys( \IPSUtf8\Session::i()->completed_json ) ) )
|
||||
if ( \in_array( self::ARCHIVE_TABLE, array_keys( \IPSUtf8\Session::i()->completed_json ) ) )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ class Archive extends \IPSUtf8\Convert
|
||||
/* Best check the tables, then */
|
||||
foreach( self::$tableDefinition['definition']['columns'] as $name => $column )
|
||||
{
|
||||
if ( $column['collation'] and ! in_array( $column['collation'], array( 'utf8_unicode_ci', 'utf8mb4_unicode_ci' ) ) )
|
||||
if ( $column['collation'] and ! \in_array( $column['collation'], array( 'utf8_unicode_ci', 'utf8mb4_unicode_ci' ) ) )
|
||||
{
|
||||
static::$nonUtf8Collations[] = self::$tableDefinition['name'];
|
||||
break;
|
||||
@@ -211,7 +211,7 @@ class Archive extends \IPSUtf8\Convert
|
||||
*/
|
||||
public static function getNumericColumns( $name )
|
||||
{
|
||||
if ( ! is_string( $name ) )
|
||||
if ( ! \is_string( $name ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -220,7 +220,7 @@ class Archive extends \IPSUtf8\Convert
|
||||
|
||||
foreach( self::$tableDefinition['definition']['columns'] as $col => $val )
|
||||
{
|
||||
if ( in_array( mb_strtolower( $val['type'] ), static::$numericCols ) )
|
||||
if ( \in_array( mb_strtolower( $val['type'] ), static::$numericCols ) )
|
||||
{
|
||||
$return[] = $val['name'];
|
||||
}
|
||||
@@ -237,7 +237,7 @@ class Archive extends \IPSUtf8\Convert
|
||||
*/
|
||||
public static function getConvertableColumns( $name )
|
||||
{
|
||||
if ( ! is_string( $name ) )
|
||||
if ( ! \is_string( $name ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -246,7 +246,7 @@ class Archive extends \IPSUtf8\Convert
|
||||
|
||||
foreach( self::$tableDefinition['definition']['columns'] as $col => $val )
|
||||
{
|
||||
if ( in_array( mb_strtolower( $val['type'] ), static::$convertCols ) )
|
||||
if ( \in_array( mb_strtolower( $val['type'] ), static::$convertCols ) )
|
||||
{
|
||||
$return[] = $val['name'];
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class Convert
|
||||
/**
|
||||
* @brief Create don't populate
|
||||
*/
|
||||
protected static $createOnly = array( 'content_cache_posts', 'content_cache_sigs', 'sessions', 'topic_views', 'search_keywords' );
|
||||
protected static $createOnly = array( 'content_cache_posts', 'content_cache_sigs', 'sessions', 'topic_views', 'search_keywords', 'core_share_links_log', 'spider_logs', 'inline_notifications' );
|
||||
|
||||
/**
|
||||
* @brief Problem Tables that can cause an error due to serialization while using "fast" mode
|
||||
@@ -92,7 +92,7 @@ class Convert
|
||||
if ( self::$instance === NULL )
|
||||
{
|
||||
static::$db = \IPSUtf8\Db::i();
|
||||
if ( defined( 'SOURCE_DB_CHARSET' ) AND SOURCE_DB_CHARSET !== NULL )
|
||||
if ( \defined( 'SOURCE_DB_CHARSET' ) AND SOURCE_DB_CHARSET !== NULL )
|
||||
{
|
||||
static::$db->set_charset( SOURCE_DB_CHARSET );
|
||||
}
|
||||
@@ -177,24 +177,24 @@ class Convert
|
||||
|
||||
/* Latin1 is actually cp1252, not ISO-8859-1 @link http://dev.mysql.com/doc/refman/5.0/en/charset-we-sets.html */
|
||||
/* But only if our document character set is ISO-8859-1 or UTF-8. Otherwise, we're using the slow method which needs to real charset despite what the table is set too */
|
||||
if ( $tableCharSet === 'latin1' AND in_array( mb_strtolower( $currentCharSet ), array( 'iso-8859-1', 'utf-8' ) ) )
|
||||
if ( $tableCharSet === 'latin1' AND \in_array( mb_strtolower( $currentCharSet ), array( 'iso-8859-1', 'utf-8' ) ) )
|
||||
{
|
||||
$currentCharSet = 'windows-1252';
|
||||
}
|
||||
|
||||
if ( defined( 'FORCE_CONVERT_CHARSET' ) AND FORCE_CONVERT_CHARSET !== NULL )
|
||||
if ( \defined( 'FORCE_CONVERT_CHARSET' ) AND FORCE_CONVERT_CHARSET !== NULL )
|
||||
{
|
||||
$currentCharSet = FORCE_CONVERT_CHARSET;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !defined( 'SOURCE_DB_CHARSET' ) OR SOURCE_DB_CHARSET === NULL )
|
||||
if ( !\defined( 'SOURCE_DB_CHARSET' ) OR SOURCE_DB_CHARSET === NULL )
|
||||
{
|
||||
static::$db->set_charset( $tableCharSet );
|
||||
}
|
||||
|
||||
/* Create table only */
|
||||
if ( IPB_LOCK and in_array( $table['name'], static::$createOnly ) )
|
||||
if ( IPB_LOCK and \in_array( $table['name'], static::$createOnly ) )
|
||||
{
|
||||
static::log( 'No content conversion of ' . $table['name'] . ' required' );
|
||||
|
||||
@@ -213,7 +213,7 @@ class Convert
|
||||
|
||||
if ( $table === null )
|
||||
{
|
||||
if ( count( array_keys( \IPSUtf8\Session::i()->tables ) ) == count( array_keys( \IPSUtf8\Session::i()->completed_json ) ) )
|
||||
if ( \count( array_keys( \IPSUtf8\Session::i()->tables ) ) == \count( array_keys( \IPSUtf8\Session::i()->completed_json ) ) )
|
||||
{
|
||||
\IPSUtf8\Session::i()->status = 'completed';
|
||||
\IPSUtf8\Session::i()->save();
|
||||
@@ -224,7 +224,7 @@ class Convert
|
||||
}
|
||||
|
||||
/* Got any fields to convert? */
|
||||
if ( count( $convertCols ) === 0 )
|
||||
if ( \count( $convertCols ) === 0 )
|
||||
{
|
||||
/* No data to convert, lets repopulate the easy way! */
|
||||
$this->preInsert( $table );
|
||||
@@ -272,7 +272,7 @@ class Convert
|
||||
}
|
||||
|
||||
/* Latin1 or ISO-8559-1? */
|
||||
if ( ! in_array( $table['name'], static::$problemTables ) AND ( in_array( $tableCharSet, $this->getMysqlCharSets() ) ) and ( \IPSUtf8\Session::i()->current_charset == 'utf-8' or \IPSUtf8\Session::i()->current_charset == 'iso-8859-1' ) AND ( !isset( $sessionData['force_conversion'] ) OR $sessionData['force_conversion'] !== 1 ) )
|
||||
if ( ! \in_array( $table['name'], static::$problemTables ) AND ( \in_array( $tableCharSet, $this->getMysqlCharSets() ) ) and ( \IPSUtf8\Session::i()->current_charset == 'utf-8' or \IPSUtf8\Session::i()->current_charset == 'iso-8859-1' ) AND ( !isset( $sessionData['force_conversion'] ) OR $sessionData['force_conversion'] !== 1 ) )
|
||||
{
|
||||
/* Convert the fast way! */
|
||||
$count = static::$utf->select( 'COUNT(*)', $table['name'] )->first();
|
||||
@@ -295,7 +295,7 @@ class Convert
|
||||
|
||||
foreach( array_keys( $table['definition']['columns'] ) as $col )
|
||||
{
|
||||
if ( in_array( $col, $convertCols ) )
|
||||
if ( \in_array( $col, $convertCols ) )
|
||||
{
|
||||
/* Even if the current charset is set to UTF-8, if the Table Charset is latin1, we need to use this method */
|
||||
/* ... but only if the actual column isn't using utf8 */
|
||||
@@ -304,7 +304,7 @@ class Convert
|
||||
{
|
||||
$select[] = 'CAST( `' . $col . '` AS BINARY )';
|
||||
}
|
||||
else if ( FORCE_MULTI_CONVERT === FALSE AND ( \IPSUtf8\Session::i()->current_charset != 'utf-8' OR ( $tableCharSet != 'utf8' AND ! in_array( $columnCollation, array( 'utf8_unicode_ci', 'utf8mb4_unicode_ci' ) ) ) OR ( $tableCharSet == 'utf8' AND mb_substr( $columnCollation, 0, 5 ) == 'latin' ) ) )
|
||||
else if ( FORCE_MULTI_CONVERT === FALSE AND ( \IPSUtf8\Session::i()->current_charset != 'utf-8' OR ( $tableCharSet != 'utf8' AND ! \in_array( $columnCollation, array( 'utf8_unicode_ci', 'utf8mb4_unicode_ci' ) ) ) OR ( $tableCharSet == 'utf8' AND mb_substr( $columnCollation, 0, 5 ) == 'latin' ) ) )
|
||||
{
|
||||
if ( \IPSUtf8\Session::i()->current_charset == 'iso-8859-1' AND mb_substr( $columnCollation, 0, 5 ) == 'latin' )
|
||||
{
|
||||
@@ -336,12 +336,12 @@ class Convert
|
||||
}
|
||||
|
||||
$source_charset = 'latin1';
|
||||
if ( defined( 'SOURCE_DB_CHARSET' ) AND SOURCE_DB_CHARSET !== NULL )
|
||||
if ( \defined( 'SOURCE_DB_CHARSET' ) AND SOURCE_DB_CHARSET !== NULL )
|
||||
{
|
||||
$source_charset = SOURCE_DB_CHARSET;
|
||||
}
|
||||
|
||||
if ( defined( 'MULTI_NO_CMP' ) AND MULTI_NO_CMP === TRUE )
|
||||
if ( \defined( 'MULTI_NO_CMP' ) AND MULTI_NO_CMP === TRUE )
|
||||
{
|
||||
$select[] = "CONVERT(CONVERT(CONVERT(`{$col}` USING {$source_charset}) USING BINARY) USING {$using})";
|
||||
}
|
||||
@@ -385,7 +385,7 @@ class Convert
|
||||
$rows = static::$db->select(
|
||||
'*',
|
||||
$table['name'],
|
||||
array( \IPSUtf8\Session::i()->current_pkey . ' > ?', intval( $start ) ),
|
||||
array( \IPSUtf8\Session::i()->current_pkey . ' > ?', \intval( $start ) ),
|
||||
\IPSUtf8\Session::i()->current_pkey . ' ASC',
|
||||
( $limit ? array( 0, ( $limit - $convertCount ) ) : null )
|
||||
);
|
||||
@@ -404,14 +404,14 @@ class Convert
|
||||
);
|
||||
}
|
||||
|
||||
if ( !defined( 'FORCE_CONVERT_METHOD' ) OR FORCE_CONVERT_METHOD === NULL )
|
||||
if ( !\defined( 'FORCE_CONVERT_METHOD' ) OR FORCE_CONVERT_METHOD === NULL )
|
||||
{
|
||||
\IPSUtf8\Text\Charset::$method = 'internal';
|
||||
|
||||
/* Optimise for latin character sets */
|
||||
if ( function_exists( 'mb_convert_encoding' ) )
|
||||
if ( \function_exists( 'mb_convert_encoding' ) )
|
||||
{
|
||||
if ( in_array( strtolower( $currentCharSet ), array_map( 'strtolower', mb_list_encodings() ) ) )
|
||||
if ( \in_array( strtolower( $currentCharSet ), array_map( 'strtolower', mb_list_encodings() ) ) )
|
||||
{
|
||||
\IPSUtf8\Text\Charset::$method = 'mb';
|
||||
}
|
||||
@@ -419,7 +419,7 @@ class Convert
|
||||
}
|
||||
|
||||
$rowCount = 0;
|
||||
$gotRows = count( $rows );
|
||||
$gotRows = \count( $rows );
|
||||
$batch = array();
|
||||
$batchBytes = 0;
|
||||
$max = ( $limit ) ?: 250;
|
||||
@@ -464,7 +464,7 @@ class Convert
|
||||
{
|
||||
if ( isset( $row[ $col ] ) AND ! empty( $row[ $col ] ) )
|
||||
{
|
||||
$currentCharSet = ( defined( 'FORCE_CONVERT_CHARSET' ) AND FORCE_CONVERT_CHARSET != NULL ) ? FORCE_CONVERT_CHARSET : $currentCharSet;
|
||||
$currentCharSet = ( \defined( 'FORCE_CONVERT_CHARSET' ) AND FORCE_CONVERT_CHARSET != NULL ) ? FORCE_CONVERT_CHARSET : $currentCharSet;
|
||||
if ( static::isSerialized( $row[ $col ] ) AND \IPSUtf8\Text\Charset::i()->needsConverting( $row[ $col ], $currentCharSet, 'UTF-8' ) )
|
||||
{
|
||||
/* Store a copy in case it doesn't work */
|
||||
@@ -484,7 +484,7 @@ class Convert
|
||||
/* Something went wrong... maybe we can figure it out */
|
||||
$work = unserialize( $original );
|
||||
array_walk_recursive( $work, function ( &$input, $key ) use ( $currentCharSet, $tableCharSet ) {
|
||||
if ( function_exists( 'mb_detect_encoding' ) )
|
||||
if ( \function_exists( 'mb_detect_encoding' ) )
|
||||
{
|
||||
$encoding = mb_detect_encoding( $input );
|
||||
$input = \IPSUtf8\Text\Charset::i()->convert( $input, $encoding, 'UTF-8' );
|
||||
@@ -515,7 +515,7 @@ class Convert
|
||||
{
|
||||
if ( isset( $row[ $col ] ) AND ! empty( $row[ $col ] ) )
|
||||
{
|
||||
if ( $row[ $col ] === null OR ! is_numeric( $row[ $col ] ) )
|
||||
if ( $row[ $col ] === null OR !\is_numeric( $row[ $col ] ) )
|
||||
{
|
||||
$row[ $col ] = 0;
|
||||
}
|
||||
@@ -526,7 +526,7 @@ class Convert
|
||||
$tmp = $row; // Use a copy so the reference in array_walk doesn't overwrite the row to be inserted
|
||||
|
||||
/* Make sure it's an associative array as topic_views only has 1 column so DB driver returns an indexed array only */
|
||||
if ( is_array( $tmp ) )
|
||||
if ( \is_array( $tmp ) )
|
||||
{
|
||||
array_walk_recursive( $tmp, function( &$input, $key )
|
||||
{
|
||||
@@ -540,23 +540,23 @@ class Convert
|
||||
$nextBatch = null;
|
||||
|
||||
/* Give us an error margin to account for MySQL syntax */
|
||||
if ( $batchBytes > ( $this->_data['max_allowed_packet'] - ( ( $this->_data['max_allowed_packet'] / 100 ) * ( count( $batch ) * 0.3 ) ) ) )
|
||||
if ( $batchBytes > ( $this->_data['max_allowed_packet'] - ( ( $this->_data['max_allowed_packet'] / 100 ) * ( \count( $batch ) * 0.3 ) ) ) )
|
||||
{
|
||||
/* Remove last row */
|
||||
$nextBatch = array_pop( $batch );
|
||||
|
||||
static::log( "Max packet hit with " . $batchBytes . 'b with ' . count( $batch ) . ' rows' );
|
||||
static::log( "Max packet hit with " . $batchBytes . 'b with ' . \count( $batch ) . ' rows' );
|
||||
}
|
||||
|
||||
/* If we have moved the only row from $batch to $nextbatch, then process that now */
|
||||
if ( count( $nextBatch ) and ! count( $batch ) )
|
||||
if ( \count( $nextBatch ) and ! \count( $batch ) )
|
||||
{
|
||||
$batch = $nextBatch;
|
||||
$nextBatch = array();
|
||||
}
|
||||
|
||||
/* Got a batch to write? */
|
||||
if ( $nextBatch !== null OR ( count( $batch ) === $max ) OR ( $gotRows === count( $batch ) ) )
|
||||
if ( $nextBatch !== null OR ( \count( $batch ) === $max ) OR ( $gotRows === \count( $batch ) ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -573,8 +573,8 @@ class Convert
|
||||
$this->postInsert( $table );
|
||||
|
||||
/* Update counts */
|
||||
$sessionData['convertedCount'] += count( $batch );
|
||||
$convertCount += count( $batch );
|
||||
$sessionData['convertedCount'] += \count( $batch );
|
||||
$convertCount += \count( $batch );
|
||||
|
||||
if ( \IPSUtf8\Session::i()->current_pkey )
|
||||
{
|
||||
@@ -582,14 +582,14 @@ class Convert
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPSUtf8\Session::i()->current_row += count( $batch );
|
||||
\IPSUtf8\Session::i()->current_row += \count( $batch );
|
||||
}
|
||||
|
||||
\IPSUtf8\Session::i()->status = 'processing';
|
||||
\IPSUtf8\Session::i()->json = $sessionData;
|
||||
\IPSUtf8\Session::i()->save();
|
||||
|
||||
static::log( count( $batch ) . " rows batch inserted using conversion method: " . \IPSUtf8\Text\Charset::$method . ', last insert ID ' . $insertId );
|
||||
static::log( \count( $batch ) . " rows batch inserted using conversion method: " . \IPSUtf8\Text\Charset::$method . ', last insert ID ' . $insertId );
|
||||
|
||||
$batch = ( $nextBatch !== null ) ? array( $nextBatch ) : array();
|
||||
$batchBytes = 0;
|
||||
@@ -790,9 +790,9 @@ class Convert
|
||||
foreach( explode( ";", $currentLocale ) as $locale )
|
||||
{
|
||||
$parts = explode( "=", $locale );
|
||||
if( in_array( $parts[0], array( 'LC_ALL', 'LC_COLLATE', 'LC_CTYPE', 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME' ) ) )
|
||||
if( \in_array( $parts[0], array( 'LC_ALL', 'LC_COLLATE', 'LC_CTYPE', 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME' ) ) )
|
||||
{
|
||||
setlocale( constant( $parts[0] ), $parts[1] );
|
||||
setlocale( \constant( $parts[0] ), $parts[1] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -979,7 +979,7 @@ class Convert
|
||||
|
||||
foreach( \IPSUtf8\Session::i()->tables as $name => $data )
|
||||
{
|
||||
if ( in_array( $name, $this->getNonUtf8CollationTables() ) )
|
||||
if ( \in_array( $name, $this->getNonUtf8CollationTables() ) )
|
||||
{
|
||||
/* Skip if it's an _old table */
|
||||
if( mb_substr( $name, -4 ) == '_old' )
|
||||
@@ -990,72 +990,37 @@ class Convert
|
||||
$cols = static::getConvertableColumns( $data['name'] );
|
||||
$tableData = \IPSUtf8\Session::i()->tables[ $data['name'] ];
|
||||
|
||||
if ( count( $cols ) )
|
||||
if ( \count( $cols ) )
|
||||
{
|
||||
$dropIndexes = array();
|
||||
$addIndexes = array();
|
||||
$modify = array();
|
||||
$hasUnique = FALSE;
|
||||
|
||||
/* Changing collation can cause issues for duplicate entries in unique keys */
|
||||
if ( isset( $tableData['definition']['indexes'] ) )
|
||||
{
|
||||
foreach( $tableData['definition']['indexes'] as $key => $index )
|
||||
{
|
||||
if ( $index['type'] === 'unique' OR $index['type'] === 'primary' )
|
||||
{
|
||||
/* Make sure none of the columns in this index are auto_increment */
|
||||
foreach( $index['columns'] AS $k => $idxcol )
|
||||
{
|
||||
if ( $tableData['definition']['columns'][ $idxcol ]['auto_increment'] === TRUE )
|
||||
{
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
|
||||
if ( static::$db->checkForIndex( $name, $key ) )
|
||||
{
|
||||
$hasUnique = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* We don't need to drop any indexes - just create a copy of the table and insert ignore */
|
||||
if ( $hasUnique === TRUE )
|
||||
{
|
||||
/* Let's try an alter first - below may not be necessary */
|
||||
try
|
||||
{
|
||||
static::$utf->query( "ALTER TABLE `" . static::$db->prefix . $name . "` CONVERT TO CHARACTER SET " . $charset . " COLLATE " . $collation );
|
||||
static::$utf->query( "ALTER TABLE `" . static::$db->prefix . $name . "` DEFAULT CHARACTER SET " . $charset . " COLLATE " . $collation );
|
||||
}
|
||||
catch( \IPSUtf8\Db\Exception $e )
|
||||
{
|
||||
/* Did not work - try the long way */
|
||||
static::$utf->query( "RENAME TABLE `" . static::$db->prefix . $name . "` TO `" . static::$db->prefix . $name . "_temp`" );
|
||||
static::log( $name . " has Unique Index - temp table created from main." );
|
||||
/* Previously we used a raw create table query to create a copy, however this does not check index lengths. Leaving this for reference. */
|
||||
//static::$utf->query( "CREATE TABLE `" . static::$db->prefix . $name . "` LIKE `" . static::$db->prefix . $name . "_temp`" );
|
||||
static::$db->createTable( $this->checkTable( $tableData['definition'] ) );
|
||||
static::$utf->query( "ALTER TABLE `" . static::$db->prefix . $name . "` CONVERT TO CHARACTER SET " . $charset . " COLLATE " . $collation );
|
||||
static::$utf->query( "ALTER TABLE `" . static::$db->prefix . $name . "` DEFAULT CHARACTER SET " . $charset . " COLLATE " . $collation );
|
||||
static::log( $name . " created from temp table." );
|
||||
static::$utf->query( "REPLACE INTO `" . static::$db->prefix . $name . "` SELECT * FROM `" . static::$db->prefix . $name . "_temp`" );
|
||||
static::log( $name . " data copied to new table." );
|
||||
static::$utf->query( "DROP TABLE `" . static::$db->prefix . $name . "_temp`" );
|
||||
static::log( $name . "_temp dropped" );
|
||||
}
|
||||
}
|
||||
else
|
||||
/* Let's try an alter first - below may not be necessary */
|
||||
try
|
||||
{
|
||||
static::$utf->query( "ALTER TABLE `" . static::$db->prefix . $name . "` CONVERT TO CHARACTER SET " . $charset . " COLLATE " . $collation );
|
||||
static::$utf->query( "ALTER TABLE `" . static::$db->prefix . $name . "` DEFAULT CHARACTER SET " . $charset . " COLLATE " . $collation );
|
||||
}
|
||||
catch( \IPSUtf8\Db\Exception $e )
|
||||
{
|
||||
/* Did not work - try the long way */
|
||||
static::$utf->query( "RENAME TABLE `" . static::$db->prefix . $name . "` TO `" . static::$db->prefix . $name . "_temp`" );
|
||||
static::log( $name . " has Unique Index - temp table created from main." );
|
||||
/* Previously we used a raw create table query to create a copy, however this does not check index lengths. Leaving this for reference. */
|
||||
//static::$utf->query( "CREATE TABLE `" . static::$db->prefix . $name . "` LIKE `" . static::$db->prefix . $name . "_temp`" );
|
||||
static::$db->createTable( $this->checkTable( $tableData['definition'] ) );
|
||||
static::$utf->query( "ALTER TABLE `" . static::$db->prefix . $name . "` CONVERT TO CHARACTER SET " . $charset . " COLLATE " . $collation );
|
||||
static::$utf->query( "ALTER TABLE `" . static::$db->prefix . $name . "` DEFAULT CHARACTER SET " . $charset . " COLLATE " . $collation );
|
||||
static::log( $name . " created from temp table." );
|
||||
static::$utf->query( "REPLACE INTO `" . static::$db->prefix . $name . "` SELECT * FROM `" . static::$db->prefix . $name . "_temp`" );
|
||||
static::log( $name . " data copied to new table." );
|
||||
static::$utf->query( "DROP TABLE `" . static::$db->prefix . $name . "_temp`" );
|
||||
static::log( $name . "_temp dropped" );
|
||||
}
|
||||
|
||||
if ( count( $cols ) )
|
||||
if ( \count( $cols ) )
|
||||
{
|
||||
foreach( $cols as $col )
|
||||
{
|
||||
@@ -1063,14 +1028,14 @@ class Convert
|
||||
{
|
||||
$colData = $tableData['definition']['columns'][ $col ];
|
||||
|
||||
$modify[] = " MODIFY `" . $col . "` " . $colData['type'] . ( ( is_numeric( $colData['length'] ) AND $colData['length'] > 0 ) ? "(" . $colData['length'] . ")" : '' ) . " CHARACTER SET " . $charset . " COLLATE " . $collation;
|
||||
$modify[] = " MODIFY `" . $col . "` " . $colData['type'] . ( ( \is_numeric( $colData['length'] ) AND $colData['length'] > 0 ) ? "(" . $colData['length'] . ")" : '' ) . " CHARACTER SET " . $charset . " COLLATE " . $collation;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( count( $cols ) )
|
||||
if ( \count( $cols ) )
|
||||
{
|
||||
if ( count( $modify ) )
|
||||
if ( \count( $modify ) )
|
||||
{
|
||||
$query = "ALTER TABLE `" . static::$db->prefix . $name . "` " . implode( ',', $modify );
|
||||
|
||||
@@ -1078,7 +1043,7 @@ class Convert
|
||||
static::$utf->query( $query );
|
||||
}
|
||||
|
||||
if ( /*count( $modify ) and*/ count( $addIndexes ) )
|
||||
if ( /*count( $modify ) and*/ \count( $addIndexes ) )
|
||||
{
|
||||
$query = "ALTER TABLE `" . static::$db->prefix . $name . "` " . implode( ',', $addIndexes );
|
||||
|
||||
@@ -1212,13 +1177,13 @@ class Convert
|
||||
$nonUtf8Tables = array_keys( \IPSUtf8\Session::i()->tables );//$this->getNonUtf8Tables();
|
||||
|
||||
/* No table selected */
|
||||
if ( is_array( $nonUtf8Tables ) and count( $nonUtf8Tables ) )
|
||||
if ( \is_array( $nonUtf8Tables ) and \count( $nonUtf8Tables ) )
|
||||
{
|
||||
if ( is_array( \IPSUtf8\Session::i()->completed_json ) )
|
||||
if ( \is_array( \IPSUtf8\Session::i()->completed_json ) )
|
||||
{
|
||||
$diff = array_diff( $nonUtf8Tables, array_keys( \IPSUtf8\Session::i()->completed_json ) );
|
||||
|
||||
if ( count( $diff ) )
|
||||
if ( \count( $diff ) )
|
||||
{
|
||||
$table = \IPSUtf8\Session::i()->tables[ array_shift( $diff ) ];
|
||||
}
|
||||
@@ -1309,7 +1274,7 @@ class Convert
|
||||
{
|
||||
$thisLength = ( isset( $index['length'][ $i ] ) ) ? $index['length'][ $i ] : ( ( (int) $definition['columns'][ $column ]['length'] or empty( $definition['columns'][ $column ]['length'] ) ) ? $definition['columns'][ $column ]['length'] : 250 );
|
||||
|
||||
$isText = in_array( mb_strtolower( $definition['columns'][ $column ]['type'] ), array( 'mediumtext', 'text' ) );
|
||||
$isText = \in_array( mb_strtolower( $definition['columns'][ $column ]['type'] ), array( 'mediumtext', 'text' ) );
|
||||
|
||||
if ( $hasText === false and $isText === true )
|
||||
{
|
||||
@@ -1328,7 +1293,7 @@ class Convert
|
||||
{
|
||||
$thisLength = ( isset( $index['length'][ $i ] ) ) ? $index['length'][ $i ] : ( (int) $definition['columns'][ $column ]['length'] ? $definition['columns'][ $column ]['length'] : 250 );
|
||||
|
||||
if ( isset( $definition['columns'][ $column ] ) and ( ( ! empty( $thisLength ) or in_array( mb_strtolower( $definition['columns'][ $column ]['type'] ), array( 'mediumtext', 'text' ) ) ) ) )
|
||||
if ( isset( $definition['columns'][ $column ] ) and ( ( ! empty( $thisLength ) or \in_array( mb_strtolower( $definition['columns'][ $column ]['type'] ), array( 'mediumtext', 'text' ) ) ) ) )
|
||||
{
|
||||
/* Column name, column length, column type */
|
||||
$needsFixing[ $key ][ $i ] = array( $column, $thisLength, $definition['columns'][ $column ]['type'] );
|
||||
@@ -1340,7 +1305,7 @@ class Convert
|
||||
}
|
||||
}
|
||||
|
||||
if ( count( $needsFixing ) )
|
||||
if ( \count( $needsFixing ) )
|
||||
{
|
||||
foreach( $needsFixing as $key => $i )
|
||||
{
|
||||
@@ -1362,7 +1327,7 @@ class Convert
|
||||
/* Apply debt if we have any. We do not reduce integers */
|
||||
foreach( $i as $x => $vals )
|
||||
{
|
||||
if ( in_array( mb_strtoupper( $vals[2] ), array_keys( static::$numericCols ) ) )
|
||||
if ( \in_array( mb_strtoupper( $vals[2] ), array_keys( static::$numericCols ) ) )
|
||||
{
|
||||
$debt += $vals[1];
|
||||
}
|
||||
@@ -1382,7 +1347,7 @@ class Convert
|
||||
$vals[1] = 250;
|
||||
}
|
||||
|
||||
if ( in_array( mb_strtoupper( $vals[2] ), array_keys( static::$numericCols ) ) )
|
||||
if ( \in_array( mb_strtoupper( $vals[2] ), array_keys( static::$numericCols ) ) )
|
||||
{
|
||||
/* Preserve col len where possible but if the column length is greater than subpart allowed, NULL the length
|
||||
otherwise MySQL will complain as you cannot use subpart on non-string column. */
|
||||
@@ -1402,9 +1367,9 @@ class Convert
|
||||
|
||||
foreach( $i as $x => $vals )
|
||||
{
|
||||
if ( in_array( mb_strtolower( $vals[2] ), static::$convertCols ) AND $definition['columns'][ $definition['indexes'][ $key ]['columns'][ $x ] ]['length'] != $vals[1] )
|
||||
if ( \in_array( mb_strtolower( $vals[2] ), static::$convertCols ) AND $definition['columns'][ $definition['indexes'][ $key ]['columns'][ $x ] ]['length'] != $vals[1] )
|
||||
{
|
||||
$definition['indexes'][ $key ]['length'][ $x ] = intval( $vals[1] );
|
||||
$definition['indexes'][ $key ]['length'][ $x ] = \intval( $vals[1] );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1503,7 +1468,7 @@ class Convert
|
||||
|
||||
foreach( $table['definition']['columns'] as $col => $val )
|
||||
{
|
||||
if ( in_array( mb_strtolower( $val['type'] ), array( 'mediumtext', 'text' ) ) )
|
||||
if ( \in_array( mb_strtolower( $val['type'] ), array( 'mediumtext', 'text' ) ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -1529,7 +1494,7 @@ class Convert
|
||||
{
|
||||
$total++;
|
||||
|
||||
if ( in_array( mb_strtolower( $val['type'] ), array( 'varchar' ) ) )
|
||||
if ( \in_array( mb_strtolower( $val['type'] ), array( 'varchar' ) ) )
|
||||
{
|
||||
$var++;
|
||||
}
|
||||
@@ -1580,7 +1545,7 @@ class Convert
|
||||
/* Best check the tables, then */
|
||||
$json = \IPSUtf8\Session::i()->json;
|
||||
|
||||
if ( count( $this->getNonUtf8Tables() ) )
|
||||
if ( \count( $this->getNonUtf8Tables() ) )
|
||||
{
|
||||
$yeahProbably = false;
|
||||
}
|
||||
@@ -1651,7 +1616,7 @@ class Convert
|
||||
|
||||
foreach( array_keys( \IPSUtf8\Session::i()->tables ) as $table )
|
||||
{
|
||||
static::$rowsToConvert += intval( \IPSUtf8\Session::i()->tables[ $table ]['count'] );
|
||||
static::$rowsToConvert += \intval( \IPSUtf8\Session::i()->tables[ $table ]['count'] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1673,7 +1638,7 @@ class Convert
|
||||
foreach( \IPSUtf8\Session::i()->tables as $table => $definition )
|
||||
{
|
||||
/* If the table itself is not utf8_unicode_ci, don't bother check columns */
|
||||
if ( $definition['definition']['collation'] AND !in_array( $definition['definition']['collation'], array( 'utf8_unicode_ci', 'utf8mb4_unicode_ci' ) ) )
|
||||
if ( $definition['definition']['collation'] AND !\in_array( $definition['definition']['collation'], array( 'utf8_unicode_ci', 'utf8mb4_unicode_ci' ) ) )
|
||||
{
|
||||
static::$nonUtf8Collations[] = $table;
|
||||
continue;
|
||||
@@ -1681,7 +1646,7 @@ class Convert
|
||||
|
||||
foreach( $definition['definition']['columns'] as $name => $column )
|
||||
{
|
||||
if ( $column['collation'] and ! in_array( $column['collation'], array( 'utf8_unicode_ci', 'utf8mb4_unicode_ci' ) ) )
|
||||
if ( $column['collation'] and ! \in_array( $column['collation'], array( 'utf8_unicode_ci', 'utf8mb4_unicode_ci' ) ) )
|
||||
{
|
||||
static::$nonUtf8Collations[] = $table;
|
||||
break;
|
||||
@@ -1712,10 +1677,10 @@ class Convert
|
||||
|
||||
foreach( $json['charSets'] as $charSet => $tablesArray )
|
||||
{
|
||||
$data[] = count( $tablesArray ) . ' tables are ' . $charSet;
|
||||
$data[] = \count( $tablesArray ) . ' tables are ' . $charSet;
|
||||
}
|
||||
|
||||
$data[] = count( $this->getNonUtf8CollationTables() ) . " tables have incorrect collations";
|
||||
$data[] = \count( $this->getNonUtf8CollationTables() ) . " tables have incorrect collations";
|
||||
$data[] = "Can use 'dump' method: " . var_export( $this->canDump(), true );
|
||||
|
||||
return $data;
|
||||
@@ -1771,7 +1736,7 @@ class Convert
|
||||
*/
|
||||
public static function getNumericColumns( $name )
|
||||
{
|
||||
if ( ! is_string( $name ) )
|
||||
if ( ! \is_string( $name ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1781,7 +1746,7 @@ class Convert
|
||||
|
||||
foreach( $table['definition']['columns'] as $col => $val )
|
||||
{
|
||||
if ( in_array( mb_strtolower( $val['type'] ), static::$numericCols ) )
|
||||
if ( \in_array( mb_strtolower( $val['type'] ), static::$numericCols ) )
|
||||
{
|
||||
$return[] = $val['name'];
|
||||
}
|
||||
@@ -1798,7 +1763,7 @@ class Convert
|
||||
*/
|
||||
public static function getConvertableColumns( $name )
|
||||
{
|
||||
if ( ! is_string( $name ) )
|
||||
if ( ! \is_string( $name ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1808,7 +1773,7 @@ class Convert
|
||||
|
||||
foreach( $table['definition']['columns'] as $col => $val )
|
||||
{
|
||||
if ( in_array( mb_strtolower( $val['type'] ), static::$convertCols ) )
|
||||
if ( \in_array( mb_strtolower( $val['type'] ), static::$convertCols ) )
|
||||
{
|
||||
$return[] = $val['name'];
|
||||
}
|
||||
@@ -1840,7 +1805,7 @@ class Convert
|
||||
if (
|
||||
( $tablesOk ) AND
|
||||
( \IPSUtf8\Session::i()->current_charset == 'utf-8' or \IPSUtf8\Session::i()->current_charset == 'iso-8859-1' ) AND
|
||||
( ( is_callable( 'exec' ) AND false === stripos( ini_get( 'disable_functions' ), 'exec' ) ) )
|
||||
( ( \is_callable( 'exec' ) AND false === stripos( ini_get( 'disable_functions' ), 'exec' ) ) )
|
||||
)
|
||||
{
|
||||
try
|
||||
@@ -1852,7 +1817,7 @@ class Convert
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! array( $output ) or ! count( $output ) or ( ! stristr( implode( "\n", $output ), 'latin' ) ) )
|
||||
if ( ! array( $output ) or ! \count( $output ) or ( ! stristr( implode( "\n", $output ), 'latin' ) ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ class Db extends \mysqli
|
||||
}
|
||||
|
||||
/* Connect */
|
||||
$classname = get_called_class();
|
||||
$classname = \get_called_class();
|
||||
self::$multitons[ $identifier ] = @new $classname(
|
||||
$connectionSettings['sql_host'],
|
||||
$connectionSettings['sql_user'],
|
||||
@@ -287,7 +287,7 @@ class Db extends \mysqli
|
||||
foreach ( $binds as $bindVal )
|
||||
{
|
||||
$i++;
|
||||
switch ( gettype( $bindVal ) )
|
||||
switch ( \gettype( $bindVal ) )
|
||||
{
|
||||
case 'boolean':
|
||||
case 'integer':
|
||||
@@ -356,7 +356,7 @@ class Db extends \mysqli
|
||||
/* Bind values */
|
||||
if( $bind->haveBinds() === TRUE )
|
||||
{
|
||||
call_user_func_array( array( $stmt, 'bind_param' ), $bind->get() );
|
||||
$stmt->bind_param( ...$bind->get() );
|
||||
}
|
||||
|
||||
/* Execute */
|
||||
@@ -372,7 +372,6 @@ class Db extends \mysqli
|
||||
}
|
||||
|
||||
const SELECT_DISTINCT = 1;
|
||||
const SELECT_SQL_CALC_FOUND_ROWS = 2;
|
||||
|
||||
/**
|
||||
* Build SELECT statement
|
||||
@@ -386,7 +385,6 @@ class Db extends \mysqli
|
||||
* @param array|string|NULL $having HAVING clause (same format as WHERE clause)
|
||||
* @param int $flags Bitwise flags
|
||||
* @li \IPSUtf8\Db::SELECT_DISTINCT Will use SELECT DISTINCT
|
||||
* @li \IPSUtf8\DB::SELECT_SQL_CALC_FOUND_ROWS Will add SQL_CALC_FOUND_ROWS
|
||||
* @return \IPSUtf8\Db\Select
|
||||
*
|
||||
*/
|
||||
@@ -400,13 +398,9 @@ class Db extends \mysqli
|
||||
{
|
||||
$query .= 'DISTINCT ';
|
||||
}
|
||||
if ( $flags & static::SELECT_SQL_CALC_FOUND_ROWS )
|
||||
{
|
||||
$query .= 'SQL_CALC_FOUND_ROWS ';
|
||||
}
|
||||
|
||||
/* Columns */
|
||||
if ( is_string( $columns ) )
|
||||
if ( \is_string( $columns ) )
|
||||
{
|
||||
$query .= $columns;
|
||||
}
|
||||
@@ -419,7 +413,7 @@ class Db extends \mysqli
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
if ( is_array( $table ) )
|
||||
if ( \is_array( $table ) )
|
||||
{
|
||||
$query .= " FROM `{$this->prefix}{$table[0]}` AS `{$table[1]}`";
|
||||
}
|
||||
@@ -530,7 +524,7 @@ class Db extends \mysqli
|
||||
/* Is this just one row? */
|
||||
foreach ( $set as $k => $v )
|
||||
{
|
||||
if ( !is_array( $v ) )
|
||||
if ( !\is_array( $v ) )
|
||||
{
|
||||
$set = array( $set );
|
||||
}
|
||||
@@ -548,7 +542,7 @@ class Db extends \mysqli
|
||||
$columns = array_map( function( $val ){ return "`{$val}`"; }, array_keys( $row ) );
|
||||
}
|
||||
|
||||
if ( count( $set ) > 1 AND $bulkInsertNoPrep )
|
||||
if ( \count( $set ) > 1 AND $bulkInsertNoPrep )
|
||||
{
|
||||
if ( $tableDefinition === NULL )
|
||||
{
|
||||
@@ -559,7 +553,7 @@ class Db extends \mysqli
|
||||
{
|
||||
if ( isset( $tableDefinition['definition']['columns'][ $k ] ) )
|
||||
{
|
||||
$isInt = in_array( \mb_strtolower( $tableDefinition['definition']['columns'][ $k ]['type'] ), array( 'integer', 'int', 'smallint', 'tinyint', 'mediumint', 'bigint', 'decimal', 'numeric', 'float', 'double' ) );
|
||||
$isInt = \in_array( \mb_strtolower( $tableDefinition['definition']['columns'][ $k ]['type'] ), array( 'integer', 'int', 'smallint', 'tinyint', 'mediumint', 'bigint', 'decimal', 'numeric', 'float', 'double' ) );
|
||||
|
||||
if ( $isInt )
|
||||
{
|
||||
@@ -616,7 +610,7 @@ class Db extends \mysqli
|
||||
else
|
||||
{
|
||||
$binds = array_merge( $binds, array_values( $row ) );
|
||||
$values[] = '( ' . implode( ', ', array_fill( 0, count( $columns ), '?' ) ) . ' )';
|
||||
$values[] = '( ' . implode( ', ', array_fill( 0, \count( $columns ), '?' ) ) . ' )';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -631,7 +625,7 @@ class Db extends \mysqli
|
||||
}
|
||||
|
||||
/* Run */
|
||||
if ( count( $set ) > 1 AND $bulkInsertNoPrep )
|
||||
if ( \count( $set ) > 1 AND $bulkInsertNoPrep )
|
||||
{
|
||||
$stmt = $this->query( $query );
|
||||
return $this->insert_id;
|
||||
@@ -655,7 +649,7 @@ class Db extends \mysqli
|
||||
public function replace( $table, $set )
|
||||
{
|
||||
$columns = implode( ', ', array_map( function( $val ){ return "`{$val}`"; }, array_keys( $set ) ) );
|
||||
$query = "REPLACE INTO `{$this->prefix}{$table}` ( " . $columns . " ) VALUES ( " . implode( ', ', array_fill( 0, count( $set ), '?' ) ) . " )";
|
||||
$query = "REPLACE INTO `{$this->prefix}{$table}` ( " . $columns . " ) VALUES ( " . implode( ', ', array_fill( 0, \count( $set ), '?' ) ) . " )";
|
||||
|
||||
$stmt = $this->preparedQuery( $query, array_values( $set ) );
|
||||
return $stmt->affected_rows;
|
||||
@@ -678,13 +672,13 @@ class Db extends \mysqli
|
||||
$binds = array();
|
||||
|
||||
/* Work out table */
|
||||
$table = is_array( $table ) ? "`{$this->prefix}{$table[0]}` {$this->prefix}{$table[1]}" : "`{$this->prefix}{$table}`";
|
||||
$table = \is_array( $table ) ? "`{$this->prefix}{$table[0]}` {$this->prefix}{$table[1]}" : "`{$this->prefix}{$table}`";
|
||||
|
||||
/* Work out joins */
|
||||
foreach ( $joins as $join )
|
||||
{
|
||||
$type = ( isset( $join['type'] ) and in_array( strtoupper( $join['type'] ), array( 'LEFT', 'INNER', 'RIGHT' ) ) ) ? strtoupper( $join['type'] ) : 'LEFT';
|
||||
$_table = is_array( $join['from'] ) ? "`{$this->prefix}{$join['from'][0]}` {$this->prefix}{$join['from'][1]}" : $join['from'];
|
||||
$type = ( isset( $join['type'] ) and \in_array( strtoupper( $join['type'] ), array( 'LEFT', 'INNER', 'RIGHT' ) ) ) ? strtoupper( $join['type'] ) : 'LEFT';
|
||||
$_table = \is_array( $join['from'] ) ? "`{$this->prefix}{$join['from'][0]}` {$this->prefix}{$join['from'][1]}" : $join['from'];
|
||||
|
||||
$on = $this->compileWhereClause( $join['where'] );
|
||||
$binds = array_merge( $binds, $on['binds'] );
|
||||
@@ -694,7 +688,7 @@ class Db extends \mysqli
|
||||
$joins = empty( $joins ) ? '' : ( ' ' . implode( "\n", $joins ) );
|
||||
|
||||
/* Work out SET clause */
|
||||
if ( is_array( $set ) )
|
||||
if ( \is_array( $set ) )
|
||||
{
|
||||
$_set = array();
|
||||
foreach ( $set as $k => $v )
|
||||
@@ -782,13 +776,13 @@ class Db extends \mysqli
|
||||
{
|
||||
$return = array( 'clause' => '1=1', 'binds' => array() );
|
||||
|
||||
if( is_string( $data ) )
|
||||
if( \is_string( $data ) )
|
||||
{
|
||||
$return['clause'] = $data;
|
||||
}
|
||||
elseif ( is_array( $data ) and ! empty( $data ) )
|
||||
elseif ( \is_array( $data ) and ! empty( $data ) )
|
||||
{
|
||||
if ( is_string( $data[0] ) )
|
||||
if ( \is_string( $data[0] ) )
|
||||
{
|
||||
$data = array( $data );
|
||||
}
|
||||
@@ -796,7 +790,7 @@ class Db extends \mysqli
|
||||
$clauses = array();
|
||||
foreach ( $data as $bit )
|
||||
{
|
||||
if( !is_array( $bit ) )
|
||||
if( !\is_array( $bit ) )
|
||||
{
|
||||
$clauses[] = $bit;
|
||||
}
|
||||
@@ -822,14 +816,14 @@ class Db extends \mysqli
|
||||
protected function compileLimitClause( $data )
|
||||
{
|
||||
$limit = NULL;
|
||||
if( is_array( $data ) )
|
||||
if( \is_array( $data ) )
|
||||
{
|
||||
$offset = intval( $data[0] );
|
||||
$limit = intval( $data[1] );
|
||||
$offset = \intval( $data[0] );
|
||||
$limit = \intval( $data[1] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$offset = intval( $data );
|
||||
$offset = \intval( $data );
|
||||
}
|
||||
|
||||
if( $limit !== NULL )
|
||||
@@ -875,18 +869,18 @@ class Db extends \mysqli
|
||||
|
||||
/* Some types specify length */
|
||||
if(
|
||||
in_array( $data['type'], array( 'VARCHAR', 'VARBINARY' ) )
|
||||
\in_array( $data['type'], array( 'VARCHAR', 'VARBINARY' ) )
|
||||
or
|
||||
(
|
||||
isset( $data['length'] ) and $data['length']
|
||||
and
|
||||
in_array( $data['type'], array( 'BIT', 'TINYINT', 'SMALLINT', 'MEDIUMINT', 'INT', 'INTEGER', 'BIGINT', 'REAL', 'DOUBLE', 'FLOAT', 'DECIMAL', 'NUMERIC', 'CHAR', 'BINARY' ) )
|
||||
\in_array( $data['type'], array( 'BIT', 'TINYINT', 'SMALLINT', 'MEDIUMINT', 'INT', 'INTEGER', 'BIGINT', 'REAL', 'DOUBLE', 'FLOAT', 'DECIMAL', 'NUMERIC', 'CHAR', 'BINARY' ) )
|
||||
)
|
||||
) {
|
||||
$definition .= "({$data['length']}";
|
||||
|
||||
/* And some of those specify decimals (which may or may not be optional) */
|
||||
if( in_array( $data['type'], array( 'REAL', 'DOUBLE', 'FLOAT' ) ) or ( in_array( $data['type'], array( 'DECIMAL', 'NUMERIC' ) ) and isset( $data['decimals'] ) ) )
|
||||
if( \in_array( $data['type'], array( 'REAL', 'DOUBLE', 'FLOAT' ) ) or ( \in_array( $data['type'], array( 'DECIMAL', 'NUMERIC' ) ) and isset( $data['decimals'] ) ) )
|
||||
{
|
||||
$definition .= ',' . $data['decimals'];
|
||||
}
|
||||
@@ -895,7 +889,7 @@ class Db extends \mysqli
|
||||
}
|
||||
|
||||
/* Numeric types can be UNSIGNED and ZEROFILL */
|
||||
if( in_array( $data['type'], array( 'TINYINT', 'SMALLINT', 'MEDIUMINT', 'INT', 'INTEGER', 'BIGINT', 'REAL', 'DOUBLE', 'FLOAT', 'DECIMAL', 'NUMERIC' ) ) )
|
||||
if( \in_array( $data['type'], array( 'TINYINT', 'SMALLINT', 'MEDIUMINT', 'INT', 'INTEGER', 'BIGINT', 'REAL', 'DOUBLE', 'FLOAT', 'DECIMAL', 'NUMERIC' ) ) )
|
||||
{
|
||||
if( isset( $data['unsigned'] ) and $data['unsigned'] === TRUE )
|
||||
{
|
||||
@@ -908,7 +902,7 @@ class Db extends \mysqli
|
||||
}
|
||||
|
||||
/* ENUM and SETs have values */
|
||||
if( in_array( $data['type'], array( 'ENUM', 'SET' ) ) )
|
||||
if( \in_array( $data['type'], array( 'ENUM', 'SET' ) ) )
|
||||
{
|
||||
$values = array();
|
||||
foreach ( $data['values'] as $v )
|
||||
@@ -920,13 +914,13 @@ class Db extends \mysqli
|
||||
}
|
||||
|
||||
/* Some types can be binary or not */
|
||||
if( isset( $data['binary'] ) and $data['binary'] === TRUE and in_array( $data['type'], array( 'CHAR', 'VARCHAR', 'TINYTEXT', 'TEXT', 'MEDIUMTEXT', 'LONGTEXT' ) ) )
|
||||
if( isset( $data['binary'] ) and $data['binary'] === TRUE and \in_array( $data['type'], array( 'CHAR', 'VARCHAR', 'TINYTEXT', 'TEXT', 'MEDIUMTEXT', 'LONGTEXT' ) ) )
|
||||
{
|
||||
$definition .= 'BINARY ';
|
||||
}
|
||||
|
||||
/* Text types specify a character set and collation */
|
||||
if( in_array( $data['type'], array( 'CHAR', 'VARCHAR', 'TINYTEXT', 'TEXT', 'MEDIUMTEXT', 'LONGTEXT', 'ENUM', 'SET' ) ) )
|
||||
if( \in_array( $data['type'], array( 'CHAR', 'VARCHAR', 'TINYTEXT', 'TEXT', 'MEDIUMTEXT', 'LONGTEXT', 'ENUM', 'SET' ) ) )
|
||||
{
|
||||
$definition .= "CHARACTER SET {$this->charset} COLLATE {$this->collation} ";
|
||||
}
|
||||
@@ -942,13 +936,13 @@ class Db extends \mysqli
|
||||
}
|
||||
|
||||
/* Default value */
|
||||
if( isset( $data['default'] ) and !in_array( $data['type'], array( 'TINYTEXT', 'TEXT', 'MEDIUMTEXT', 'LONGTEXT', 'BLOB', 'MEDIUMBLOB', 'BIGBLOB' ) ) )
|
||||
if( isset( $data['default'] ) and !\in_array( $data['type'], array( 'TINYTEXT', 'TEXT', 'MEDIUMTEXT', 'LONGTEXT', 'BLOB', 'MEDIUMBLOB', 'BIGBLOB' ) ) )
|
||||
{
|
||||
$defaultValue = in_array( $data['type'], array( 'TINYINT', 'SMALLINT', 'MEDIUMINT', 'INT', 'INTEGER', 'BIGINT', 'REAL', 'DOUBLE', 'FLOAT', 'DECIMAL', 'NUMERIC', 'BIT' ) ) ? floatval( $data['default'] ) : ( ! in_array( $data['default'], array( 'CURRENT_TIMESTAMP' ) ) ? '\'' . $this->escape_string( $data['default'] ) . '\'' : $data['default'] );
|
||||
$defaultValue = \in_array( $data['type'], array( 'TINYINT', 'SMALLINT', 'MEDIUMINT', 'INT', 'INTEGER', 'BIGINT', 'REAL', 'DOUBLE', 'FLOAT', 'DECIMAL', 'NUMERIC', 'BIT' ) ) ? \floatval( $data['default'] ) : ( ! \in_array( $data['default'], array( 'CURRENT_TIMESTAMP' ) ) ? '\'' . $this->escape_string( $data['default'] ) . '\'' : $data['default'] );
|
||||
|
||||
/* Strict Mode isn't nice */
|
||||
$toTest = trim( $defaultValue, "'" );
|
||||
if ( in_array( $data['type'], array( 'DATETIME' ) ) AND empty( $toTest ) ) # array here in case we need to expand later
|
||||
if ( \in_array( $data['type'], array( 'DATETIME' ) ) AND empty( $toTest ) ) # array here in case we need to expand later
|
||||
{
|
||||
$defaultValue = '\'0000-00-00 00:00:00\'';
|
||||
}
|
||||
@@ -1030,7 +1024,7 @@ class Db extends \mysqli
|
||||
$definition .= '(' . implode( ',', array_map( function ( $val, $len )
|
||||
{
|
||||
return ( ! empty( $len ) ) ? "`{$val}`({$len})" : "`{$val}`";
|
||||
}, $data['columns'], ( ( isset( $data['length'] ) AND is_array( $data['length'] ) ) ? $data['length'] : array_fill( 0, count( $data['columns'] ), null ) ) ) ) . ')';
|
||||
}, $data['columns'], ( ( isset( $data['length'] ) AND \is_array( $data['length'] ) ) ? $data['length'] : array_fill( 0, \count( $data['columns'] ), null ) ) ) ) . ')';
|
||||
|
||||
/* Return */
|
||||
return $definition;
|
||||
@@ -1199,7 +1193,7 @@ class Db extends \mysqli
|
||||
{
|
||||
return '`' . $prefix . $val . '`';
|
||||
},
|
||||
( is_array( $table ) ? $table : array( $table ) )
|
||||
( \is_array( $table ) ? $table : array( $table ) )
|
||||
) )
|
||||
);
|
||||
}
|
||||
@@ -1260,10 +1254,10 @@ class Db extends \mysqli
|
||||
else
|
||||
{
|
||||
$lengthInfo = explode( ',', $matches[2] );
|
||||
$columnDefinition['length'] = intval( $lengthInfo[0] );
|
||||
$columnDefinition['length'] = \intval( $lengthInfo[0] );
|
||||
if( isset( $lengthInfo[1] ) )
|
||||
{
|
||||
$columnDefinition['decimals'] = intval( $lengthInfo[1] );
|
||||
$columnDefinition['decimals'] = \intval( $lengthInfo[1] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1276,10 +1270,10 @@ class Db extends \mysqli
|
||||
}
|
||||
|
||||
/* unsigned? */
|
||||
$columnDefinition['unsigned'] = in_array( 'unsigned', $typeInfo );
|
||||
$columnDefinition['unsigned'] = \in_array( 'unsigned', $typeInfo );
|
||||
|
||||
/* zerofill? */
|
||||
$columnDefinition['zerofill'] = in_array( 'zerofill', $typeInfo );
|
||||
$columnDefinition['zerofill'] = \in_array( 'zerofill', $typeInfo );
|
||||
|
||||
/* binary? */
|
||||
$columnDefinition['binary'] = ( $row['Collation'] === $this->binaryCollation );
|
||||
@@ -1313,7 +1307,7 @@ class Db extends \mysqli
|
||||
$query = $this->query( "SHOW INDEXES FROM `{$this->prefix}{$table}`" );
|
||||
while ( $row = $query->fetch_assoc() )
|
||||
{
|
||||
$length = ( isset( $row['Sub_part'] ) AND ! empty( $row['Sub_part'] ) ) ? intval( $row['Sub_part'] ) : null;
|
||||
$length = ( isset( $row['Sub_part'] ) AND ! empty( $row['Sub_part'] ) ) ? \intval( $row['Sub_part'] ) : null;
|
||||
|
||||
if( isset( $indexes[ $row['Key_name'] ] ) )
|
||||
{
|
||||
@@ -1499,11 +1493,11 @@ class Db extends \mysqli
|
||||
|
||||
foreach( $values as $i )
|
||||
{
|
||||
if ( $i and is_numeric( $i ) )
|
||||
if ( $i and \is_numeric( $i ) )
|
||||
{
|
||||
$where[] = "FIND_IN_SET(" . $i . "," . $column . ")";
|
||||
}
|
||||
else if ( $i and is_string( $i ) )
|
||||
else if ( $i and \is_string( $i ) )
|
||||
{
|
||||
$in[] = "'" . $this->real_escape_string( $i ) . "'";
|
||||
}
|
||||
@@ -1521,7 +1515,7 @@ class Db extends \mysqli
|
||||
$return[] = $column . ' IN(' . implode( ',', $in ) . ')';
|
||||
}
|
||||
|
||||
if ( count( $return ) )
|
||||
if ( \count( $return ) )
|
||||
{
|
||||
return '(' . implode( ' OR ', $return ) . ')';
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class Exception extends \RuntimeException
|
||||
public function shouldSendDiagnosticsReport()
|
||||
{
|
||||
/* Low-end server errors */
|
||||
if ( $this->getCode() < 1046 or in_array( $this->getCode(), array( 1129, 1130, 1194, 1195, 1203 ) ) )
|
||||
if ( $this->getCode() < 1046 or \in_array( $this->getCode(), array( 1129, 1130, 1194, 1195, 1203 ) ) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ class Select implements \Iterator, \Countable
|
||||
break;
|
||||
}
|
||||
|
||||
if ( is_array( $table ) )
|
||||
if ( \is_array( $table ) )
|
||||
{
|
||||
$query .= " `{$this->db->prefix}{$table[0]}` AS `{$table[1]}`";
|
||||
}
|
||||
@@ -147,7 +147,7 @@ class Select implements \Iterator, \Countable
|
||||
$this->rewind();
|
||||
}
|
||||
|
||||
if ( !in_array( $column, $this->columns ) )
|
||||
if ( !\in_array( $column, $this->columns ) )
|
||||
{
|
||||
throw new \InvalidArgumentException;
|
||||
}
|
||||
@@ -170,7 +170,7 @@ class Select implements \Iterator, \Countable
|
||||
$this->rewind();
|
||||
}
|
||||
|
||||
if ( !in_array( $column, $this->columns ) )
|
||||
if ( !\in_array( $column, $this->columns ) )
|
||||
{
|
||||
throw new \InvalidArgumentException;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ class Select implements \Iterator, \Countable
|
||||
$params[] = &$this->row[ $field->name ];
|
||||
}
|
||||
$this->columns = array_keys( $this->row );
|
||||
call_user_func_array( array( $this->stmt, 'bind_result' ), $params );
|
||||
$this->stmt->bind_result( ...$params );
|
||||
|
||||
/* Get the first result */
|
||||
$this->key = -1;
|
||||
@@ -243,7 +243,7 @@ class Select implements \Iterator, \Countable
|
||||
{
|
||||
return $this->row[ $this->valueField ];
|
||||
}
|
||||
elseif ( count( $this->row ) === 1 )
|
||||
elseif ( \count( $this->row ) === 1 )
|
||||
{
|
||||
foreach ( $this->row as $v )
|
||||
{
|
||||
@@ -305,24 +305,15 @@ class Select implements \Iterator, \Countable
|
||||
/**
|
||||
* [Countable] Get number of rows
|
||||
*
|
||||
* @param bool $allRows If TRUE, will get the number of rows ignoring the limit. In order for this to work, the query must have been ran with SQL_CALC_FOUND_ROWS
|
||||
* @return int
|
||||
*/
|
||||
public function count( $allRows = FALSE )
|
||||
public function count()
|
||||
{
|
||||
if ( !$this->stmt )
|
||||
{
|
||||
$this->rewind();
|
||||
}
|
||||
|
||||
if ( $allRows )
|
||||
{
|
||||
$result = $this->db->query( 'SELECT FOUND_ROWS() AS count;' )->fetch_assoc();
|
||||
return $result['count'];
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->stmt->num_rows;
|
||||
}
|
||||
return $this->stmt->num_rows;
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ abstract class Controller
|
||||
|
||||
if ( $method !== NULL AND method_exists( $this, $method ) )
|
||||
{
|
||||
call_user_func( array( $this, $method ) );
|
||||
$this->$method();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ abstract class Dispatcher
|
||||
{
|
||||
if( self::$instance === NULL )
|
||||
{
|
||||
$classname = get_called_class();
|
||||
$classname = \get_called_class();
|
||||
if ( $classname === 'IPSUtf8\Dispatcher' )
|
||||
{
|
||||
self::$instance = new \IPSUtf8\Dispatcher\Browser;
|
||||
|
||||
@@ -18,7 +18,7 @@ class Template
|
||||
public static function wrapper( $title="IPS Converter", $content="", $isError=false )
|
||||
{
|
||||
$iniTime = @ini_get('max_execution_time');
|
||||
$execTime = ( is_numeric( $iniTime ) ) ? $iniTime : 30;
|
||||
$execTime = ( \is_numeric( $iniTime ) ) ? $iniTime : 30;
|
||||
$url = \IPSUtf8\Output\Browser::$url;
|
||||
$title = ( empty( $title ) ) ? 'IPS Converter' : $title;
|
||||
$active = array( 'convert' => '', 'tools' => '', 'archive' => '' );
|
||||
@@ -191,7 +191,7 @@ EOFHTML;
|
||||
<br>To override this and unlock the UTF8 converter, please create a file called "constants.php" and upload it to your /admin/convertutf8/ directory with the following contents:
|
||||
</p>
|
||||
<p><textarea class="form-control" style="height:90px;"><?php
|
||||
define( 'BYPASS_SAFETY_LOCK', true );
|
||||
\\define( 'BYPASS_SAFETY_LOCK', true );
|
||||
|
||||
</textarea>
|
||||
</p>
|
||||
@@ -212,7 +212,7 @@ EOFHTML;
|
||||
$canUseMb4 = ( version_compare( \IPSUtf8\Db::i()->server_info, '5.5.3', '>=' ) AND \IPSUtf8\Db::i('utf8')->set_charset('utf8mb4') !== FALSE );
|
||||
\IPSUtf8\Db::i('utf8')->set_charset( $origUtf8Charset );
|
||||
$badCollations = $convertClass::i()->getNonUtf8CollationTables();
|
||||
$badTablesCnt = count( $convertClass::i()->getNonUtf8Tables() );
|
||||
$badTablesCnt = \count( $convertClass::i()->getNonUtf8Tables() );
|
||||
$path = ROOT_PATH;
|
||||
$dbCharSetIsCorrect = TRUE;
|
||||
$isUtf8mb4 = ( $isUtf8 === TRUE AND \IPSUtf8\Convert::i()->database_charset == 'utf8mb4' );
|
||||
@@ -220,7 +220,7 @@ EOFHTML;
|
||||
if ( file_exists( ROOT_PATH . '/conf_global.php' ) )
|
||||
{
|
||||
require_once( ROOT_PATH . '/conf_global.php' );
|
||||
if ( !isset( $INFO['sql_charset'] ) OR ! in_array( $INFO['sql_charset'], array( 'utf8', 'utf8mb4' ) ) )
|
||||
if ( !isset( $INFO['sql_charset'] ) OR ! \in_array( $INFO['sql_charset'], array( 'utf8', 'utf8mb4' ) ) )
|
||||
{
|
||||
$dbCharSetIsCorrect = FALSE;
|
||||
}
|
||||
@@ -257,9 +257,9 @@ EOFHTML;
|
||||
}
|
||||
else if ( $isUtf8 === true )
|
||||
{
|
||||
if ( count( $badCollations ) )
|
||||
if ( \count( $badCollations ) )
|
||||
{
|
||||
$cnt = count( $badCollations );
|
||||
$cnt = \count( $badCollations );
|
||||
$html .= <<<EOFHTML
|
||||
<p class="text-info">
|
||||
The database is set to UTF-8, however {$cnt} table(s) have incorrect collations and need fixing.
|
||||
@@ -282,33 +282,21 @@ EOFHTML;
|
||||
}
|
||||
|
||||
if ( ! $isUtf8 and $canUseMb4 )
|
||||
{
|
||||
$buttonLabel = ( $isUtf8 ) ? "Convert anyway using 4-Byte UTF-8 (utf8mb4)" : "Start using 4-Byte UTF-8 (utf8mb4)";
|
||||
|
||||
{
|
||||
$text = ( $status === 'processing' ) ? "Continue Conversion" : "Begin Conversion";
|
||||
|
||||
$html .= <<<EOFHTML
|
||||
<p>
|
||||
<a data-status="Start" class="btn btn-lg btn-info" href="{url="?controller={$controller}&do=process&use_utf8mb4=1"}">{$buttonLabel}</a>
|
||||
<br />
|
||||
<div class='small'>
|
||||
<small>
|
||||
Some non-common symbols (such as historical scripts, music symbols and Emoji) require more space in the database to be stored. If you choose to convert using 4-Byte UTF-8, these characters will be able to be used, but the database will use more disk space.
|
||||
</small>
|
||||
</div>
|
||||
<a data-status="{$status}" class="btn btn-lg btn-info" href="{url="?controller={$controller}&do=process&use_utf8mb4=1"}">{$text}</a>
|
||||
</p>
|
||||
EOFHTML;
|
||||
}
|
||||
|
||||
if ( ! $isUtf8 )
|
||||
if ( ! $isUtf8 and !$canUseMb4 )
|
||||
{
|
||||
$label = 'Start using UTF-8 (utf8)';
|
||||
$label = 'Start using UTF-8 (utf8)';
|
||||
$selector = 'btn-success';
|
||||
$more = <<<EOFHTML
|
||||
<br />
|
||||
<div class='small'>
|
||||
<small>
|
||||
Choose this if you don't wish to store non-common symbols (such as historical scripts, music symbols and Emoji) and wish to use less disk space.
|
||||
</small>
|
||||
</div>
|
||||
<br>
|
||||
<div class='small'>
|
||||
<small>
|
||||
@@ -336,11 +324,11 @@ if ( $status === 'processing' )
|
||||
}
|
||||
else if ( ! $isUtf8 )
|
||||
{
|
||||
$label = "Convert as UTF-8 (utf8)";
|
||||
$label = "Begin Conversion";
|
||||
$selector = 'btn-info';
|
||||
}
|
||||
|
||||
if ( $label and $selector )
|
||||
if ( $label and $selector AND ! $isUtf8 and ! $canUseMb4 )
|
||||
{
|
||||
$html .= <<<EOFHTML
|
||||
<p>
|
||||
|
||||
@@ -35,7 +35,7 @@ abstract class Output
|
||||
{
|
||||
if( static::$instance === NULL )
|
||||
{
|
||||
$classname = get_called_class();
|
||||
$classname = \get_called_class();
|
||||
static::$instance = new $classname;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class Singleton implements \Iterator
|
||||
{
|
||||
if( static::$instance === NULL )
|
||||
{
|
||||
$classname = get_called_class();
|
||||
$classname = \get_called_class();
|
||||
static::$instance = new $classname;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ class Request extends \IPSUtf8\Patterns\Singleton
|
||||
{
|
||||
foreach( $data as $k => $v )
|
||||
{
|
||||
if ( is_array( $v ) )
|
||||
if ( \is_array( $v ) )
|
||||
{
|
||||
array_walk_recursive( $v, array( $this, 'clean' ) );
|
||||
}
|
||||
@@ -127,12 +127,6 @@ class Request extends \IPSUtf8\Patterns\Singleton
|
||||
{
|
||||
/* Remove NULL bytes and the RTL control byte */
|
||||
$v = str_replace( array( "\0", "\u202E" ), '', $v );
|
||||
|
||||
/* Undo magic quote madness */
|
||||
if ( get_magic_quotes_gpc() === 1 )
|
||||
{
|
||||
$v = stripslashes( $v );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -361,7 +361,7 @@ class Session
|
||||
$allTables = array();
|
||||
$data = array( 'version' => \IPSUtf8\Convert::VERSION_ID, 'tableCount' => 0, 'totalCount' => 0, 'convertedCount' => 0, 'charSets' => array() );
|
||||
|
||||
if ( defined( 'FORCE_CONVERT' ) AND FORCE_CONVERT === TRUE )
|
||||
if ( \defined( 'FORCE_CONVERT' ) AND FORCE_CONVERT === TRUE )
|
||||
{
|
||||
$data['force_conversion'] = 1;
|
||||
}
|
||||
@@ -406,7 +406,7 @@ class Session
|
||||
foreach( $tables as $table )
|
||||
{
|
||||
/* Get count */
|
||||
$row = \IPSUtf8\Db::i()->query( "SELECT COUNT(*) as count FROM `" . \IPSUtf8\Db::i()->prefix . "{$table}`" )->fetch_assoc();
|
||||
$row = \IPSUtf8\Db::i()->query( "SELECT count(*) as count FROM `" . \IPSUtf8\Db::i()->prefix . "{$table}`" )->fetch_assoc();
|
||||
$count = $row['count'];
|
||||
|
||||
$data['totalCount'] += $count;
|
||||
@@ -485,6 +485,9 @@ class Session
|
||||
'count' => $count,
|
||||
'charset' => $tblCharset
|
||||
);
|
||||
|
||||
/* Ping the UTF8 connection just in case this process takes a while, so that connection doesn't die on us */
|
||||
\IPSUtf8\Db::i('utf8')->ping();
|
||||
}
|
||||
|
||||
return array( 'tables' => $allTables, 'data' => $data );
|
||||
@@ -513,7 +516,7 @@ class Session
|
||||
|
||||
if( isset( $this->_data[ $key ] ) )
|
||||
{
|
||||
if ( mb_substr( $key, -5 ) == '_json' AND ! is_array( $this->_data[ $key ] ) )
|
||||
if ( mb_substr( $key, -5 ) == '_json' AND ! \is_array( $this->_data[ $key ] ) )
|
||||
{
|
||||
$this->_data[ $key ] = json_decode( $this->_data[ $key ], true );
|
||||
}
|
||||
@@ -606,19 +609,19 @@ class Session
|
||||
/* JSON encode if required */
|
||||
foreach ( array_merge( $this->_data, $this->changed ) as $k => $v )
|
||||
{
|
||||
$insert[ $k ] = ( mb_substr( $k, -5 ) == '_json' AND is_array( $v ) ) ? json_encode( $v, true ) : $v;
|
||||
$insert[ $k ] = ( mb_substr( $k, -5 ) == '_json' AND \is_array( $v ) ) ? json_encode( $v, true ) : $v;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ( $this->_data as $k => $v )
|
||||
{
|
||||
$insert[ $k ] = ( mb_substr( $k, -5 ) == '_json' AND is_array( $v ) ) ? json_encode( $v, true ) : $v;
|
||||
$insert[ $k ] = ( mb_substr( $k, -5 ) == '_json' AND \is_array( $v ) ) ? json_encode( $v, true ) : $v;
|
||||
}
|
||||
}
|
||||
|
||||
/* Save */
|
||||
if ( count( $insert ) == count( static::$sessionTableColumns ) )
|
||||
if ( \count( $insert ) == \count( static::$sessionTableColumns ) )
|
||||
{
|
||||
\IPSUtf8\Db::i('utf8')->update( 'convert_session', $insert );
|
||||
}
|
||||
@@ -637,14 +640,14 @@ class Session
|
||||
*/
|
||||
public function arrayWalkRecursive( $array, $callback )
|
||||
{
|
||||
if ( ! is_array( $array ) )
|
||||
if ( ! \is_array( $array ) )
|
||||
{
|
||||
trigger_error( "\$array is not an array in \IPSUtf8\Session::arrayWalkRecursive()", E_USER_ERROR );
|
||||
}
|
||||
|
||||
foreach( $array AS $key => $value )
|
||||
{
|
||||
if ( is_array( $array[$key] ) )
|
||||
if ( \is_array( $array[$key] ) )
|
||||
{
|
||||
$array[$key] = static::arrayWalkRecursive( $array[$key], $callback );
|
||||
}
|
||||
|
||||
@@ -51,15 +51,15 @@ abstract class Charset
|
||||
/* Try and pick best available */
|
||||
if ( FORCE_CONVERT_METHOD === NULL )
|
||||
{
|
||||
if ( function_exists( 'mb_convert_encoding' ) )
|
||||
if ( \function_exists( 'mb_convert_encoding' ) )
|
||||
{
|
||||
self::$method = 'mb';
|
||||
}
|
||||
else if ( function_exists( 'iconv' ) )
|
||||
else if ( \function_exists( 'iconv' ) )
|
||||
{
|
||||
self::$method = 'iconv';
|
||||
}
|
||||
else if ( function_exists( 'recode_string' ) )
|
||||
else if ( \function_exists( 'recode_string' ) )
|
||||
{
|
||||
self::$method = 'recode';
|
||||
}
|
||||
@@ -103,7 +103,7 @@ abstract class Charset
|
||||
$to = strtolower($to);
|
||||
|
||||
/* Return bools, null, ints, etc. */
|
||||
if ( ! is_string( $string ) )
|
||||
if ( ! \is_string( $string ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class Iconv extends \IPSUtf8\Text\Charset
|
||||
return $string;
|
||||
}
|
||||
|
||||
if ( function_exists( 'iconv' ) )
|
||||
if ( \function_exists( 'iconv' ) )
|
||||
{
|
||||
$text = iconv( $from, $to.'//TRANSLIT', $string );
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
|
||||
$charsetTable = $charsetTables[ $from ];
|
||||
|
||||
if( !count($charsetTable) )
|
||||
if( !\count($charsetTable) )
|
||||
{
|
||||
static::$errors[] = "Character set table not found";
|
||||
return $original;
|
||||
@@ -92,7 +92,7 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
{
|
||||
$hexChar = "";
|
||||
$unicodeHexChar = "";
|
||||
$hexChar = strtoupper(dechex(ord($string[$i])));
|
||||
$hexChar = strtoupper(dechex(\ord($string[$i])));
|
||||
|
||||
// This is fix from Mario Klingemann, it prevents
|
||||
// droping chars below 16 because of missing leading 0 [zeros]
|
||||
@@ -106,17 +106,17 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
if ( ( $from == "gsm0338" ) && ( $hexChar == '1B' ) )
|
||||
{
|
||||
$i++;
|
||||
$hexChar .= strtoupper(dechex(ord($string[$i])));
|
||||
$hexChar .= strtoupper(dechex(\ord($string[$i])));
|
||||
}
|
||||
|
||||
if ( $to != "utf-8" )
|
||||
{
|
||||
if ( in_array( $hexChar, $charsetTable[$from] ) )
|
||||
if ( \in_array( $hexChar, $charsetTable[$from] ) )
|
||||
{
|
||||
$unicodeHexChar = array_search( $hexChar, $charsetTable[$from] );
|
||||
$unicodeHexChars = explode( "+",$unicodeHexChar );
|
||||
|
||||
for( $unicodeHexCharElement = 0; $unicodeHexCharElement < count($unicodeHexChars); $unicodeHexCharElement++ )
|
||||
for( $unicodeHexCharElement = 0; $unicodeHexCharElement < \count($unicodeHexChars); $unicodeHexCharElement++ )
|
||||
{
|
||||
if ( array_key_exists( $unicodeHexChars[$unicodeHexCharElement], $charsetTable[$to] ) )
|
||||
{
|
||||
@@ -126,7 +126,7 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
}
|
||||
else
|
||||
{
|
||||
$text .= chr(hexdec($charsetTable[$to][$unicodeHexChars[$unicodeHexCharElement]]));
|
||||
$text .= \chr(hexdec($charsetTable[$to][$unicodeHexChars[$unicodeHexCharElement]]));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -144,7 +144,7 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( in_array( $hexChar, $charsetTable[$from] ) )
|
||||
if ( \in_array( $hexChar, $charsetTable[$from] ) )
|
||||
{
|
||||
$unicodeHexChar = array_search( $hexChar, $charsetTable[$from] );
|
||||
$unicodeHexChars = explode( "+", $unicodeHexChar );
|
||||
@@ -158,7 +158,7 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
* In Mazowia we have 007A+0142, but sometimes it can look like this
|
||||
* 0x007A+0x0142+0x2034 (that string means nothing, it just shows the possibility...)
|
||||
*/
|
||||
for( $unicodeHexCharElement = 0; $unicodeHexCharElement < count($unicodeHexChars); $unicodeHexCharElement++)
|
||||
for( $unicodeHexCharElement = 0; $unicodeHexCharElement < \count($unicodeHexChars); $unicodeHexCharElement++)
|
||||
{
|
||||
if ( self::$entities == true )
|
||||
{
|
||||
@@ -189,7 +189,7 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
$unicodeHexChar = "";
|
||||
$charsetTable = self::_makeConversionTable( $to );
|
||||
|
||||
if( is_array($charsetTable[$to]) AND count($charsetTable[$to]) )
|
||||
if( \is_array($charsetTable[$to]) AND \count($charsetTable[$to]) )
|
||||
{
|
||||
foreach ( $charsetTable[$to] as $unicodeHexChar => $hexChar )
|
||||
{
|
||||
@@ -199,7 +199,7 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
}
|
||||
else
|
||||
{
|
||||
$entityOrChar = chr(hexdec($hexChar));
|
||||
$entityOrChar = \chr(hexdec($hexChar));
|
||||
}
|
||||
|
||||
$string = str_replace( self::_hexToUtf( $unicodeHexChar), $entityOrChar, $string );
|
||||
@@ -227,7 +227,7 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
for( $charPosition = 0; $charPosition < $stringLength; $charPosition++ )
|
||||
{
|
||||
$char = $unicodeString [$charPosition];
|
||||
$asciiChar = ord ($char);
|
||||
$asciiChar = \ord ($char);
|
||||
|
||||
if ($asciiChar < 128) //1 7 0bbbbbbb (127)
|
||||
{
|
||||
@@ -238,7 +238,7 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
$firstByte = ($asciiChar & 31);
|
||||
$charPosition++;
|
||||
$char = $unicodeString [$charPosition];
|
||||
$asciiChar = ord ($char);
|
||||
$asciiChar = \ord ($char);
|
||||
$secondByte = ($asciiChar & 63);
|
||||
$asciiChar = ($firstByte * 64) + $secondByte;
|
||||
|
||||
@@ -250,11 +250,11 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
$firstByte = ($asciiChar & 31);
|
||||
$charPosition++;
|
||||
$char = $unicodeString [$charPosition];
|
||||
$asciiChar = ord ($char);
|
||||
$asciiChar = \ord ($char);
|
||||
$secondByte = ($asciiChar & 63);
|
||||
$charPosition++;
|
||||
$char = $unicodeString [$charPosition];
|
||||
$asciiChar = ord ($char);
|
||||
$asciiChar = \ord ($char);
|
||||
$thirdByte = ($asciiChar & 63);
|
||||
$asciiChar = ((($firstByte * 64) + $secondByte) * 64) + $thirdByte;
|
||||
|
||||
@@ -266,15 +266,15 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
$firstByte = ($asciiChar & 31);
|
||||
$charPosition++;
|
||||
$char = $unicodeString [$charPosition];
|
||||
$asciiChar = ord ($char);
|
||||
$asciiChar = \ord ($char);
|
||||
$secondByte = ($asciiChar & 63);
|
||||
$charPosition++;
|
||||
$char = $unicodeString [$charPosition];
|
||||
$asciiChar = ord ($char);
|
||||
$asciiChar = \ord ($char);
|
||||
$thirdByte = ($asciiChar & 63);
|
||||
$charPosition++;
|
||||
$char = $unicodeString [$charPosition];
|
||||
$asciiChar = ord ($char);
|
||||
$asciiChar = \ord ($char);
|
||||
$fourthByte = ($asciiChar & 63);
|
||||
$asciiChar = ((((($firstByte * 64) + $secondByte) * 64) + $thirdByte) * 64) + $fourthByte;
|
||||
|
||||
@@ -302,19 +302,19 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
|
||||
if( $utfCharInDec < 128 )
|
||||
{
|
||||
$outputChar .= chr($utfCharInDec);
|
||||
$outputChar .= \chr($utfCharInDec);
|
||||
}
|
||||
else if( $utfCharInDec < 2048 )
|
||||
{
|
||||
$outputChar .= chr( ( $utfCharInDec>>6 ) + 192 ) . chr( ( $utfCharInDec&63 ) + 128 );
|
||||
$outputChar .= \chr( ( $utfCharInDec>>6 ) + 192 ) . \chr( ( $utfCharInDec&63 ) + 128 );
|
||||
}
|
||||
else if( $utfCharInDec < 65536 )
|
||||
{
|
||||
$outputChar .= chr( ( $utfCharInDec>>12 ) + 224 ) . chr( ( ( $utfCharInDec>>6 ) &63 ) + 128 ) . chr( ( $utfCharInDec&63 ) + 128 );
|
||||
$outputChar .= \chr( ( $utfCharInDec>>12 ) + 224 ) . \chr( ( ( $utfCharInDec>>6 ) &63 ) + 128 ) . \chr( ( $utfCharInDec&63 ) + 128 );
|
||||
}
|
||||
else if( $utfCharInDec < 2097152 )
|
||||
{
|
||||
$outputChar .= chr( $utfCharInDec>>18+240 ) . chr( ( ( $utfCharInDec>>12 ) &63 ) + 128 ) . chr( ( $utfCharInDec>>6 ) &63 + 128 ) . chr( $utfCharInDec&63 + 128 );
|
||||
$outputChar .= \chr( $utfCharInDec>>18+240 ) . \chr( ( ( $utfCharInDec>>12 ) &63 ) + 128 ) . \chr( ( $utfCharInDec>>6 ) &63 + 128 ) . \chr( $utfCharInDec&63 + 128 );
|
||||
}
|
||||
|
||||
return $outputChar;
|
||||
@@ -360,13 +360,13 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
{
|
||||
$convertTable = array();
|
||||
|
||||
for( $i = 0; $i < func_num_args(); $i++ )
|
||||
for( $i = 0, $j = \func_num_args(); $i < $j; $i++ )
|
||||
{
|
||||
/**
|
||||
* Because func_*** can't be used inside of another function call
|
||||
* we have to save it as a separate value.
|
||||
*/
|
||||
$fileName = func_get_arg($i);
|
||||
$fileName = \func_get_arg($i);
|
||||
|
||||
if ( !is_file( static::$charsetPath . $fileName ) )
|
||||
{
|
||||
@@ -406,7 +406,7 @@ class Internal extends \IPSUtf8\Text\Charset
|
||||
$arrayKey = strtoupper(str_replace(strtolower("0x"), "", $hexValue[1]));
|
||||
$arrayValue = strtoupper(str_replace(strtolower("0x"), "", $hexValue[0]));
|
||||
|
||||
$convertTable[ func_get_arg($i) ][ $arrayKey ] = $arrayValue;
|
||||
$convertTable[ \func_get_arg($i) ][ $arrayKey ] = $arrayValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@ class Mb extends \IPSUtf8\Text\Charset
|
||||
return $string;
|
||||
}
|
||||
|
||||
if ( function_exists( 'mb_convert_encoding' ) )
|
||||
if ( \function_exists( 'mb_convert_encoding' ) )
|
||||
{
|
||||
$encodings = array_map( 'strtolower', mb_list_encodings() );
|
||||
|
||||
if( in_array( strtolower( $to ), $encodings ) AND in_array( strtolower( $from ), $encodings ) )
|
||||
if( \in_array( strtolower( $to ), $encodings ) AND \in_array( strtolower( $from ), $encodings ) )
|
||||
{
|
||||
$text = mb_convert_encoding( $string, $to, $from );
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class Recode extends \IPSUtf8\Text\Charset
|
||||
return $string;
|
||||
}
|
||||
|
||||
if ( function_exists( 'recode_string' ) )
|
||||
if ( \function_exists( 'recode_string' ) )
|
||||
{
|
||||
$text = recode_string( $from . '..' . $to, $string );
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* @since 18 Feb 2013
|
||||
*/
|
||||
|
||||
define('READ_WRITE_SEPARATION', FALSE);
|
||||
define('REPORT_EXCEPTIONS', TRUE);
|
||||
\define('READ_WRITE_SEPARATION', FALSE);
|
||||
\define('REPORT_EXCEPTIONS', TRUE);
|
||||
require_once '../init.php';
|
||||
\IPS\Dispatcher\Admin::i()->run();
|
||||
@@ -8,7 +8,7 @@
|
||||
padding: 0 15px;
|
||||
font-weight: 500;
|
||||
border-radius: 3px;
|
||||
-webkit-transition: 0.1s all linear !important;
|
||||
transition: 0.1s all linear !important;
|
||||
border: 1px solid rgba(0,0,0,0.1);
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
@@ -125,43 +125,8 @@
|
||||
margin-left: .3em;
|
||||
}
|
||||
.fa-spin {
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
-moz-animation: spin 2s infinite linear;
|
||||
-o-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
@-moz-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-o-keyframes spin {
|
||||
0% {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-ms-keyframes spin {
|
||||
0% {
|
||||
-ms-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-ms-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
@@ -172,42 +137,22 @@
|
||||
}
|
||||
.fa-rotate-90 {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
|
||||
-webkit-transform: rotate(90deg);
|
||||
-moz-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
-o-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.fa-rotate-180 {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
|
||||
-webkit-transform: rotate(180deg);
|
||||
-moz-transform: rotate(180deg);
|
||||
-ms-transform: rotate(180deg);
|
||||
-o-transform: rotate(180deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.fa-rotate-270 {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
|
||||
-webkit-transform: rotate(270deg);
|
||||
-moz-transform: rotate(270deg);
|
||||
-ms-transform: rotate(270deg);
|
||||
-o-transform: rotate(270deg);
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
.fa-flip-horizontal {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
|
||||
-webkit-transform: scale(-1, 1);
|
||||
-moz-transform: scale(-1, 1);
|
||||
-ms-transform: scale(-1, 1);
|
||||
-o-transform: scale(-1, 1);
|
||||
transform: scale(-1, 1);
|
||||
}
|
||||
.fa-flip-vertical {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
|
||||
-webkit-transform: scale(1, -1);
|
||||
-moz-transform: scale(1, -1);
|
||||
-ms-transform: scale(1, -1);
|
||||
-o-transform: scale(1, -1);
|
||||
transform: scale(1, -1);
|
||||
}
|
||||
.fa-stack {
|
||||
|
||||
@@ -322,12 +322,11 @@ input[type="checkbox"]:disabled + .ipsToggle {
|
||||
line-height: 22px;
|
||||
border-radius: 2px;
|
||||
position: relative;
|
||||
box-shadow: 0px 0px 1px rgba(0,0,0,0.2) inset;
|
||||
border: 1px solid rgba(0,0,0,0.3);
|
||||
border: 1px solid rgba(0,0,0,0.1);
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
-webkit-transition: all 0.3s linear;
|
||||
transition: all 0.3s linear;
|
||||
}
|
||||
|
||||
.ipsToggle.ipsToggle_off {
|
||||
@@ -353,7 +352,7 @@ input[type="checkbox"]:disabled + .ipsToggle {
|
||||
box-shadow: 0px 0px 1px rgba(0,0,0,0.5);
|
||||
display: block;
|
||||
position: absolute;
|
||||
-webkit-transition: all 0.2s linear;
|
||||
transition: all 0.2s linear;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@@ -367,20 +366,6 @@ input[type="checkbox"]:disabled + .ipsToggle {
|
||||
right: 29px;
|
||||
}
|
||||
|
||||
.ipsToggle span:before {
|
||||
content: '\\f0c9';
|
||||
font-family: 'FontAwesome';
|
||||
font-size: 10px;
|
||||
line-height: 20px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
top: 0;
|
||||
left: -14px;
|
||||
color: rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.ipsToggle span:after {
|
||||
content: '\\f00c';
|
||||
font-family: 'FontAwesome';
|
||||
@@ -392,7 +377,6 @@ input[type="checkbox"]:disabled + .ipsToggle {
|
||||
right: 27px;
|
||||
top: 0px;
|
||||
line-height: 18px;
|
||||
text-shadow: 0px 0px 1px rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.ipsToggle.ipsToggle_off span:after {
|
||||
@@ -423,9 +407,9 @@ input[type="checkbox"]:disabled + .ipsToggle {
|
||||
background: #f2f2f2;
|
||||
overflow: hidden;
|
||||
text-indent: 100%;
|
||||
whitespace: no-wrap;
|
||||
whitespace: nowrap;
|
||||
cursor: pointer;
|
||||
-webkit-transition: 0.2s all linear;
|
||||
transition: 0.2s all linear;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,46 +95,14 @@ a {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@-webkit-keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
@-moz-keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
@-ms-keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
@-o-keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 0 0;
|
||||
}
|
||||
to {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
}
|
||||
@keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
@keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.ipsProgressBar {
|
||||
@@ -143,30 +111,17 @@ a {
|
||||
height: 20px;
|
||||
overflow: hidden;
|
||||
background: rgb(156,156,156);
|
||||
background: -moz-linear-gradient(top, rgba(156,156,156,1) 0%, rgba(180,180,180,1) 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(156,156,156,1)), color-stop(100%,rgba(180,180,180,1)));
|
||||
background: -webkit-linear-gradient(top, rgba(156,156,156,1) 0%,rgba(180,180,180,1) 100%);
|
||||
background: -o-linear-gradient(top, rgba(156,156,156,1) 0%,rgba(180,180,180,1) 100%);
|
||||
background: -ms-linear-gradient(top, rgba(156,156,156,1) 0%,rgba(180,180,180,1) 100%);
|
||||
background: linear-gradient(to bottom, rgba(156,156,156,1) 0%,rgba(180,180,180,1) 100%);
|
||||
border-radius: 4px;
|
||||
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.ipsProgressBar_animated .ipsProgressBar_progress {
|
||||
background-color: #5490c0;
|
||||
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
|
||||
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-size: 40px 40px;
|
||||
-webkit-animation: progress-bar-stripes 2s linear infinite;
|
||||
-moz-animation: progress-bar-stripes 2s linear infinite;
|
||||
-ms-animation: progress-bar-stripes 2s linear infinite;
|
||||
-o-animation: progress-bar-stripes 2s linear infinite;
|
||||
animation: progress-bar-stripes 2s linear infinite;
|
||||
}
|
||||
.ipsProgressBar_animated .ipsProgressBar_progress {
|
||||
background-color: #5490c0;
|
||||
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-size: 40px 40px;
|
||||
animation: progress-bar-stripes 2s linear infinite;
|
||||
}
|
||||
|
||||
.ipsProgressBar_progress {
|
||||
float: left;
|
||||
@@ -178,7 +133,7 @@ a {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background: #5490c0;
|
||||
position: relative;
|
||||
padding-left: 6px;
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
.ipsProgressBar_progress[data-progress]:after {
|
||||
|
||||
@@ -64,12 +64,12 @@ hr.ipsHr {
|
||||
}
|
||||
|
||||
@-webkit-keyframes spinner {
|
||||
0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
|
||||
100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); }
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(359deg); }
|
||||
}
|
||||
@keyframes spinner {
|
||||
0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
|
||||
100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); }
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(359deg); }
|
||||
}
|
||||
|
||||
.ipsLoading {
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 784 B |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 973 B After Width: | Height: | Size: 695 B |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 765 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 834 B |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 759 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 780 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 794 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 814 B |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 989 B After Width: | Height: | Size: 717 B |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 775 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 784 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 878 B After Width: | Height: | Size: 586 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 791 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 530 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 781 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 773 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1012 B After Width: | Height: | Size: 767 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 782 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 794 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 827 B |
@@ -1 +1,81 @@
|
||||
=============================[NOTE]=============================
This software is Nulled!
Nulled by IPBMafia.ru
Buy license at https://www.invisionpower.com/buy/self-hosted
================================================================
IPS 4.3.6 Release (103038)
=============================[NOTE]=============================
Invision Community End User License Agreement
1. Acceptance
This software license agreement (the “Agreement”) is between you (either an individual or entity, hereinafter referred to as “You” or “Your”) and Invision Power Services, Inc. (“IPS”, “We”, “Our” or “Us”) and pertains to the Invision Community software, its components, features, enhancements, updates and modifications (collectively the “Software” or “Suite”) and any related services (“Services”) provided by IPS under this Agreement.
By purchasing, downloading, accessing, installing, facilitating the installation or using the Software or Services (or allowing or authorizing any other person to do so) you are warranting that you have the authority provided by your state, country or jurisdiction to enter into a legally binding contract and that you have read and agree to be bound by the terms of this Agreement. You understand and acknowledge that this Agreement comprises the entire agreement between You and IPS. This Agreement supersedes any prior agreements, promises, representations or descriptions. If you do not agree with the terms and conditions set forth hereinafter, you may not purchase, download, access, install or use the Software or Services. This Agreement may only be modified in writing, signed by an officer of IPS and You.
2. License Scope and Grant
In consideration for payment of all applicable license fees and subject to the terms and conditions of this Agreement, IPS grants you a revocable, limited and non-exclusive license to install and use the Software and Services on a single installation, accessible via one URL. Access to services, components, software updates and technical support require an active license. All rights in and to the Software and Services are reserved to the use and benefit of IPS and/or its licensors, successors and assigners.
(a) Test Installation. You may install and test one additional instance of the Software for the purpose of development and testing. This installation must be and remain isolated and inaccessible to the general public at all times.
3. Restrictions
Your license to use the Software and Services is subject to the following terms, conditions and restrictions on use:
(a) You may alter and modify the Software’s source code for Your use, subject to this Agreement, however, you may not distribute, publish, resell, or otherwise share the Software or derivative works based on the Software without prior express written consent from IPS.
(b) You may not utilize the Software or Services to engage in, facilitate, or otherwise allow others to engage in any activity that violates any law or regulation or the terms and conditions within this Agreement.
(c) You are solely responsible for complying with all governmental regulations and policies. You agree to indemnify Us from any loss, action or damage arising from Your failure to use the Software in a manner inconsistent with applicable legislation.
(d) You may not remove any copyright or proprietary notices on or within the software’s source code at any time. A copyright removal license may be purchased to remove the public display of the Software’s publicly displayed copyright notice.
4. Intellectual Property
We have the sole and exclusive right to the Software which is being licensed, not sold, to you by IPS under the terms and conditions of this agreement. The Software is protected by copyright, trademark and other intellectual property laws. IPS reserves any rights not expressly granted herein.
5. Assignment
You may not rent, lease, sell, share or authorize or temporarily assign your rights to the license or this Agreement to another individual or entity except as expressly permitted herein.
(a) You may, after six months from the original purchase date, permanently transfer your licensing rights and interest in this Agreement to a third party, provided the license is active and in good standing. Any transfer and reassignment must occur via the mechanisms provided within the invisioncommunity.com client area and all applicable fees must be paid for the reassignment to be considered valid.
(b) You agree to provide this Agreement in its entirety to the assignee prior to reassignment and the assignee must agree to be bound to the terms of this Agreement.
(c) You acknowledge that account and non license specific materials and purchases, including, but not limited to: account credits and third party (“marketplace”) add-ons and purchases are non-transferrable under any circumstances.
(d) We reserve the right to refuse or reject reassignment at our soleLine truncated
|
||||
=============================[NOTE]=============================
|
||||
This software is Nulled!
|
||||
Nulled by IPBMafia.ru
|
||||
Buy license at https://www.invisionpower.com/buy/self-hosted
|
||||
================================================================
|
||||
IPS 4.5.0 (105100)
|
||||
=============================[NOTE]=============================
|
||||
|
||||
Invision Community End User License Agreement
|
||||
|
||||
|
||||
1. Acceptance
|
||||
|
||||
This software license agreement (the “Agreement”) is between you (either an individual or entity, hereinafter referred to as “You” or “Your”) and Invision Power Services, Inc. (“IPS”, “We”, “Our” or “Us”) and pertains to the Invision Community software, its components, features, enhancements, updates and modifications (collectively the “Software” or “Suite”) and any related services (“Services”) provided by IPS under this Agreement.
|
||||
|
||||
By purchasing, downloading, accessing, installing, facilitating the installation or using the Software or Services (or allowing or authorizing any other person to do so) you are warranting that you have the authority provided by your state, country or jurisdiction to enter into a legally binding contract and that you have read and agree to be bound by the terms of this Agreement. You understand and acknowledge that this Agreement comprises the entire agreement between You and IPS. This Agreement supersedes any prior agreements, promises, representations or descriptions. If you do not agree with the terms and conditions set forth hereinafter, you may not purchase, download, access, install or use the Software or Services. This Agreement may only be modified in writing, signed by an officer of IPS and You.
|
||||
|
||||
|
||||
2. License Scope and Grant
|
||||
|
||||
In consideration for payment of all applicable license fees and subject to the terms and conditions of this Agreement, IPS grants you a revocable, limited and non-exclusive license to install and use the Software and Services on a single installation, accessible via one URL. Access to services, components, software updates and technical support require an active license. All rights in and to the Software and Services are reserved to the use and benefit of IPS and/or its licensors, successors and assigners.
|
||||
|
||||
(a) Test Installation. You may install and test one additional instance of the Software for the purpose of development and testing. This installation must be and remain isolated and inaccessible to the general public at all times.
|
||||
|
||||
|
||||
3. Restrictions
|
||||
|
||||
Your license to use the Software and Services is subject to the following terms, conditions and restrictions on use:
|
||||
|
||||
(a) You may alter and modify the Software’s source code for Your use, subject to this Agreement, however, you may not distribute, publish, resell, or otherwise share the Software or derivative works based on the Software without prior express written consent from IPS.
|
||||
|
||||
(b) You may not utilize the Software or Services to engage in, facilitate, or otherwise allow others to engage in any activity that violates any law or regulation or the terms and conditions within this Agreement.
|
||||
|
||||
(c) You are solely responsible for complying with all governmental regulations and policies. You agree to indemnify Us from any loss, action or damage arising from Your failure to use the Software in a manner inconsistent with applicable legislation.
|
||||
|
||||
(d) You may not remove any copyright or proprietary notices on or within the software’s source code at any time. A branding removal license may be purchased to remove the public display of the Software’s publicly displayed copyright notice.
|
||||
|
||||
|
||||
4. Intellectual Property
|
||||
|
||||
We have the sole and exclusive right to the Software which is being licensed, not sold, to you by IPS under the terms and conditions of this agreement. The Software is protected by copyright, trademark and other intellectual property laws. IPS reserves any rights not expressly granted herein.
|
||||
|
||||
|
||||
5. Assignment
|
||||
|
||||
You may not rent, lease, sell, share, authorize or otherwise assign your rights to the license or this Agreement to another individual or entity. You may not provide access to your account, the Software or license keys to any party without express written authorization from IPS.
|
||||
|
||||
|
||||
6. Termination
|
||||
|
||||
This Agreement shall remain in effect until terminated. Your rights under this Agreement will automatically terminate without notice from Us in the event you fail to comply with any term or condition within this Agreement. Upon termination of this Agreement, you shall immediately cease all use of the Software and destroy all copies, full or partial, of the Software that may be in your possession or otherwise under your control.
|
||||
|
||||
|
||||
7. Modification
|
||||
|
||||
We reserve the right to amend or modify the terms of this Agreement at any time, and to change, discontinue or impose conditions on any aspect of the Software or related Service and to provide notification solely by posting an updated version of the Agreement on the invisioncommunity.com website. You acknowledge that you are solely responsible for regularly reviewing this Agreement and our policies. Continued use of the Software after modification to the Agreement constitutes your binding consent to such changes.
|
||||
|
||||
|
||||
8. Disclaimer of Warranty
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS-IS” AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, WE DISCLAIM ALL OTHER WARRANTIES, CONDITIONS, REPRESENTATIONS OR TERMS, EXPRESS OR IMPLIED, BY STATUTE, COMMON LAW, USAGE OR OTHERWISE, REGARDING THE SOFTWARE AND ANY RELATED SERVICES, INCLUDING THEIR FITNESS FOR A PARTICULAR PURPOSE, THEIR QUALITY, THEIR MERCHANTABILITY, OR THEIR NON-INFRINGEMENT. WE DO NOT WARRANT THAT THE SOFTWARE OR ANY RELATED SERVICES IS SECURE, OR IS FREE FROM BUGS, VIRUSES, ERRORS, OR OTHER PROGRAM LIMITATIONS, OR THAT DEFECTS WILL BE CORRECTED. SOME JURISDICTIONS DO NOT ALLOW EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSIONS MAY NOT APPLY TO YOU. THE ENTIRE RISK AS TO THE RESULTS, QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. NO ADVICE OR INFORMATION, WHETHER ORAL OR WRITTEN, OBTAINED BY YOU FROM US OR OUR EMPLOYEES, REPRESENTATIVE OR AGENTS OR THROUGH OR FROM THE SOFTWARE OR OUR WEBSITE SHALL CREATE ANY WARRANTY NOT EXPRESSLY STATED WITHIN. THIS SECTION WILL SURVIVE THE TERMINATION OF THIS AGREEMENT.
|
||||
|
||||
|
||||
9. Limitation of Liability
|
||||
|
||||
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL WE, OUR SUBSIDIARIES, OFFICERS, DIRECTORS, SHAREHOLDERS, PARTNERS, EMPLOYEES, AGENTS, CONTRACTORS OR OUR SUCCESSORS BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING, BUT NOT LIMITED TO PERSONAL INJURY OR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, EXEMPLARY, PUNITIVE, COVER, CONSEQUENTIAL OR OTHER DAMAGES, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, LOSS OF DATA, LOSS OF USE, COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, LOSS OF GOODWILL OR ANY OTHER COMMERCIAL DAMAGES OR LOSSES, ARISING OUT OF OR RELATED TO THE USE OF, OR INABILITY TO USE, THE SOFTWARE OR ANY RELATED SERVICES OR CONTENT, HOWEVER CAUSED, REGARDLESS OF THE THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, TORT (INCLUDING NEGLIGENCE), PRODUCT LIABILITY OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND EVEN IF A REMEDY SET FORTH HEREIN IS FOUND TO HAVE FAILED OF ITS ESSENTIAL PURPOSE. WITHOUT LIMITING THE FOREGOING, IN NO EVENT SHALL OUR TOTAL LIABILITY TO YOU FOR ACTUAL DAMAGES FOR ANY CAUSE WHATSOEVER EXCEED THE AMOUNT PAID BY YOU TO LICENSE THE SOFTWARE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE FOREGOING LIMITATION OR EXCLUSION MAY NOT APPLY TO YOU. THESE LIMITATIONS WILL SURVIVE THE TERMINATION OF THIS AGREEMENT.
|
||||
|
||||
|
||||
10. Indemnification
|
||||
|
||||
You agree to fully indemnify and hold us, our successors, officers, directors, shareholders, partners, employees, agents, contracts and our successors harmless from and against any claim, suit, hearing, action, expense or demand, including without limitation to: all claims for damages, fees or costs (including attorneys’ fees), arising out of or related to the use of the Software and/or any related Services by you, your agents or representatives, anyone under your control, or by any third party using your equipment or accounts to use the Software or Services (for purposes of this section, collectively, “you”); the violation by you of any provision of this Agreement; the violation by you and any laws or regulations; or the infringement or misappropriation by you any copyright, trademark or any other intellectual property right, proprietary right, property right or any other right of ours or any third party. We reserve the right to assume the exclusive defense and control of any matter otherwise subject to indemnification by you, in which event you will cooperate with us in asserting any available defenses and, as set forth above, be fully responsible for our attorneys’ fees.
|
||||
|
||||
|
||||
11. Governing Law
|
||||
|
||||
The license and this Agreement are governed by and construed in accordance with the laws of the State of Virginia, United States of America. You hereby consent to exclusive jurisdiction and venue in the County of Bedford and State of Virginia. By agreeing to the terms of this Agreement, you are waiving any claims that you might otherwise have against IPS based on the laws of other jurisdictions.
|
||||
|
||||
|
||||
12. Severability
|
||||
|
||||
If, for any reason, a court of competent jurisdiction deems any provision or part of this Agreement to be unlawful or unenforceable, the remainder of the Agreement shall remain in full force and effect.
|
||||
@@ -3,7 +3,7 @@
|
||||
<ul class='ipsField_fieldList'>
|
||||
{{foreach $apps as $key => $data}}
|
||||
<li>
|
||||
<input type="checkbox" id='app_{$key}' {{if $key !== 'core'}}name="apps[{$key}]"{{endif}} {{if in_array( $key, $selected )}}checked{{endif}} {{if $data['disabled']}}disabled{{endif}} value='1'>
|
||||
<input type="checkbox" id='app_{$key}' {{if $key !== 'core'}}name="apps[{$key}]"{{endif}} {{if \in_array( $key, $selected )}}checked{{endif}} {{if $data['disabled']}}disabled{{endif}} value='1'>
|
||||
<div class='ipsField_fieldList_content'>
|
||||
<label for='app_{$key}' class='ipsFieldRow_label'>{$data['name']}</label>
|
||||
{{if !empty( $data['errors'] )}}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<form action="{$action}" method="post" {{if $uploadField}}enctype="multipart/form-data"{{endif}}>
|
||||
<input type="hidden" name="{$id}_submitted" value="1">
|
||||
{{foreach $hiddenValues as $k => $v}}
|
||||
{{if is_array( $v )}}
|
||||
{{if \is_array( $v )}}
|
||||
{{foreach $v as $_k => $_v}}
|
||||
<input type="hidden" name="{$k}[{$_k}]" value="{$_v}">
|
||||
{{endforeach}}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
{{if $autoComplete['unique']}}
|
||||
data-ipsAutocomplete-unique
|
||||
{{endif}}
|
||||
{{if is_array( $autoComplete['source'] )}}
|
||||
{{if \is_array( $autoComplete['source'] )}}
|
||||
list='{$name}_datalist'
|
||||
{{elseif $autoComplete['source']}}
|
||||
data-ipsAutocomplete-dataSource="{url="{$autoComplete['source']}"}"
|
||||
@@ -28,7 +28,7 @@
|
||||
{{endif}}
|
||||
{{if $placeholder !== NULL}}placeholder='{$placeholder}'{{endif}}
|
||||
/>
|
||||
{{if is_array( $autoComplete )}}
|
||||
{{if \is_array( $autoComplete )}}
|
||||
<datalist id="{$name}_datalist">
|
||||
{{foreach $autoComplete as $v}}
|
||||
<option value="$v">{$v}</option>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
{{endforeach}}
|
||||
{{if isset( $requirements['advice'] ) and count( $requirements['advice'] )}}
|
||||
{{if isset( $requirements['advice'] ) and \count( $requirements['advice'] )}}
|
||||
<h2 class="ipsType_sectionHead">{lang="recommendations"}</h2>
|
||||
<br><br>
|
||||
<p class="ipsType_normal">{lang="recom_info"}</p>
|
||||
|
||||
|
Before Width: | Height: | Size: 174 B After Width: | Height: | Size: 133 B |
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 134 B |
|
Before Width: | Height: | Size: 729 B After Width: | Height: | Size: 585 B |
|
Before Width: | Height: | Size: 161 B After Width: | Height: | Size: 120 B |
|
Before Width: | Height: | Size: 744 B After Width: | Height: | Size: 626 B |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 361 B |
|
Before Width: | Height: | Size: 953 B After Width: | Height: | Size: 662 B |
|
Before Width: | Height: | Size: 724 B After Width: | Height: | Size: 605 B |
|
Before Width: | Height: | Size: 665 B After Width: | Height: | Size: 577 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -8,7 +8,7 @@
|
||||
* @since 2 Apr 2013
|
||||
*/
|
||||
|
||||
define('READ_WRITE_SEPARATION', FALSE);
|
||||
define('REPORT_EXCEPTIONS', TRUE);
|
||||
\define('READ_WRITE_SEPARATION', FALSE);
|
||||
\define('REPORT_EXCEPTIONS', TRUE);
|
||||
require_once '../../init.php';
|
||||
\IPS\Dispatcher\Setup::i()->setLocation('install')->run();
|
||||
@@ -55,6 +55,7 @@ $lang = array(
|
||||
'requirements_mysql_version_fail' => "You are running MySQL version %s. You need MySQL %s or above (%s or above recommended). You should contact your hosting provider or system administrator to ask for an upgrade.",
|
||||
'requirements_curl_success' => "cURL extension loaded.",
|
||||
'requirements_curl_fopen' => "fsockopen function available",
|
||||
'requirements_file_uploads' => "File uploads are currently disabled in your PHP configuration, which will prevent many features from working correctly. You should contact your host to have the option `file_uploads` enabled.",
|
||||
'requirements_curl_advice' => "You do not have the cURL PHP extension loaded or it is running a version less than 7.36. While this is not required, it is recommended.",
|
||||
'requirements_curl_fail' => "You do not have the cURL PHP extension loaded (or it is running a version less than 7.36) and the fsockopen function is disabled. You should contact your hosting provider or system administrator to ask either for cURL version 7.36 or greater to be installed, or the fsockopen function to be enabled. cURL is recommended.",
|
||||
'requirements_mb_success' => "Multibyte String extension loaded",
|
||||
@@ -137,9 +138,6 @@ $lang = array(
|
||||
'sql_port_desc' => "If you are not sure, leave at the default value.",
|
||||
'sql_socket' => "Socket",
|
||||
'sql_socket_desc' => "If not provided, the server's default setting will be used. If you're not sure, leave at the default value.",
|
||||
'sql_utf8mb4' => "Use 4-Byte UTF-8 Encoding?",
|
||||
'sql_utf8mb4_desc' => "Some non-common symbols (such as historical scripts, music symbols and Emoji) require more space in the database to be stored. If you leave this setting disabled, users will not be able to use these symbols on your site. If enabled, these characters will be able to be used, but the database will use more disk space.",
|
||||
'err_no_utf8mb4' => "4-Byte UTF-8 Encoding is only available in MySQL 5.5.3 and above. You can uncheck that option to continue (it can be changed later), or contact your hosting provider or server administrator to upgrade your version of MySQL.",
|
||||
'http_server' => "Web Server Details",
|
||||
'base_url' => "Site URL",
|
||||
'err_db_exists' => "There is already an Invision Community installation in that database. Choose a different database or use a table prefix.",
|
||||
@@ -162,6 +160,9 @@ $lang = array(
|
||||
'installing' => "Installing...",
|
||||
|
||||
'done' => "Installation Complete!",
|
||||
|
||||
'default_menu_item_1' => "Browse",
|
||||
'default_menu_item_2' => "Activity",
|
||||
|
||||
/* filesizes */
|
||||
'filesize_Y' => '%s YB',
|
||||
|
||||
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -11,27 +11,19 @@
|
||||
padding: 10px 20px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid rgba(0,0,0,0.1);
|
||||
{prefix="transition" value="0.1s all linear"}
|
||||
transition: 0.1s all linear;
|
||||
{prefix="user-select" value="none"}
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.ipsApp .ipsButton:not( .ipsButton_noHover ):hover {
|
||||
cursor: pointer;
|
||||
background-image: -moz-linear-gradient(top, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.08) 100%);
|
||||
background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.08) 0%,rgba(255,255,255,0.08) 100%);
|
||||
background-image: -o-linear-gradient(top, rgba(255,255,255,0.08) 0%,rgba(255,255,255,0.08) 100%);
|
||||
background-image: -ms-linear-gradient(top, rgba(255,255,255,0.08) 0%,rgba(255,255,255,0.08) 100%);
|
||||
background-image: linear-gradient(to bottom, rgba(255,255,255,0.08) 0%,rgba(255,255,255,0.08) 100%);
|
||||
}
|
||||
|
||||
.ipsApp .ipsButton:active {
|
||||
box-shadow: 1px 1px 4px rgba(0,0,0,0.3) inset;
|
||||
border: 1px solid rgba(0,0,0,0.4);
|
||||
background-image: -moz-linear-gradient(top, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.2) 100%);
|
||||
background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.2) 0%,rgba(0,0,0,0.2) 100%);
|
||||
background-image: -o-linear-gradient(top, rgba(0,0,0,0.2) 0%,rgba(0,0,0,0.2) 100%);
|
||||
background-image: -ms-linear-gradient(top, rgba(0,0,0,0.2) 0%,rgba(0,0,0,0.2) 100%);
|
||||
background-image: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%,rgba(0,0,0,0.2) 100%);
|
||||
}
|
||||
|
||||
@@ -75,20 +67,12 @@
|
||||
}
|
||||
|
||||
.ipsApp .ipsButton_light:hover {
|
||||
background-image: -moz-linear-gradient(top, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.3) 100%);
|
||||
background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 100%);
|
||||
background-image: -o-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 100%);
|
||||
background-image: -ms-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 100%);
|
||||
background-image: linear-gradient(to bottom, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 100%);
|
||||
}
|
||||
|
||||
.ipsApp .ipsButton:active {
|
||||
box-shadow: 1px 1px 4px rgba(0,0,0,0.1) inset;
|
||||
border: 1px solid rgba(0,0,0,0.1);
|
||||
background-image: -moz-linear-gradient(top, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.02) 100%);
|
||||
background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.02) 0%,rgba(0,0,0,0.02) 100%);
|
||||
background-image: -o-linear-gradient(top, rgba(0,0,0,0.02) 0%,rgba(0,0,0,0.02) 100%);
|
||||
background-image: -ms-linear-gradient(top, rgba(0,0,0,0.02) 0%,rgba(0,0,0,0.02) 100%);
|
||||
background-image: linear-gradient(to bottom, rgba(0,0,0,0.02) 0%,rgba(0,0,0,0.02) 100%);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
.icon-spinner2:before,
|
||||
.icon-spinner3:before,
|
||||
.icon-spinner9:before {
|
||||
-webkit-animation: spinner 0.75s infinite linear;
|
||||
animation: spinner 0.75s infinite linear;
|
||||
}
|
||||
|
||||
@@ -125,43 +124,8 @@
|
||||
margin-left: .3em;
|
||||
}
|
||||
.fa-spin {
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
-moz-animation: spin 2s infinite linear;
|
||||
-o-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
@-moz-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-o-keyframes spin {
|
||||
0% {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-ms-keyframes spin {
|
||||
0% {
|
||||
-ms-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-ms-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
@@ -172,42 +136,22 @@
|
||||
}
|
||||
.fa-rotate-90 {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
|
||||
-webkit-transform: rotate(90deg);
|
||||
-moz-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
-o-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.fa-rotate-180 {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
|
||||
-webkit-transform: rotate(180deg);
|
||||
-moz-transform: rotate(180deg);
|
||||
-ms-transform: rotate(180deg);
|
||||
-o-transform: rotate(180deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.fa-rotate-270 {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
|
||||
-webkit-transform: rotate(270deg);
|
||||
-moz-transform: rotate(270deg);
|
||||
-ms-transform: rotate(270deg);
|
||||
-o-transform: rotate(270deg);
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
.fa-flip-horizontal {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
|
||||
-webkit-transform: scale(-1, 1);
|
||||
-moz-transform: scale(-1, 1);
|
||||
-ms-transform: scale(-1, 1);
|
||||
-o-transform: scale(-1, 1);
|
||||
transform: scale(-1, 1);
|
||||
}
|
||||
.fa-flip-vertical {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
|
||||
-webkit-transform: scale(1, -1);
|
||||
-moz-transform: scale(1, -1);
|
||||
-ms-transform: scale(1, -1);
|
||||
-o-transform: scale(1, -1);
|
||||
transform: scale(1, -1);
|
||||
}
|
||||
.fa-stack {
|
||||
|
||||
@@ -322,12 +322,11 @@ input[type="checkbox"]:disabled + .ipsToggle {
|
||||
line-height: 22px;
|
||||
border-radius: 2px;
|
||||
position: relative;
|
||||
box-shadow: 0px 0px 1px rgba(0,0,0,0.2) inset;
|
||||
border: 1px solid rgba(0,0,0,0.3);
|
||||
border: 1px solid rgba(0,0,0,0.1);
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
-webkit-transition: all 0.3s linear;
|
||||
transition: all 0.3s linear;
|
||||
}
|
||||
|
||||
.ipsToggle.ipsToggle_off {
|
||||
@@ -353,7 +352,7 @@ input[type="checkbox"]:disabled + .ipsToggle {
|
||||
box-shadow: 0px 0px 1px rgba(0,0,0,0.5);
|
||||
display: block;
|
||||
position: absolute;
|
||||
-webkit-transition: all 0.2s linear;
|
||||
transition: all 0.2s linear;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@@ -367,20 +366,6 @@ input[type="checkbox"]:disabled + .ipsToggle {
|
||||
right: 29px;
|
||||
}
|
||||
|
||||
.ipsToggle span:before {
|
||||
content: '\\f0c9';
|
||||
font-family: 'FontAwesome';
|
||||
font-size: 10px;
|
||||
line-height: 20px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
top: 0;
|
||||
left: -14px;
|
||||
color: rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.ipsToggle span:after {
|
||||
content: '\\f00c';
|
||||
font-family: 'FontAwesome';
|
||||
@@ -392,7 +377,6 @@ input[type="checkbox"]:disabled + .ipsToggle {
|
||||
right: 27px;
|
||||
top: 0px;
|
||||
line-height: 18px;
|
||||
text-shadow: 0px 0px 1px rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.ipsToggle.ipsToggle_off span:after {
|
||||
@@ -423,9 +407,9 @@ input[type="checkbox"]:disabled + .ipsToggle {
|
||||
background: #f2f2f2;
|
||||
overflow: hidden;
|
||||
text-indent: 100%;
|
||||
whitespace: no-wrap;
|
||||
whitespace: nowrap;
|
||||
cursor: pointer;
|
||||
-webkit-transition: 0.2s all linear;
|
||||
transition: 0.2s all linear;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,47 +102,14 @@ a {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@-webkit-keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
@-moz-keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
@-ms-keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
@-o-keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 0 0;
|
||||
}
|
||||
to {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
}
|
||||
@keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.ipsProgressBar {
|
||||
width: 50%;
|
||||
@@ -150,30 +117,17 @@ a {
|
||||
height: 20px;
|
||||
overflow: hidden;
|
||||
background: rgb(156,156,156);
|
||||
background: -moz-linear-gradient(top, rgba(156,156,156,1) 0%, rgba(180,180,180,1) 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(156,156,156,1)), color-stop(100%,rgba(180,180,180,1)));
|
||||
background: -webkit-linear-gradient(top, rgba(156,156,156,1) 0%,rgba(180,180,180,1) 100%);
|
||||
background: -o-linear-gradient(top, rgba(156,156,156,1) 0%,rgba(180,180,180,1) 100%);
|
||||
background: -ms-linear-gradient(top, rgba(156,156,156,1) 0%,rgba(180,180,180,1) 100%);
|
||||
background: linear-gradient(to bottom, rgba(156,156,156,1) 0%,rgba(180,180,180,1) 100%);
|
||||
border-radius: 4px;
|
||||
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.ipsProgressBar_animated .ipsProgressBar_progress {
|
||||
background-color: #5490c0;
|
||||
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
|
||||
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-size: 40px 40px;
|
||||
-webkit-animation: progress-bar-stripes 2s linear infinite;
|
||||
-moz-animation: progress-bar-stripes 2s linear infinite;
|
||||
-ms-animation: progress-bar-stripes 2s linear infinite;
|
||||
-o-animation: progress-bar-stripes 2s linear infinite;
|
||||
animation: progress-bar-stripes 2s linear infinite;
|
||||
}
|
||||
.ipsProgressBar_animated .ipsProgressBar_progress {
|
||||
background-color: #5490c0;
|
||||
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-size: 40px 40px;
|
||||
animation: progress-bar-stripes 2s linear infinite;
|
||||
}
|
||||
|
||||
.ipsProgressBar_progress {
|
||||
float: left;
|
||||
@@ -185,7 +139,7 @@ a {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background: #5490c0;
|
||||
position: relative;
|
||||
padding-left: 6px;
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
.ipsProgressBar_progress[data-progress]:after {
|
||||
|
||||
@@ -63,13 +63,9 @@ hr.ipsHr {
|
||||
border-color: #f0f0f0;
|
||||
}
|
||||
|
||||
@-webkit-keyframes spinner {
|
||||
0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
|
||||
100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); }
|
||||
}
|
||||
@keyframes spinner {
|
||||
0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
|
||||
100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); }
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(359deg); }
|
||||
}
|
||||
|
||||
.ipsLoading {
|
||||
@@ -88,7 +84,6 @@ hr.ipsHr {
|
||||
margin-left: -25px;
|
||||
font-size: 50px;
|
||||
line-height: 1 !important;
|
||||
-webkit-animation: spinner 0.75s infinite linear;
|
||||
animation: spinner 0.75s infinite linear;
|
||||
}
|
||||
|
||||
|
||||