Continued rewriting:
- use dba::is_result() everywhere (where I found the old, bad way) - converted some spaces -> tabs for code - converted some CRLF -> LF as mixures of both is not good Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
56a2bbc740
commit
3e701b90ac
93 changed files with 451 additions and 450 deletions
|
@ -33,7 +33,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
|
|||
|
||||
call_hooks($a->module . '_pre_' . $selname, $arr);
|
||||
|
||||
if(count($r)) {
|
||||
if(dba::is_result($r)) {
|
||||
foreach($r as $rr) {
|
||||
if((is_array($preselected)) && in_array($rr['id'], $preselected))
|
||||
$selected = " selected=\"selected\" ";
|
||||
|
@ -144,7 +144,7 @@ function contact_selector($selname, $selclass, $preselected = false, $options) {
|
|||
|
||||
call_hooks($a->module . '_pre_' . $selname, $arr);
|
||||
|
||||
if(count($r)) {
|
||||
if(dba::is_result($r)) {
|
||||
foreach($r as $rr) {
|
||||
if((is_array($preselected)) && in_array($rr['id'], $preselected))
|
||||
$selected = " selected=\"selected\" ";
|
||||
|
@ -220,7 +220,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
|
|||
|
||||
$receiverlist = array();
|
||||
|
||||
if(count($r)) {
|
||||
if(dba::is_result($r)) {
|
||||
foreach($r as $rr) {
|
||||
if((is_array($preselected)) && in_array($rr['id'], $preselected))
|
||||
$selected = " selected=\"selected\" ";
|
||||
|
@ -314,7 +314,7 @@ function populate_acl($user = null, $show_jotnets = false) {
|
|||
$r = q("SELECT `pubmail` FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1",
|
||||
intval(local_user())
|
||||
);
|
||||
if(count($r)) {
|
||||
if(dba::is_result($r)) {
|
||||
$mail_enabled = true;
|
||||
if(intval($r[0]['pubmail']))
|
||||
$pubmail_enabled = true;
|
||||
|
@ -577,7 +577,7 @@ function acl_lookup(&$a, $out_type = 'json') {
|
|||
$r = array();
|
||||
|
||||
|
||||
if(count($r)) {
|
||||
if(dba::is_result($r)) {
|
||||
foreach($r as $g){
|
||||
$contacts[] = array(
|
||||
"type" => "c",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue