@@ -54,17 +54,17 @@ discard block |
||
| 54 | 54 | parent::init(); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - // Gets the current folder ID from query string and validates it |
|
| 58 | - public function getCurrentFolderID() |
|
| 59 | - { |
|
| 60 | - $folderID = $this->request->getVar('fid'); |
|
| 57 | + // Gets the current folder ID from query string and validates it |
|
| 58 | + public function getCurrentFolderID() |
|
| 59 | + { |
|
| 60 | + $folderID = $this->request->getVar('fid'); |
|
| 61 | 61 | |
| 62 | - if ($folderID) { |
|
| 63 | - return filter_var($folderID, FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE); |
|
| 64 | - } else { |
|
| 65 | - return false; |
|
| 66 | - } |
|
| 67 | - } |
|
| 62 | + if ($folderID) { |
|
| 63 | + return filter_var($folderID, FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE); |
|
| 64 | + } else { |
|
| 65 | + return false; |
|
| 66 | + } |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | 69 | // Returns files/folders for the current folder |
| 70 | 70 | public function Listing($ParentID = null) |
@@ -99,9 +99,9 @@ discard block |
||
| 99 | 99 | // Checks if not at the root folder |
| 100 | 100 | public function NotRoot() |
| 101 | 101 | { |
| 102 | - $currentFolderID = $this->getCurrentFolderID(); |
|
| 102 | + $currentFolderID = $this->getCurrentFolderID(); |
|
| 103 | 103 | |
| 104 | - if ($currentFolderID) { |
|
| 104 | + if ($currentFolderID) { |
|
| 105 | 105 | if (DataObject::get("File", "ID = ".$currentFolderID)) { |
| 106 | 106 | return true; |
| 107 | 107 | } |
@@ -112,9 +112,9 @@ discard block |
||
| 112 | 112 | // Gets current folder from $_GET['fid'] |
| 113 | 113 | public function CurrentFolder() |
| 114 | 114 | { |
| 115 | - $currentFolderID = $this->getCurrentFolderID(); |
|
| 115 | + $currentFolderID = $this->getCurrentFolderID(); |
|
| 116 | 116 | |
| 117 | - if ($currentFolderID) { |
|
| 117 | + if ($currentFolderID) { |
|
| 118 | 118 | return DataObject::get_by_id("File", $currentFolderID); |
| 119 | 119 | } |
| 120 | 120 | return false; |