Used more dbm::is_result() instead of (!$r) or (!count($r)), still there are
more pending ... Also put SQL table columns into back-ticks. Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
@@ -3590,7 +3590,7 @@
|
||||
intval($gid),
|
||||
dbesc($name));
|
||||
// error message if specified gid is not in database
|
||||
if (count($rname) == 0)
|
||||
if (!dbm::is_result($rname))
|
||||
throw new BadRequestException('wrong group name');
|
||||
|
||||
// delete group
|
||||
@@ -3629,7 +3629,7 @@
|
||||
intval($uid),
|
||||
dbesc($name));
|
||||
// error message if specified group name already exists
|
||||
if (count($rname) != 0)
|
||||
if (dbm::is_result($rname))
|
||||
throw new BadRequestException('group name already exists');
|
||||
|
||||
// check if specified group name is a deleted group
|
||||
@@ -3637,7 +3637,7 @@
|
||||
intval($uid),
|
||||
dbesc($name));
|
||||
// error message if specified group name already exists
|
||||
if (count($rname) != 0)
|
||||
if (dbm::is_result($rname))
|
||||
$reactivate_group = true;
|
||||
|
||||
// create group
|
||||
|
||||
Reference in New Issue
Block a user