X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fnewnotice.php;h=049d7c322982aadfa3cff3f8d51eeb16d78b1e5c;hb=b2664e1ae2e2cf66585cdd8696d88efdd053eb3b;hp=f773fc880e5328ae1f232252c84e8d79d6703eb9;hpb=c78772b2748f70acc8158b665218fe53b277a031;p=quix0rs-gnu-social.git diff --git a/actions/newnotice.php b/actions/newnotice.php index f773fc880e..049d7c3229 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -91,8 +91,8 @@ class NewnoticeAction extends Action // is losts when size is exceeded if (empty($_POST) && $_SERVER['CONTENT_LENGTH']) { $this->clientError(sprintf(_('The server was unable to handle ' . - 'that much POST data (%s bytes) due to its current configuration.'), - $_SERVER['CONTENT_LENGTH'])); + 'that much POST data (%s bytes) due to its current configuration.'), + $_SERVER['CONTENT_LENGTH'])); } parent::handle($args); @@ -130,7 +130,7 @@ class NewnoticeAction extends Action $hint = ''; } $this->clientError(sprintf( - _('%s is not a supported filetype on this server.'), $filetype) . $hint); + _('%s is not a supported filetype on this server.'), $filetype) . $hint); } function isRespectsQuota($user) { @@ -191,37 +191,37 @@ class NewnoticeAction extends Action if (isset($_FILES['attach']['error'])) { switch ($_FILES['attach']['error']) { - case UPLOAD_ERR_NO_FILE: - // no file uploaded, nothing to do - break; + case UPLOAD_ERR_NO_FILE: + // no file uploaded, nothing to do + break; - case UPLOAD_ERR_OK: - $mimetype = $this->getUploadedFileType(); - if (!$this->isRespectsQuota($user)) { - die('clientError() should trigger an exception before reaching here.'); - } - break; + case UPLOAD_ERR_OK: + $mimetype = $this->getUploadedFileType(); + if (!$this->isRespectsQuota($user)) { + die('clientError() should trigger an exception before reaching here.'); + } + break; - case UPLOAD_ERR_INI_SIZE: - $this->clientError(_('The uploaded file exceeds the upload_max_filesize directive in php.ini.')); + case UPLOAD_ERR_INI_SIZE: + $this->clientError(_('The uploaded file exceeds the upload_max_filesize directive in php.ini.')); - case UPLOAD_ERR_FORM_SIZE: - $this->clientError(_('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.')); + case UPLOAD_ERR_FORM_SIZE: + $this->clientError(_('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.')); - case UPLOAD_ERR_PARTIAL: - $this->clientError(_('The uploaded file was only partially uploaded.')); + case UPLOAD_ERR_PARTIAL: + $this->clientError(_('The uploaded file was only partially uploaded.')); - case UPLOAD_ERR_NO_TMP_DIR: - $this->clientError(_('Missing a temporary folder.')); + case UPLOAD_ERR_NO_TMP_DIR: + $this->clientError(_('Missing a temporary folder.')); - case UPLOAD_ERR_CANT_WRITE: - $this->clientError(_('Failed to write file to disk.')); + case UPLOAD_ERR_CANT_WRITE: + $this->clientError(_('Failed to write file to disk.')); - case UPLOAD_ERR_EXTENSION: - $this->clientError(_('File upload stopped by extension.')); + case UPLOAD_ERR_EXTENSION: + $this->clientError(_('File upload stopped by extension.')); - default: - die('Should never reach here.'); + default: + die('Should never reach here.'); } } @@ -234,7 +234,7 @@ class NewnoticeAction extends Action $fileRecord = $this->storeFile($filename, $mimetype); $fileurl = common_local_url('attachment', - array('attachment' => $fileRecord->id)); + array('attachment' => $fileRecord->id)); // not sure this is necessary -- Zach $this->maybeAddRedir($fileRecord->id, $fileurl); @@ -369,7 +369,7 @@ class NewnoticeAction extends Action File_to_post::processNew($filerec->id, $notice->id); $this->maybeAddRedir($filerec->id, - common_local_url('file', array('notice' => $notice->id))); + common_local_url('file', array('notice' => $notice->id))); } /**