remove some unused functions and migrated some more functions to PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -15,23 +15,24 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* returns true or false whether a
|
||||
* given domain id is the std-subdomain
|
||||
* of a customer
|
||||
/**
|
||||
* returns true or false whether a given domain id
|
||||
* is the std-subdomain of a customer
|
||||
*
|
||||
* @param int domain-id
|
||||
* @param int domain-id
|
||||
*
|
||||
* @return boolean
|
||||
* @return boolean
|
||||
*/
|
||||
function isCustomerStdSubdomain($did = 0)
|
||||
{
|
||||
global $db, $theme;
|
||||
function isCustomerStdSubdomain($did = 0) {
|
||||
|
||||
if($did > 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT `customerid` FROM `".TABLE_PANEL_CUSTOMERS."` WHERE `standardsubdomain` = '".(int)$did."'");
|
||||
if(is_array($result)
|
||||
if ($did > 0) {
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT `customerid` FROM `".TABLE_PANEL_CUSTOMERS."`
|
||||
WHERE `standardsubdomain` = :did
|
||||
");
|
||||
$result = Database::pexecute($result_stmt, array('did' => $did));
|
||||
|
||||
if (is_array($result)
|
||||
&& isset($result['customerid'])
|
||||
&& $result['customerid'] > 0
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user