Version 5.0.0 beta 2
This commit is contained in:
1 parent
15c7beabc5
commit
f61b0da85d
181 files changed
+3182
-1533
No files matched your search
@@ -243,35 +243,29 @@ class Templates extends ActiveRecord
|
||||
return $templates[ $id ];
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return parent::load( $id, $idField, $extraWhereClause );
|
||||
}
|
||||
catch( OutOfRangeException $ex )
|
||||
{
|
||||
throw $ex;
|
||||
}
|
||||
|
||||
return parent::load( $id, $idField, $extraWhereClause );
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a group_name readable (Group Name)
|
||||
*
|
||||
* @param string $name Group name from the database
|
||||
* @param string|null $name Group name from the database
|
||||
* @return string
|
||||
*/
|
||||
public static function readableGroupName( string $name ) : string
|
||||
public static function readableGroupName( ?string $name ) : string
|
||||
{
|
||||
if ( $name === 'js' )
|
||||
switch( $name )
|
||||
{
|
||||
return 'JS';
|
||||
case null:
|
||||
return '';
|
||||
case 'js':
|
||||
return 'JS';
|
||||
case 'css':
|
||||
return 'CSS';
|
||||
default:
|
||||
return ucwords( str_replace( array( '-', '_' ), ' ', $name ) );
|
||||
}
|
||||
else if ( $name === 'css' )
|
||||
{
|
||||
return 'CSS';
|
||||
}
|
||||
|
||||
return ucwords( str_replace( array( '-', '_' ), ' ', $name ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user