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:
Michael Kaufmann (d00p)
2013-11-14 08:27:57 +01:00
parent 868b472b98
commit 12800b730d
23 changed files with 326 additions and 500 deletions

View File

@@ -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
) {