mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #11877 from murrant/remove-str-i-usage
Fix some str_i_contains() usages
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use LibreNMS\Device\WirelessSensor;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessClientsDiscovery;
|
||||
use LibreNMS\OS;
|
||||
@@ -41,7 +42,7 @@ class Symbol extends OS implements WirelessClientsDiscovery
|
||||
{
|
||||
$device = $this->getDevice();
|
||||
|
||||
if (str_i_contains($device['hardware'], 'AP')) {
|
||||
if (Str::contains(strtolower($device['hardware']), 'ap')) {
|
||||
$oid = '.1.3.6.1.4.1.388.11.2.4.2.100.10.1.18.1';
|
||||
return array(
|
||||
new WirelessSensor('clients', $device['device_id'], $oid, 'symbol', 1, 'Clients')
|
||||
|
@@ -4,7 +4,7 @@ namespace App\Models;
|
||||
|
||||
use DB;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use LibreNMS\Data\Store\Rrd;
|
||||
use Illuminate\Support\Str;
|
||||
use LibreNMS\Util\Rewrite;
|
||||
use Permissions;
|
||||
|
||||
@@ -72,7 +72,7 @@ class Port extends DeviceRelatedModel
|
||||
}
|
||||
|
||||
foreach ((array)\LibreNMS\Config::get('rewrite_if', []) as $src => $val) {
|
||||
if (str_i_contains($label, $src)) {
|
||||
if (Str::contains(strtolower($label), strtolower($src))) {
|
||||
$label = $val;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user