Version 5.0.0 beta 1

This commit is contained in:
Neo committed 2025-12-19 16:27:35 -08:00
1 parent 25ddeb65d6
commit 15c7beabc5
6736 files changed
+627902 -497943

No files matched your search

+15 -14
View File
@@ -1,25 +1,26 @@
//<?php
use IPS\Db\Select;
class convert_hook_Db extends _HOOK_CLASS_
{
/**
* Build SELECT statement
*
* @param array|string $columns The columns (as an array) to select or an expression
* @param array|string $table The table to select from. Either (string) table_name or (array) ( name, alias ) or \IPS\Db\Select object
* @param array|string|NULL $where WHERE clause - see \IPS\Db::compileWhereClause() for details
* @param string|NULL $order ORDER BY clause
* @param array|int $limit Rows to fetch or array( offset, limit )
* @param string|NULL|array $group Column(s) to GROUP BY
* @param array|string|NULL $having HAVING clause (same format as WHERE clause)
* @param int $flags Bitwise flags
* @li \IPS\Db::SELECT_DISTINCT Will use SELECT DISTINCT
* @li \IPS\Db::SELECT_MULTIDIMENSIONAL_JOINS Will return the result as a multidimensional array, with each joined table separately
* @return \IPS\Db\Select
*
* @param array|string $columns The columns (as an array) to select or an expression
* @param array|string $table The table to select from. Either (string) table_name or (array) ( name, alias ) or \IPS\Db\Select object
* @param array|string|null $where WHERE clause - see \IPS\Db::compileWhereClause() for details
* @param string|null $order ORDER BY clause
* @param int|array|null $limit Rows to fetch or array( offset, limit )
* @param string|NULL|array $group Column(s) to GROUP BY
* @param array|string|null $having HAVING clause (same format as WHERE clause)
* @param int $flags Bitwise flags
* @return Select
* @li \IPS\Db::SELECT_DISTINCT Will use SELECT DISTINCT
* @li \IPS\Db::SELECT_MULTIDIMENSIONAL_JOINS Will return the result as a multidimensional array, with each joined table separately
*/
public function select( $columns, $table, $where=NULL, $order=NULL, $limit=NULL, $group=NULL, $having=NULL, $flags=0 )
{
public function select( array|string $columns, array|string|Select $table, array|string $where=NULL, string $order=NULL, int|array $limit=NULL, array|string $group=NULL, array|string $having=NULL, int $flags=0 ): Select
{
switch( $table )
{
case 'custom_bbcode':
@@ -1,7 +1,10 @@
//<?php
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
use IPS\Application;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
exit;
}
@@ -21,9 +24,9 @@ class convert_hook_FrontDispatcher extends _HOOK_CLASS_
parent::checkUrl();
}
/* If we are here, the URL was not valid. Let's see if we need to do anything for converted sites */
catch( \OutOfRangeException $e )
catch(OutOfRangeException $e )
{
$application = \IPS\Application::load('convert');
$application = Application::load('convert');
$application::checkRedirects();
/* If we are still here, let the exception bubble up */
+7 -3
View File
@@ -1,6 +1,10 @@
//<?php
/* To prevent PHP errors (extending class does not exist) revealing path */
use IPS\Member;
use IPS\Settings;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
exit;
@@ -23,7 +27,7 @@ class convert_hook_LegacyParser extends _HOOK_CLASS_
foreach( $matches[0] as $idx => $m )
{
$member = \IPS\Member::load( $matches[1][ $idx ] );
$member = Member::load( $matches[1][ $idx ] );
if ( $member->member_id )
{
@@ -35,14 +39,14 @@ class convert_hook_LegacyParser extends _HOOK_CLASS_
}
}
return str_replace( \IPS\Settings::i()->base_url, '<___base_url___>/', $result );
return str_replace( Settings::i()->base_url, '<___base_url___>/', $result );
}
/**
* Parse statically
*
* @param string $value The value to parse
* @param \IPS\Member|null $member The member posting. NULL will use currently logged in member.
* @param Member|null $member The member posting. NULL will use currently logged in member.
* @param bool $allowHtml Allow HTML
* @param string $attachClass Key to use for attachments
* @param int $id1 ID1 to use for attachments
+2 -2
View File
@@ -1,7 +1,7 @@
//<?php
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
exit;
}
@@ -11,7 +11,7 @@ abstract class convert_hook_LoginHandler extends _HOOK_CLASS_
/**
* Get all handler classes
*/
public static function handlerClasses()
public static function handlerClasses(): array
{
$handlers = parent::handlerClasses();
$handlers[] = 'IPS\convert\Login';