Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

+3 -3
View File
@@ -2,9 +2,9 @@
/**
* @brief Output Class
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @since 9 Sept 2013
* @version SVN_VERSION_NUMBER
*/
@@ -51,7 +51,7 @@ class Browser extends \IPSUtf8\Output
public function error( $message )
{
/* Send output */
$this->sendOutput( \IPSUtf8\Output\Browser\Template::wrapper( "IPS Converter", \IPSUtf8\Output\Browser\Template::error( $message ), 500 ) );
$this->sendOutput( \IPSUtf8\Output\Browser\Template::wrapper( "IPS Converter", \IPSUtf8\Output\Browser\Template::error( $message ), true ), 500 );
exit();
}
@@ -2,9 +2,9 @@
/**
* @brief Template Class
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @since 9 Sept 2013
* @version SVN_VERSION_NUMBER
*/
@@ -16,7 +16,7 @@ namespace IPSUtf8\Output\Browser;
*/
class Template
{
public static function wrapper( $title="IPS Converter", $content="")
public static function wrapper( $title="IPS Converter", $content="", $isError=false )
{
$iniTime = @ini_get('max_execution_time');
$execTime = ( is_numeric( $iniTime ) ) ? $iniTime : 30;
@@ -53,6 +53,11 @@ class Template
<body data-url="{$url}">
<div class="container">
<div class="header">
EOFHTML;
if ( ! $isError )
{
$html .= <<<EOFHTML
<ul class="nav nav-pills pull-right">
<li class="{$active['convert']}"><a href="{url="?controller=browser"}">Convert</a></li>
EOFHTML;
@@ -66,6 +71,9 @@ EOFHTML;
$html .= <<<EOFHTML
<li class="{$active['tools']}"><a href="{url="?controller=tools"}">Tools</a></li>
</ul>
EOFHTML;
}
$html .= <<<EOFHTML
<h3 class="text-muted">IPS UTF8 Converter</h3>
</div>
{$content}
@@ -159,7 +167,7 @@ EOFHTML;
}
/**
* Welcome page
* Error page
*/
public static function error( $msg )
{
@@ -173,6 +181,28 @@ EOFHTML;
return static::parse( $html );
}
/**
* Error page explaining about database being IPS4 already
*/
public static function errorAlreadyIPS4()
{
$html = <<<EOFHTML
<p style="text-align:left">
The target database is already IPS4. There is no conversion required and the UTF8 converter is locked.
<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;">&lt;?php
define( 'BYPASS_SAFETY_LOCK', true );
</textarea>
</p>
<p class="text-danger">Please remember to remove the constants.php file when you are finished!</p>
EOFHTML;
return static::parse( $html );
}
/**
* Welcome page
*/
@@ -236,14 +266,13 @@ else if ( $isUtf8 === true )
The database is set to UTF-8, however {$cnt} table(s) have incorrect collations and need fixing.
<p><a class="btn btn-lg btn-info" href="{url="?controller=tools&amp;do=collation"}">Fix UTF-8 collations</a></p>
</p>
<p class="text-info">
If, after this process completes, you start to experience errors or see corrupt text, it is likely that you need to convert your data anyway. You can do this by clicking the button below.<br>
<a class='btn btn-info' href='{url="?controller={$controller}&amp;convert_anyway=1"}'>Run the Conversion</a>
</p>
EOFHTML;
}
else
{
/* If the charset stored for the gb_char_set setting is not utf-8, then we'll hit an endless loop unless we fix it here */
\IPSUtf8\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => 'utf-8' ), array( 'conf_key=?', 'gb_char_set' ) );
$html .= <<<EOFHTML
<p class="text-info">
@@ -292,7 +321,8 @@ $label = 'Start using UTF-8 (utf8)';
<small>
If you have a large community, or are experiencing browser timeouts during conversion, you may wish to consider running the conversion via the Command Line.<br>
<code>
php {$path}/admin/convertutf8/cli.php
cd {$path}/admin/convertutf8
php cli.php
</code>
</small>
</div>
+2 -2
View File
@@ -2,9 +2,9 @@
/**
* @brief Output Class
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @since 9 Sept 2013
* @version SVN_VERSION_NUMBER
*/
+2 -2
View File
@@ -2,9 +2,9 @@
/**
* @brief Output Class
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @since 9 Sept 2013
* @version SVN_VERSION_NUMBER
*/