Version 5.0.0 beta 4
This commit is contained in:
1 parent
e86153356a
commit
2f24f9de48
276 files changed
+8614
-6044
No files matched your search
@@ -60,6 +60,7 @@ use function in_array;
|
||||
use function is_array;
|
||||
use function is_int;
|
||||
use function is_null;
|
||||
use function is_numeric;
|
||||
use function strlen;
|
||||
use function substr;
|
||||
|
||||
@@ -3410,7 +3411,12 @@ abstract class Model extends ActiveRecord
|
||||
{
|
||||
$orderColumn = static::$databaseColumnOrder;
|
||||
$order = Db::i()->select( array( "MAX( `" . static::$databasePrefix . static::$databaseColumnOrder . "` )" ), static::$databaseTable, array() )->first();
|
||||
$this->$orderColumn = $order + 1;
|
||||
|
||||
/* Make sure this is numeric; we might be ordering by a string */
|
||||
if( is_numeric( $order ) )
|
||||
{
|
||||
$this->$orderColumn = $order + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if( IPS::classUsesTrait( $this, Icon::class ) and $oldIcon )
|
||||
|
||||
Reference in new issue
Block a user