Version 4.1.19.4
This commit is contained in:
1 parent
2bd5025018
commit
0dc2aee5ed
312 files changed
+53730
-32118
No files matched your search
@@ -0,0 +1,37 @@
|
||||
//<?php
|
||||
|
||||
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_SQL_CALC_FOUND_ROWS Will add SQL_CALC_FOUND_ROWS
|
||||
* @li \IPS\Db::SELECT_MULTIDIMENSIONAL_JOINS Will return the result as a multidimensional array, with each joined table separately
|
||||
* @return \IPS\Db\Select
|
||||
*
|
||||
*/
|
||||
public function select( $columns=NULL, $table, $where=NULL, $order=NULL, $limit=NULL, $group=NULL, $having=NULL, $flags=0 )
|
||||
{
|
||||
switch( $table )
|
||||
{
|
||||
case 'custom_bbcode':
|
||||
$table = 'convert_custom_bbcode';
|
||||
break;
|
||||
|
||||
case 'bbcode_mediatag':
|
||||
$table = 'convert_bbcode_mediatag';
|
||||
break;
|
||||
}
|
||||
|
||||
return parent::select( $columns, $table, $where, $order, $limit, $group, $having, $flags );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
//<?php
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
class convert_hook_FrontDispatcher extends _HOOK_CLASS_
|
||||
{
|
||||
/**
|
||||
* Check whether the URL we visited is correct and route appropriately
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function checkUrl()
|
||||
{
|
||||
/* Let the parent do its thing first */
|
||||
try
|
||||
{
|
||||
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 )
|
||||
{
|
||||
$application = \IPS\Application::load('convert');
|
||||
$application::checkRedirects();
|
||||
|
||||
/* If we are still here, let the exception bubble up */
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
Reference in new issue
Block a user