performed code formatting
This commit is contained in:
parent
a224bba6b9
commit
8612521559
@ -208,8 +208,7 @@ class Chat {
|
|||||||
* @param int $minLevel
|
* @param int $minLevel
|
||||||
* @param bool|string $prefix
|
* @param bool|string $prefix
|
||||||
*/
|
*/
|
||||||
public function sendExceptionToAdmins(\Exception $exception, $minLevel = AuthenticationManager::AUTH_LEVEL_MODERATOR,
|
public function sendExceptionToAdmins(\Exception $exception, $minLevel = AuthenticationManager::AUTH_LEVEL_MODERATOR, $prefix = true) {
|
||||||
$prefix = true) {
|
|
||||||
$format = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_FORMAT_ERROR);
|
$format = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_FORMAT_ERROR);
|
||||||
$message = $format . "Exception: '{$exception->getMessage()}' ({$exception->getCode()})";
|
$message = $format . "Exception: '{$exception->getMessage()}' ({$exception->getCode()})";
|
||||||
$this->sendMessageToAdmins($message, $minLevel, $prefix);
|
$this->sendMessageToAdmins($message, $minLevel, $prefix);
|
||||||
|
@ -61,8 +61,7 @@ class CommandManager implements CallbackListener {
|
|||||||
* @param string $description
|
* @param string $description
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function registerCommandListener($commandName, CommandListener $listener, $method, $adminCommand = false,
|
public function registerCommandListener($commandName, CommandListener $listener, $method, $adminCommand = false, $description = null) {
|
||||||
$description = null) {
|
|
||||||
if (is_array($commandName)) {
|
if (is_array($commandName)) {
|
||||||
$success = false;
|
$success = false;
|
||||||
foreach ($commandName as $command) {
|
foreach ($commandName as $command) {
|
||||||
|
@ -120,8 +120,7 @@ class AsynchronousFileReader {
|
|||||||
array_push($this->requests, $request);
|
array_push($this->requests, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function postDataTest(Request $request, $url, callable $function, $content, $compression = false,
|
public function postDataTest(Request $request, $url, callable $function, $content, $compression = false, $contentType = 'text/xml; charset=UTF-8;') {
|
||||||
$contentType = 'text/xml; charset=UTF-8;') {
|
|
||||||
|
|
||||||
$headers = array();
|
$headers = array();
|
||||||
array_push($headers, 'Content-Type: ' . $contentType);
|
array_push($headers, 'Content-Type: ' . $contentType);
|
||||||
@ -163,8 +162,7 @@ class AsynchronousFileReader {
|
|||||||
* @param bool $compression
|
* @param bool $compression
|
||||||
* @param string $contentType
|
* @param string $contentType
|
||||||
*/
|
*/
|
||||||
public function postData($url, callable $function, $content, $compression = false,
|
public function postData($url, callable $function, $content, $compression = false, $contentType = 'text/xml; charset=UTF-8;') {
|
||||||
$contentType = 'text/xml; charset=UTF-8;') {
|
|
||||||
|
|
||||||
$headers = array();
|
$headers = array();
|
||||||
array_push($headers, 'Content-Type: ' . $contentType);
|
array_push($headers, 'Content-Type: ' . $contentType);
|
||||||
|
@ -68,8 +68,7 @@ abstract class BackupUtil {
|
|||||||
* @param array $baseFileNames
|
* @param array $baseFileNames
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private static function zipDirectory(\ZipArchive &$zipArchive, $folderName, $prefixLength, array $excludes = array(),
|
private static function zipDirectory(\ZipArchive &$zipArchive, $folderName, $prefixLength, array $excludes = array(), array $baseFileNames = array()) {
|
||||||
array $baseFileNames = array()) {
|
|
||||||
$folderHandle = opendir($folderName);
|
$folderHandle = opendir($folderName);
|
||||||
if (!is_resource($folderHandle)) {
|
if (!is_resource($folderHandle)) {
|
||||||
Logger::logError("Couldn't open folder '{$folderName}' for backup!");
|
Logger::logError("Couldn't open folder '{$folderName}' for backup!");
|
||||||
|
@ -271,8 +271,7 @@ class ManiaExchangeManager {
|
|||||||
* @deprecated
|
* @deprecated
|
||||||
* @see \ManiaControl\ManiaExchange\ManiaExchangeManager::fetchMapsAsync()
|
* @see \ManiaControl\ManiaExchange\ManiaExchangeManager::fetchMapsAsync()
|
||||||
*/
|
*/
|
||||||
public function getMapsAsync(callable $function, $name = '', $author = '', $env = '', $maxMapsReturned = 100,
|
public function getMapsAsync(callable $function, $name = '', $author = '', $env = '', $maxMapsReturned = 100, $searchOrder = self::SEARCH_ORDER_UPDATED_NEWEST) {
|
||||||
$searchOrder = self::SEARCH_ORDER_UPDATED_NEWEST) {
|
|
||||||
$this->fetchMapsAsync($function, $name, $author, $env, $maxMapsReturned, $searchOrder);
|
$this->fetchMapsAsync($function, $name, $author, $env, $maxMapsReturned, $searchOrder);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -287,8 +286,7 @@ class ManiaExchangeManager {
|
|||||||
* @param int $maxMapsReturned
|
* @param int $maxMapsReturned
|
||||||
* @param int $searchOrder
|
* @param int $searchOrder
|
||||||
*/
|
*/
|
||||||
public function fetchMapsAsync(callable $function, $name = '', $author = '', $env = '', $maxMapsReturned = 100,
|
public function fetchMapsAsync(callable $function, $name = '', $author = '', $env = '', $maxMapsReturned = 100, $searchOrder = self::SEARCH_ORDER_UPDATED_NEWEST) {
|
||||||
$searchOrder = self::SEARCH_ORDER_UPDATED_NEWEST) {
|
|
||||||
// TODO: remove $env because it's not really used?
|
// TODO: remove $env because it's not really used?
|
||||||
|
|
||||||
// Get Title Id
|
// Get Title Id
|
||||||
|
@ -179,8 +179,7 @@ class PlayerActions {
|
|||||||
* @param int $spectatorState
|
* @param int $spectatorState
|
||||||
* @param bool $releaseSlot
|
* @param bool $releaseSlot
|
||||||
*/
|
*/
|
||||||
public function forcePlayerToSpectator($adminLogin, $targetLogin, $spectatorState = self::SPECTATOR_BUT_KEEP_SELECTABLE,
|
public function forcePlayerToSpectator($adminLogin, $targetLogin, $spectatorState = self::SPECTATOR_BUT_KEEP_SELECTABLE, $releaseSlot = true) {
|
||||||
$releaseSlot = true) {
|
|
||||||
$admin = $this->maniaControl->getPlayerManager()->getPlayer($adminLogin);
|
$admin = $this->maniaControl->getPlayerManager()->getPlayer($adminLogin);
|
||||||
if (!$this->maniaControl->getAuthenticationManager()->checkPermission($admin, self::SETTING_PERMISSION_FORCE_PLAYER_SPEC)
|
if (!$this->maniaControl->getAuthenticationManager()->checkPermission($admin, self::SETTING_PERMISSION_FORCE_PLAYER_SPEC)
|
||||||
) {
|
) {
|
||||||
|
Loading…
Reference in New Issue
Block a user