1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 15:16:44 +02:00

Replace isset($var) by $var !== null

This commit is contained in:
Jakub Vrana
2012-05-13 23:54:07 -07:00
parent 40ad846d20
commit 6591d485e9
24 changed files with 57 additions and 57 deletions

View File

@@ -21,7 +21,7 @@ class AdminerSlugify {
function editInput($table, $field, $attrs, $value) {
static $slugify;
if (!$_GET["select"] && !$_GET["where"]) {
if (!isset($slugify)) {
if ($slugify === null) {
$slugify = array();
$prev = null;
foreach (fields($table) as $name => $val) {
@@ -32,7 +32,7 @@ class AdminerSlugify {
}
}
$slug = $slugify[$field["field"]];
if (isset($slug)) {
if ($slug !== null) {
return "<input value='" . h($value) . "' maxlength='$field[length]' size='40'$attrs onchange=\"var find = '$this->from'; var repl = '$this->to'; this.form['fields[$slug]'].value = this.value.toLowerCase().replace(new RegExp('[' + find + ']', 'g'), function (str) { return repl[find.indexOf(str)]; }).replace(/[^a-z0-9_]+/g, '-').replace(/^-|-\$/g, '').substr(0, $field[length]);\">";
}
}