Commit 23a3796d381538d1e0d928719797804aecef8092
1 parent
6c7e5e46
Undefined Fixed
Committed by: Jarrett Jordaan Reviewed by: Prince Mbekwa
Showing
1 changed file
with
25 additions
and
25 deletions
setup/wizard/lib/services/windowsOpenOffice.php
| ... | ... | @@ -49,7 +49,7 @@ class windowsOpenOffice extends windowsService { |
| 49 | 49 | * @var string |
| 50 | 50 | */ |
| 51 | 51 | private $path; |
| 52 | - | |
| 52 | + | |
| 53 | 53 | /** |
| 54 | 54 | * Web server |
| 55 | 55 | * |
| ... | ... | @@ -58,7 +58,7 @@ class windowsOpenOffice extends windowsService { |
| 58 | 58 | * @var string |
| 59 | 59 | */ |
| 60 | 60 | private $host; |
| 61 | - | |
| 61 | + | |
| 62 | 62 | /** |
| 63 | 63 | * Path to temp pid file |
| 64 | 64 | * |
| ... | ... | @@ -67,7 +67,7 @@ class windowsOpenOffice extends windowsService { |
| 67 | 67 | * @var string |
| 68 | 68 | */ |
| 69 | 69 | private $pidFile; |
| 70 | - | |
| 70 | + | |
| 71 | 71 | /** |
| 72 | 72 | * Web server Port |
| 73 | 73 | * |
| ... | ... | @@ -76,7 +76,7 @@ class windowsOpenOffice extends windowsService { |
| 76 | 76 | * @var string |
| 77 | 77 | */ |
| 78 | 78 | private $port; |
| 79 | - | |
| 79 | + | |
| 80 | 80 | /** |
| 81 | 81 | * Web server |
| 82 | 82 | * |
| ... | ... | @@ -85,7 +85,7 @@ class windowsOpenOffice extends windowsService { |
| 85 | 85 | * @var string |
| 86 | 86 | */ |
| 87 | 87 | private $bin; |
| 88 | - | |
| 88 | + | |
| 89 | 89 | /** |
| 90 | 90 | * Office executable name |
| 91 | 91 | * |
| ... | ... | @@ -103,7 +103,7 @@ class windowsOpenOffice extends windowsService { |
| 103 | 103 | * @var string |
| 104 | 104 | */ |
| 105 | 105 | private $log; |
| 106 | - | |
| 106 | + | |
| 107 | 107 | /** |
| 108 | 108 | * Open office options |
| 109 | 109 | * |
| ... | ... | @@ -112,7 +112,7 @@ class windowsOpenOffice extends windowsService { |
| 112 | 112 | * @var string |
| 113 | 113 | */ |
| 114 | 114 | private $options; |
| 115 | - | |
| 115 | + | |
| 116 | 116 | /** |
| 117 | 117 | * Path to win service |
| 118 | 118 | * |
| ... | ... | @@ -129,9 +129,9 @@ class windowsOpenOffice extends windowsService { |
| 129 | 129 | * @access public |
| 130 | 130 | * @param none |
| 131 | 131 | * @return string |
| 132 | - */ | |
| 132 | + */ | |
| 133 | 133 | public $name = "KTOpenOffice"; |
| 134 | - | |
| 134 | + | |
| 135 | 135 | /** |
| 136 | 136 | * Load defaults needed by service |
| 137 | 137 | * |
| ... | ... | @@ -153,35 +153,35 @@ class windowsOpenOffice extends windowsService { |
| 153 | 153 | private function setPort($port = "8100") { |
| 154 | 154 | $this->port = $port; |
| 155 | 155 | } |
| 156 | - | |
| 156 | + | |
| 157 | 157 | public function getPort() { |
| 158 | 158 | return $this->port; |
| 159 | 159 | } |
| 160 | - | |
| 160 | + | |
| 161 | 161 | private function setHost($host = "127.0.0.1") { |
| 162 | 162 | $this->host = $host; |
| 163 | 163 | } |
| 164 | - | |
| 164 | + | |
| 165 | 165 | public function getHost() { |
| 166 | 166 | return $this->host; |
| 167 | 167 | } |
| 168 | - | |
| 168 | + | |
| 169 | 169 | private function setLog($log = "openoffice.log") { |
| 170 | 170 | $this->log = $log; |
| 171 | 171 | } |
| 172 | - | |
| 172 | + | |
| 173 | 173 | public function getLog() { |
| 174 | 174 | return $this->log; |
| 175 | 175 | } |
| 176 | - | |
| 176 | + | |
| 177 | 177 | private function setBin($bin) { |
| 178 | 178 | $this->bin = $bin; |
| 179 | 179 | } |
| 180 | - | |
| 180 | + | |
| 181 | 181 | public function getBin() { |
| 182 | 182 | return $this->bin; |
| 183 | 183 | } |
| 184 | - | |
| 184 | + | |
| 185 | 185 | private function setWinservice($winservice = "winserv.exe") { |
| 186 | 186 | if(file_exists(SYS_BIN_DIR . $winservice)) { |
| 187 | 187 | $this->winservice = SYS_BIN_DIR . $winservice; |
| ... | ... | @@ -189,22 +189,22 @@ class windowsOpenOffice extends windowsService { |
| 189 | 189 | $this->winservice = SYS_BIN_DIR . "win32" . DS. $winservice; |
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | - | |
| 192 | + | |
| 193 | 193 | public function getWinservice() { |
| 194 | 194 | return $this->winservice; |
| 195 | 195 | } |
| 196 | - | |
| 196 | + | |
| 197 | 197 | public function getOption() { |
| 198 | 198 | return $this->options; |
| 199 | 199 | } |
| 200 | - | |
| 200 | + | |
| 201 | 201 | private function writeOfficeInstall($cmd) { |
| 202 | 202 | $officeInstallFile = SYS_VAR_DIR."bin".DS."officeinstall.bat"; |
| 203 | 203 | $fp = fopen($officeInstallFile, "w+"); |
| 204 | 204 | fwrite($fp, $cmd); |
| 205 | 205 | fclose($fp); |
| 206 | 206 | } |
| 207 | - | |
| 207 | + | |
| 208 | 208 | public function install() { |
| 209 | 209 | $status = $this->status(); |
| 210 | 210 | if($status == '') { |
| ... | ... | @@ -217,7 +217,7 @@ class windowsOpenOffice extends windowsService { |
| 217 | 217 | } |
| 218 | 218 | $this->writeOfficeInstall($cmd); |
| 219 | 219 | //$response = $this->util->pexec($cmd); |
| 220 | - return $response; | |
| 220 | +// return $response; | |
| 221 | 221 | } |
| 222 | 222 | return $status; |
| 223 | 223 | } |
| ... | ... | @@ -225,7 +225,7 @@ class windowsOpenOffice extends windowsService { |
| 225 | 225 | return $status; |
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | - | |
| 228 | + | |
| 229 | 229 | /** |
| 230 | 230 | * Retrieve Status Service |
| 231 | 231 | * |
| ... | ... | @@ -241,10 +241,10 @@ class windowsOpenOffice extends windowsService { |
| 241 | 241 | $state = preg_replace('/^STATE *\: *\d */', '', trim($response['out'][3])); // Status store in third key |
| 242 | 242 | return $state; |
| 243 | 243 | } |
| 244 | - | |
| 244 | + | |
| 245 | 245 | return ''; |
| 246 | 246 | } |
| 247 | - | |
| 247 | + | |
| 248 | 248 | /** |
| 249 | 249 | * Start Service |
| 250 | 250 | * | ... | ... |