list() is a reserved php keyword, changed ApiCommand::list() to ApiCommand::listing()

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2018-03-02 17:22:47 +01:00
parent 594512404f
commit cadb6618ec
18 changed files with 37 additions and 37 deletions

View File

@@ -25,7 +25,7 @@ class Admins extends ApiCommand implements ResourceEntity
* @throws Exception
* @return array count|list
*/
public function list()
public function listing()
{
if ($this->isAdmin() && $this->getUserDetail('change_serversettings') == 1) {
$this->logger()->logAction(ADM_ACTION, LOG_NOTICE, "[API] list admins");

View File

@@ -24,7 +24,7 @@ class Customers extends ApiCommand implements ResourceEntity
* @access admin
* @return array count|list
*/
public function list()
public function listing()
{
if ($this->isAdmin()) {
$this->logger()->logAction(ADM_ACTION, LOG_NOTICE, "[API] list customers");

View File

@@ -25,7 +25,7 @@ class Domains extends ApiCommand implements ResourceEntity
* @throws Exception
* @return array count|list
*/
public function list()
public function listing()
{
if ($this->isAdmin()) {
$this->logger()->logAction(ADM_ACTION, LOG_NOTICE, "[API] list domains");

View File

@@ -25,7 +25,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
* @throws Exception
* @return array count|list
*/
public function list()
public function listing()
{
if ($this->isAdmin()) {
$this->logger()->logAction(ADM_ACTION, LOG_NOTICE, "[API] list fpm-daemons");

View File

@@ -289,7 +289,7 @@ class Ftps extends ApiCommand implements ResourceEntity
if ($this->getUserDetail('customers_see_all') == false) {
// if it's a reseller or an admin who cannot see all customers, we need to check
// whether the database belongs to one of his customers
$json_result = Customers::getLocal($this->getUserData())->list();
$json_result = Customers::getLocal($this->getUserData())->listing();
$custom_list_result = json_decode($json_result, true)['data']['list'];
$customer_ids = array();
foreach ($custom_list_result as $customer) {
@@ -453,7 +453,7 @@ class Ftps extends ApiCommand implements ResourceEntity
* @throws Exception
* @return array count|list
*/
public function list()
public function listing()
{
if ($this->isAdmin()) {
// if we're an admin, list all ftp-users of all the admins customers
@@ -470,7 +470,7 @@ class Ftps extends ApiCommand implements ResourceEntity
json_decode($json_result, true)['data']
);
} else {
$json_result = Customers::getLocal($this->getUserData())->list();
$json_result = Customers::getLocal($this->getUserData())->listing();
$custom_list_result = json_decode($json_result, true)['data']['list'];
}
$customer_ids = array();

View File

@@ -25,7 +25,7 @@ class IpsAndPorts extends ApiCommand implements ResourceEntity
* @throws Exception
* @return array count|list
*/
public function list()
public function listing()
{
if ($this->isAdmin() && ($this->getUserDetail('change_serversettings') || ! empty($this->getUserDetail('ip')))) {
$this->logger()->logAction(ADM_ACTION, LOG_NOTICE, "[API] list ips and ports");

View File

@@ -230,7 +230,7 @@ class Mysqls extends ApiCommand implements ResourceEntity
if ($this->getUserDetail('customers_see_all') != 1) {
// if it's a reseller or an admin who cannot see all customers, we need to check
// whether the database belongs to one of his customers
$json_result = Customers::getLocal($this->getUserData())->list();
$json_result = Customers::getLocal($this->getUserData())->listing();
$custom_list_result = json_decode($json_result, true)['data']['list'];
$customer_ids = array();
foreach ($custom_list_result as $customer) {
@@ -425,7 +425,7 @@ class Mysqls extends ApiCommand implements ResourceEntity
* @throws Exception
* @return array count|list
*/
public function list()
public function listing()
{
$result = array();
$dbserver = $this->getParam('mysql_server', true, - 1);
@@ -444,7 +444,7 @@ class Mysqls extends ApiCommand implements ResourceEntity
json_decode($json_result, true)['data']
);
} else {
$json_result = Customers::getLocal($this->getUserData())->list();
$json_result = Customers::getLocal($this->getUserData())->listing();
$custom_list_result = json_decode($json_result, true)['data']['list'];
}
$customer_ids = array();

View File

@@ -25,7 +25,7 @@ class PhpSettings extends ApiCommand implements ResourceEntity
* @throws Exception
* @return array count|list
*/
public function list()
public function listing()
{
if ($this->isAdmin()) {
$this->logger()->logAction(ADM_ACTION, LOG_NOTICE, "[API] list php-configs");

View File

@@ -367,7 +367,7 @@ class SubDomains extends ApiCommand implements ResourceEntity
if ($this->getUserDetail('customers_see_all') != 1) {
// if it's a reseller or an admin who cannot see all customers, we need to check
// whether the database belongs to one of his customers
$json_result = Customers::getLocal($this->getUserData())->list();
$json_result = Customers::getLocal($this->getUserData())->listing();
$custom_list_result = json_decode($json_result, true)['data']['list'];
$customer_ids = array();
foreach ($custom_list_result as $customer) {
@@ -419,7 +419,7 @@ class SubDomains extends ApiCommand implements ResourceEntity
throw new Exception("Not available yet.", 501);
}
public function list()
public function listing()
{
if ($this->isAdmin()) {
// if we're an admin, list all databases of all the admins customers
@@ -436,7 +436,7 @@ class SubDomains extends ApiCommand implements ResourceEntity
json_decode($json_result, true)['data']
);
} else {
$json_result = Customers::getLocal($this->getUserData())->list();
$json_result = Customers::getLocal($this->getUserData())->listing();
$custom_list_result = json_decode($json_result, true)['data']['list'];
}
$customer_ids = array();