removed unused local variables
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -103,7 +103,6 @@ class Admins extends ApiCommand implements ResourceEntity
|
||||
$custom_notes = $this->getParam('custom_notes', true, '');
|
||||
$custom_notes_show = $this->getParam('custom_notes_show', true, 0);
|
||||
$password = $this->getParam('admin_password', true, '');
|
||||
$sendpassword = $this->getParam('sendpassword', true, 0);
|
||||
$loginname = $this->getParam('new_loginname', true, '');
|
||||
|
||||
$diskspace = $this->getUlParam('diskspace', 'diskspace_ul', true, 0);
|
||||
|
||||
@@ -710,7 +710,6 @@ class Customers extends ApiCommand implements ResourceEntity
|
||||
$mysqls = $this->getUlParam('mysqls', 'mysqls_ul', true, $result['mysqls']);
|
||||
$createstdsubdomain = $this->getParam('createstdsubdomain', true, 0);
|
||||
$password = $this->getParam('new_customer_password', true, '');
|
||||
$sendpassword = $this->getParam('sendpassword', true, 0);
|
||||
$phpenabled = $this->getParam('phpenabled', true, $result['phpenabled']);
|
||||
$allowed_phpconfigs = $this->getParam('allowed_phpconfigs', true, json_decode($result['allowed_phpconfigs'], true));
|
||||
$perlenabled = $this->getParam('perlenabled', true, $result['perlenabled']);
|
||||
@@ -1396,7 +1395,7 @@ class Customers extends ApiCommand implements ResourceEntity
|
||||
if ($tickets !== false && isset($tickets[0])) {
|
||||
foreach ($tickets as $ticket) {
|
||||
$now = time();
|
||||
$mainticket = ticket::getInstanceOf($userinfo, (int) $ticket);
|
||||
$mainticket = ticket::getInstanceOf($result, (int) $ticket);
|
||||
$mainticket->Set('lastchange', $now, true, true);
|
||||
$mainticket->Set('lastreplier', '1', true, true);
|
||||
$mainticket->Set('status', '3', true, true);
|
||||
|
||||
@@ -786,7 +786,6 @@ class Domains extends ApiCommand implements ResourceEntity
|
||||
$id = $result['id'];
|
||||
|
||||
// optional parameters
|
||||
$p_domain = $this->getParam('domain', true, $result['domain']);
|
||||
$p_ipandports = $this->getParam('ipandport', true, array());
|
||||
$customerid = intval($this->getParam('customerid', true, $result['customerid']));
|
||||
$adminid = intval($this->getParam('adminid', true, $result['adminid']));
|
||||
@@ -1081,15 +1080,12 @@ class Domains extends ApiCommand implements ResourceEntity
|
||||
Database::pexecute($ipsresult_stmt, array(
|
||||
'id' => $result['id']
|
||||
));
|
||||
$usedips = array();
|
||||
while ($ipsresultrow = $ipsresult_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$ipandports[] = $ipsresultrow['id_ipandports'];
|
||||
}
|
||||
}
|
||||
|
||||
if (Settings::Get('system.use_ssl') == '1' && ! empty($p_ssl_ipandports)) {
|
||||
$ssl = 1; // if ssl is set and != 0, it can only be 1
|
||||
|
||||
$ssl_ipandports = array();
|
||||
if (! empty($p_ssl_ipandports) && ! is_array($p_ssl_ipandports)) {
|
||||
$p_ssl_ipandports = unserialize($p_ssl_ipandports);
|
||||
|
||||
@@ -63,7 +63,7 @@ class Froxlor extends ApiCommand
|
||||
// anzeige über version-status mit ggfls. formular
|
||||
// zum update schritt #1 -> download
|
||||
if ($isnewerversion == 1) {
|
||||
$text = 'There is a newer version available: "' . $_version . '" (Your current version is: ' . $this->version . ')';
|
||||
$text = 'There is a newer version available: "' . $_version . '" (Your current version is: ' . $version_label . ')';
|
||||
return $this->response(200, "successfull", array(
|
||||
'message' => $text,
|
||||
'link' => $version_link,
|
||||
@@ -217,7 +217,7 @@ class Froxlor extends ApiCommand
|
||||
// create RecursiveIteratorIterator
|
||||
$its = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path));
|
||||
// check every file
|
||||
foreach ($its as $fullFileName => $it) {
|
||||
foreach ($its as $it) {
|
||||
// does it match the Filename pattern?
|
||||
$matches = array();
|
||||
if (preg_match("/^class\.(.+)\.php$/i", $it->getFilename(), $matches)) {
|
||||
|
||||
@@ -117,7 +117,7 @@ class Ftps extends ApiCommand implements ResourceEntity
|
||||
), true, true);
|
||||
|
||||
if ($ftpdomain_check && $ftpdomain_check['domain'] != $ftpdomain) {
|
||||
standard_error('maindomainnonexist', $domain, true);
|
||||
standard_error('maindomainnonexist', $ftpdomain, true);
|
||||
}
|
||||
$username = $ftpusername . "@" . $ftpdomain;
|
||||
} else {
|
||||
@@ -152,7 +152,6 @@ class Ftps extends ApiCommand implements ResourceEntity
|
||||
"shell" => $shell
|
||||
);
|
||||
Database::pexecute($stmt, $params, true, true);
|
||||
$ftp_userid = Database::lastInsertId();
|
||||
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT `bytes_in_used` FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = :name
|
||||
@@ -360,8 +359,7 @@ class Ftps extends ApiCommand implements ResourceEntity
|
||||
} else {
|
||||
$shell = "/bin/false";
|
||||
}
|
||||
|
||||
$params = array();
|
||||
|
||||
// get needed customer info to reduce the ftp-user-counter by one
|
||||
if ($this->isAdmin()) {
|
||||
// get customer id
|
||||
@@ -461,7 +459,7 @@ class Ftps extends ApiCommand implements ResourceEntity
|
||||
$customerid = $this->getParam('customerid', true, 0);
|
||||
$loginname = $this->getParam('loginname', true, '');
|
||||
|
||||
if (! empty($customer_id) || ! empty($loginname)) {
|
||||
if (! empty($customerid) || ! empty($loginname)) {
|
||||
$json_result = Customers::getLocal($this->getUserData(), array(
|
||||
'id' => $customerid,
|
||||
'loginname' => $loginname
|
||||
|
||||
@@ -39,8 +39,6 @@ class PhpSettings extends ApiCommand implements ResourceEntity
|
||||
|
||||
$phpconfigs = array();
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$domainresult = false;
|
||||
$query_params = array(
|
||||
'id' => $row['id']
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user