summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/controllers/file.php7
-rw-r--r--application/models/mfile.php8
2 files changed, 7 insertions, 8 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index e931e4078..573d1a5b3 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -36,7 +36,6 @@ class File extends CI_Controller {
$this->var->latest_client = trim(file_get_contents(FCPATH.'data/client/latest'));
}
-
if (is_cli_client()) {
$this->var->view_dir = "file_plaintext";
} else {
@@ -63,7 +62,7 @@ class File extends CI_Controller {
}
// Try to guess what the user would like to do.
$id = $this->uri->segment(1);
- if(!empty($_FILES)) {
+ if (!empty($_FILES)) {
$this->do_upload();
} elseif ($id != "file" && $this->mfile->id_exists($id)) {
$this->_download();
@@ -331,7 +330,7 @@ class File extends CI_Controller {
$this->data['client_link_deb'] = base_url().'data/client/deb/';
$this->data['client_link_slackware'] = base_url().'data/client/slackware/';
- if(preg_match('#^https?://(.*?)/.*$#', site_url(), $matches) === 1) {
+ if (preg_match('#^https?://(.*?)/.*$#', site_url(), $matches) === 1) {
$this->data["domain"] = $matches[1];
} else {
$this->data["domain"] = "unknown domain";
@@ -589,7 +588,7 @@ class File extends CI_Controller {
$filesize = strlen($content);
$filename = "stdin";
- if(!$content) {
+ if (!$content) {
$this->output->set_status_header(400);
$this->data["msg"] = "Nothing was pasted, content is empty.";
$this->load->view('header', $this->data);
diff --git a/application/models/mfile.php b/application/models/mfile.php
index aaeebccaf..fabce7b94 100644
--- a/application/models/mfile.php
+++ b/application/models/mfile.php
@@ -43,7 +43,7 @@ class Mfile extends CI_Model {
function id_exists($id)
{
- if(!$id) {
+ if (!$id) {
return false;
}
@@ -314,7 +314,7 @@ class Mfile extends CI_Model {
$filedata = $this->get_filedata($id);
$userid = $this->muser->get_userid();
- if(!$this->id_exists($id)) {
+ if (!$this->id_exists($id)) {
return false;
}
@@ -326,11 +326,11 @@ class Mfile extends CI_Model {
LIMIT 1';
$this->db->query($sql, array($id, $userid));
- if($this->id_exists($id)) {
+ if ($this->id_exists($id)) {
return false;
}
- if($this->unused_file($filedata['hash'])) {
+ if ($this->unused_file($filedata['hash'])) {
unlink($this->file($filedata['hash']));
@rmdir($this->folder($filedata['hash']));
}