Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -448,9 +448,9 @@ class _Application extends \IPS\Node\Model
|
||||
{
|
||||
if( !empty( $data['longversion'] ) and $data['longversion'] > $this->long_version and ( !$skipSameHumanVersion or $data['version'] != $this->version ) )
|
||||
{
|
||||
if( $data['released'] AND intval($data['released']) == $data['released'] AND \strlen($data['released']) == 10 )
|
||||
if( $data['released'] AND ( (int) $data['released'] != $data['released'] OR \strlen($data['released']) != 10 ) )
|
||||
{
|
||||
$data['released'] = (string) \IPS\DateTime::ts( $data['released'] )->localeDate();
|
||||
$data['released'] = strtotime( $data['released'] );
|
||||
}
|
||||
|
||||
$update[] = $data;
|
||||
@@ -798,6 +798,11 @@ EOF;
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( method_exists( $classname, 'deprecated' ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch( \ErrorException $e )
|
||||
{
|
||||
@@ -2348,6 +2353,7 @@ EOF;
|
||||
unset( \IPS\Data\Store::i()->themes );
|
||||
\IPS\Theme::removeTemplates( $this->directory );
|
||||
\IPS\Theme::removeCss( $this->directory );
|
||||
\IPS\Theme::clearFiles( \IPS\Theme::CSS );
|
||||
\IPS\Theme::removeResources( $this->directory );
|
||||
\IPS\Theme::resetAllCacheKeys();
|
||||
}
|
||||
@@ -2689,9 +2695,21 @@ EOF;
|
||||
/* Get our local definition of this table */
|
||||
try
|
||||
{
|
||||
$localDefinition = \IPS\Db::i()->getTableDefinition( $tableName );
|
||||
$localDefinition = \IPS\Db::i()->getTableDefinition( $tableName, FALSE, TRUE );
|
||||
$originalDefinition = $localDefinition; #Store this before it is normalised and engine stripped
|
||||
$localDefinition = \IPS\Db::i()->normalizeDefinition( $localDefinition );
|
||||
|
||||
/* Now we have to add the correct colation for text columns to our compare definition to flag any columns that don't have the correct charset/collation */
|
||||
$tableDefinition['columns'] = array_map( function( $column ){
|
||||
if( in_array( mb_strtoupper( $column['type'] ), array( 'CHAR', 'VARCHAR', 'TINYTEXT', 'TEXT', 'MEDIUMTEXT', 'LONGTEXT', 'ENUM', 'SET' ) ) )
|
||||
{
|
||||
$column['collation'] = \IPS\Db::i()->collation;
|
||||
}
|
||||
|
||||
return $column;
|
||||
}, $tableDefinition['columns'] );
|
||||
|
||||
/* And store our definition */
|
||||
$compareDefinition = \IPS\Db::i()->normalizeDefinition( $tableDefinition );
|
||||
$tableDefinition = \IPS\Db::i()->updateDefinitionIndexLengths( $tableDefinition );
|
||||
|
||||
@@ -2748,7 +2766,7 @@ EOF;
|
||||
$differences = array();
|
||||
foreach ( $columnData as $k => $v )
|
||||
{
|
||||
if ( $v != $localDefinition['columns'][ $columnName ][ $k ] )
|
||||
if ( isset( $localDefinition['columns'][ $columnName ][ $k ] ) AND $v != $localDefinition['columns'][ $columnName ][ $k ] )
|
||||
{
|
||||
$differences[ $k ] = array( 'is' => $localDefinition['columns'][ $columnName ][ $k ], 'shouldBe' => $v );
|
||||
}
|
||||
@@ -4263,4 +4281,57 @@ EOF;
|
||||
{
|
||||
return ( \IPS\Member::loggedIn()->hasAcpRestriction( 'core', 'applications', 'app_manage' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get any third parties this app uses for the privacy policy
|
||||
*
|
||||
* @return array( title => language bit, description => language bit, privacyUrl => privacy policy URL )
|
||||
*/
|
||||
public function privacyPolicyThirdParties()
|
||||
{
|
||||
/* Apps can overload this */
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get any settings that are uploads
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function uploadSettings()
|
||||
{
|
||||
/* Apps can overload this */
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Search
|
||||
*
|
||||
* @param string $column Column to search
|
||||
* @param string $query Search query
|
||||
* @param string|null $order Column to order by
|
||||
* @param mixed $where Where clause
|
||||
* @return array
|
||||
*/
|
||||
public static function search( $column, $query, $order=NULL, $where=array() )
|
||||
{
|
||||
if ( $column === '_title' )
|
||||
{
|
||||
$return = array();
|
||||
foreach( \IPS\Member::loggedIn()->language()->words as $k => $v )
|
||||
{
|
||||
if ( preg_match( '/^__app_([a-z]*)$/', $k, $matches ) and mb_strpos( mb_strtolower( $v ), mb_strtolower( $query ) ) !== FALSE )
|
||||
{
|
||||
try
|
||||
{
|
||||
$application = static::load( $matches[1] );
|
||||
$return[ $application->_id ] = $application;
|
||||
}
|
||||
catch ( \OutOfRangeException $e ) { }
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
return parent::search( $column, $query, $order, $where );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user