Version 4.2.0

This commit is contained in:
Neo committed 2025-12-19 05:44:59 -08:00
1 parent 0dc2aee5ed
commit 96997ddd8e
2074 files changed
+125454 -55780

No files matched your search

+3 -4
View File
@@ -2,12 +2,11 @@
<?php
/**
* @brief UTF-8 Conversion
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package IPS Tools
* @since 4 Sept 2013
* @version SVN_VERSION_NUMBER
*/
+3 -4
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief UTF-8 Conversion
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package IPS Tools
* @since 4 Sept 2013
* @version SVN_VERSION_NUMBER
*/
+6 -7
View File
@@ -1,23 +1,22 @@
<?php
/**
* @brief Init for UTF8 Conversion
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 4 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8;
/**
* Class to contain IPS Community Suite autoloader and exception handler
* Class to contain Invision Community autoloader and exception handler
*/
class IPSUtf8
{
/**
* Initiate IPS Community Suite UTF8 Converter, autoloader and exception handler
* Initiate Invision Community UTF8 Converter, autoloader and exception handler
*
* @return void
*/
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* IPS UTF8 Converter
* (c) 2013 Invision Power Services - http://www.invisionpower.com
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
*
* Author: Matt "I'm no Rikki Tissier" Mecham
@@ -1,12 +1,11 @@
<?php
/**
* @brief Web conversion process
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 9 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\modules\browser;
@@ -1,12 +1,11 @@
<?php
/**
* @brief Web conversion process
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 9 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\modules\browser;
+4 -5
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Web conversion process
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 9 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\modules\browser;
+4 -5
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief CLI conversion process
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 9 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\modules\cli;
+1 -4
View File
@@ -45,10 +45,7 @@
</p>
<h3>Getting Help</h3>
<p>
If you encounter any issues while using this converter, please report the issue to our <a href="https://invisionpower.com/4bugtrack/">bug tracker</a>. When creating a new
bug report please copy and paste the "info" from the converter output.
<br />
Active IP.Board license holders can also request support via the <a href="https://invisionpower.com/clientarea">client center</a>.
If you encounter any issues while using this converter, you can request support via the <a href="https://www.invisioncommunity.com/clientarea/">client center</a>.
<br />
If you're using the command line version, please run <code>php cli.php --info</code>. If you're using the web version, please click on the "Tools" button at the top. This information
will help us debug the issue. No sensitive data is ever revealed with this tool.
+3 -4
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Archive table conversion module
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package IPS Tools
* @since 4 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Convert;
+10 -5
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Conversion module
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package IPS Tools
* @since 4 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8;
@@ -600,6 +599,12 @@ class Convert
static::log( "Duplicate key failure on insert\n{$msg}\n" . var_export( $batch, true ) );
return $this->heal( $limit, $convertCount );
}
else
{
/* Anything else we should probably halt on */
static::log( "Exception Thrown:\n{$msg}\n" . var_export( $e, true ) );
throw new \RuntimeException( $msg );
}
}
}
}
@@ -1510,7 +1515,7 @@ class Convert
}
/**
* Returns whether the database is IPS4 already
* Returns whether the database is Invision Community already
*
* @return boolean
*/
+4 -5
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Binding Class for Prepared Statements
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 18 Feb 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Db;
+4 -5
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Database Class
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 18 Feb 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8;
+4 -5
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Exception class for database errors
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 18 Feb 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Db;
+4 -5
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Database SELECT Statement
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 28 Aug 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Db;
@@ -1,12 +1,11 @@
<?php
/**
* @brief Dispatcher (Web)
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package IPS Tools
* @since 4 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Dispatcher;
@@ -22,7 +21,7 @@ class Browser extends \IPSUtf8\Dispatcher
*/
public function run()
{
/* Is this already IPS4 or has the lock been removed? */
/* Is this already Invision Community or has the lock been removed? */
if( ! \BYPASS_SAFETY_LOCK and \IPSUtf8\Convert::i()->databaseIsIPS4() )
{
\IPSUtf8\Output\Browser::i()->error( \IPSUtf8\Output\Browser\Template::errorAlreadyIPS4() );
+3 -4
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Dispatcher (CLI)
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package IPS Tools
* @since 4 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Dispatcher;
@@ -1,12 +1,11 @@
<?php
/**
* @brief Abstract class that Controllers should extend
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 18 Feb 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Dispatcher;
@@ -1,12 +1,11 @@
<?php
/**
* @brief Dispatcher
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package IPS Tools
* @since 4 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8;
+4 -5
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Output Class
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 9 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Output;
@@ -1,12 +1,11 @@
<?php
/**
* @brief Template Class
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 9 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Output\Browser;
@@ -23,8 +22,8 @@ class Template
$url = \IPSUtf8\Output\Browser::$url;
$title = ( empty( $title ) ) ? 'IPS Converter' : $title;
$active = array( 'convert' => '', 'tools' => '', 'archive' => '' );
$hasArchive = \IPSUtf8\Session::i()->has_archive;
$controller = preg_replace( "/[^a-zA-Z0-9]/", '', empty( \IPSUtf8\Request::i()->controller ) ? 'browser' : \IPSUtf8\Request::i()->controller );
$controller = empty( \IPSUtf8\Request::i()->controller ) ? 'browser' : \IPSUtf8\Request::i()->controller;
$version = \IPSUtf8\Convert::VERSION_ID;
$copyrightDate = date('Y');
@@ -182,13 +181,13 @@ EOFHTML;
}
/**
* Error page explaining about database being IPS4 already
* Error page explaining about database being Invision Community 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.
The target database is already running Invision Community. 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
+4 -5
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Output Class
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 9 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Output;
+4 -5
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Output Class
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 9 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8;
@@ -1,12 +1,11 @@
<?php
/**
* @brief Singleton Pattern
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 18 Feb 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Patterns;
+4 -7
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief HTTP Request Class
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 18 Feb 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8;
@@ -180,9 +179,7 @@ class Request extends \IPSUtf8\Patterns\Singleton
* Is this an SSL/Secure request?
*
* @return bool
* @see <a href='http://community.invisionpower.com/resources/bugs.html/_/ip-board/ipboard-cant-detect-https-if-behind-an-ssl-terminating-load-balancer-r42909'>Load balancer SSL</a>
* @note A common technique to check for SSL is to look for $_SERVER['SERVER_PORT'] == 443, however this is not a correct check. Nothing requires SSL to be on port 443, or http to be on port 80.
* @see <a href='http://community.invisionpower.com/resources/bugs.html/_/ips-4-0/ipsrequestissecure-r45082'>Zeus load balancers set HTTP_SSLSESSIONID</a>
*/
public function isSecure()
{
+4 -5
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Session Handler
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 6th Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8;
+3 -4
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Conversion module
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package IPS Tools
* @since 4 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Text;
@@ -1,12 +1,11 @@
<?php
/**
* @brief Conversion module
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package IPS Tools
* @since 4 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Text\Module;
@@ -1,12 +1,11 @@
<?php
/**
* @brief Conversion module
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package IPS Tools
* @since 4 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Text\Module;
@@ -29,6 +28,15 @@ class Internal extends \IPSUtf8\Text\Charset
{
if ( static::needsConverting( $string, $from, $to ) === false )
{
/* Make sure it decodes properly - some characters such as £ can cause issues between windows-1250, windows-1252, and iso-8859-1 because they store them differently. @see http://php.net/manual/en/function.utf8-decode.php */
if ( $to == 'UTF-8' )
{
if ( mb_substr_count( utf8_decode( $string ), '?' ) != mb_substr_count( $string, '?' ) )
{
$string = utf8_encode( $string );
}
}
return $string;
}
+3 -4
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Conversion module
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package IPS Tools
* @since 4 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Text\Module;
@@ -1,12 +1,11 @@
<?php
/**
* @brief Conversion module
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package IPS Tools
* @since 4 Sept 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPSUtf8\Text\Module;