specifyOpenOffice(); } /** * Set template view to specify open office * * @author KnowledgeTree Team * @param none * @access private * @return boolean */ private function specifyOpenOffice() { $this->openOfficeExeError = true; } private function openOfficeInstalled() { $this->openOfficeExeError = false; } public function getBinary() { $this->soffice = $this->util->getOpenOffice(); } public function binaryChecks() { if($this->util->openOfficeSpecified()) { $this->soffice = $this->util->openOfficeSpecified(); if(file_exists($this->soffice)) return true; else return false; } else { $auto = $this->detectOpenOffice(); if($auto) { $this->soffice = $auto; return true; } return false; } } private function detectOpenOffice() { if(WINDOWS_OS) { $locations = $this->windowsLocations; $bin = "soffice.exe"; } else { $locations = $this->unixLocations; $bin = "soffice"; } foreach ($locations as $loc) { $pathToBinary = $loc.DS.$bin; if(file_exists($pathToBinary)) { return $pathToBinary; } } return false; } /** * Set all silent mode varibles * * @author KnowledgeTree Team * @param none * @access private * @return void */ public function storeSilent() { $this->temp_variables['openOfficeInstalled'] = $this->installed; $this->temp_variables['openOfficeExe'] = $this->soffice; $this->temp_variables['openOfficeExeError'] = $this->openOfficeExeError; $this->temp_variables['openOfficeExeMessage'] = $this->openOfficeExeMessage; return $this->temp_variables; } } ?>