]> git.defcon.no Git - hermes/blobdiff - api/lib/phone_functions.php
Changed sql_dbquery to return result on zero rows. Resulted in some patchings. Added...
[hermes] / api / lib / phone_functions.php
index 17fbe10fac8e7ce9e4293eccd3c14df481e03dfa..e527aea8c638d7bcd1c4e344adf43b7466508e7d 100644 (file)
@@ -23,7 +23,7 @@ function get_user_phones ( $username, $domain )
 
        $result = sql_dbquery( $config['provision_db'], $query );
        if ( !$result ) return null;
-       if (mysql_num_rows($result) < 1 ) return null;
+       if ( @mysql_num_rows($result) < 1 ) return null;
        $rows = array();
        while ( $row = mysql_fetch_assoc( $result ) )
                array_push( $rows, $row['mac'] );
@@ -42,7 +42,7 @@ function get_phone_users ( $macaddress )
 
        $result = sql_dbquery( $config['provision_db'], $query );
        if ( !$result ) return null;
-       if (mysql_num_rows($result) < 1 ) return null;
+       if ( @mysql_num_rows($result) < 1 ) return null;
        $rows = array();
        while ( $row = mysql_fetch_assoc( $result ) )
        {
@@ -108,7 +108,7 @@ function list_phones ( $search = null )
 
        $result = sql_dbquery( $config['provision_db'], $query );
        if ( !$result ) return null;
-       if (mysql_num_rows($result) < 1 ) return null;
+       if ( @mysql_num_rows($result) < 1 ) return null;
        $rows = array();
        while ( $row = mysql_fetch_assoc( $result ) )
        {