mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixed visibility for constants and methods
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
7363d4e223
commit
d52d32fed9
|
@ -17,7 +17,7 @@ class ModalController extends Controller
|
||||||
* @author [A. Gianotto] [<snipe@snipe.net]
|
* @author [A. Gianotto] [<snipe@snipe.net]
|
||||||
* @return View
|
* @return View
|
||||||
*/
|
*/
|
||||||
function show ($type, $itemId = null) {
|
public function show ($type, $itemId = null) {
|
||||||
|
|
||||||
// These values should correspond to a file in resources/views/modals/
|
// These values should correspond to a file in resources/views/modals/
|
||||||
$allowed_types = [
|
$allowed_types = [
|
||||||
|
|
|
@ -11,7 +11,7 @@ class CheckForTwoFactor
|
||||||
/**
|
/**
|
||||||
* Routes to ignore for Two Factor Auth
|
* Routes to ignore for Two Factor Auth
|
||||||
*/
|
*/
|
||||||
const IGNORE_ROUTES = ['two-factor', 'two-factor-enroll', 'setup', 'logout'];
|
public const IGNORE_ROUTES = ['two-factor', 'two-factor-enroll', 'setup', 'logout'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle an incoming request.
|
* Handle an incoming request.
|
||||||
|
|
|
@ -34,9 +34,9 @@ class Asset extends Depreciable
|
||||||
use CompanyableTrait;
|
use CompanyableTrait;
|
||||||
use HasFactory, Loggable, Requestable, Presentable, SoftDeletes, ValidatingTrait, UniqueUndeletedTrait, UniqueSerialTrait;
|
use HasFactory, Loggable, Requestable, Presentable, SoftDeletes, ValidatingTrait, UniqueUndeletedTrait, UniqueSerialTrait;
|
||||||
|
|
||||||
const LOCATION = 'location';
|
public const LOCATION = 'location';
|
||||||
const ASSET = 'asset';
|
public const ASSET = 'asset';
|
||||||
const USER = 'user';
|
public const USER = 'user';
|
||||||
|
|
||||||
use Acceptable;
|
use Acceptable;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class CustomField extends Model
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
const PREDEFINED_FORMATS = [
|
public const PREDEFINED_FORMATS = [
|
||||||
'ANY' => '',
|
'ANY' => '',
|
||||||
'CUSTOM REGEX' => '',
|
'CUSTOM REGEX' => '',
|
||||||
'ALPHA' => 'alpha',
|
'ALPHA' => 'alpha',
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Setting extends Model
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const SETUP_CHECK_KEY = 'snipeit_setup_check';
|
public const SETUP_CHECK_KEY = 'snipeit_setup_check';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the model should inject it's identifier to the unique
|
* Whether the model should inject it's identifier to the unique
|
||||||
|
|
|
@ -657,7 +657,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
{
|
{
|
||||||
$query = $query->where('first_name', 'LIKE', '%'.$search.'%')
|
$query = $query->where('first_name', 'LIKE', '%'.$search.'%')
|
||||||
->orWhere('last_name', 'LIKE', '%'.$search.'%')
|
->orWhere('last_name', 'LIKE', '%'.$search.'%')
|
||||||
->orWhereRaw('CONCAT('.DB::getTablePrefix().'users.first_name," ",'.DB::getTablePrefix().'users.last_name) LIKE ?', ["%$search%"]);
|
->orWhereRaw('CONCAT('.DB::getTablePrefix().'users.first_name," ",'.DB::getTablePrefix().'users.last_name) LIKE ?', ["%{$search}%"]);
|
||||||
|
|
||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
@ -673,7 +673,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
public function advancedTextSearch(Builder $query, array $terms) {
|
public function advancedTextSearch(Builder $query, array $terms) {
|
||||||
|
|
||||||
foreach($terms as $term) {
|
foreach($terms as $term) {
|
||||||
$query = $query->orWhereRaw('CONCAT('.DB::getTablePrefix().'users.first_name," ",'.DB::getTablePrefix().'users.last_name) LIKE ?', ["%$term%"]);
|
$query = $query->orWhereRaw('CONCAT('.DB::getTablePrefix().'users.first_name," ",'.DB::getTablePrefix().'users.last_name) LIKE ?', ["%{$term}%"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $query;
|
return $query;
|
||||||
|
|
Loading…
Reference in a new issue