diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-08-13 00:10:04 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-08-13 00:13:33 +0200 |
commit | 0c954fc204a182b70e5a7bc22a65c61869b488a6 (patch) | |
tree | b7d87a3ff1fec0b201f431710d103f91ccac0a22 | |
parent | 73ab75b3e0b5da26203e275c6641eacef0531729 (diff) |
Coding style fixes
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | application/controllers/file.php | 7 | ||||
-rw-r--r-- | application/models/mfile.php | 8 |
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'])); } |