/** * Returns TRUE if the YouTube EDU header is enabled. * * @return boolean TRUE if YouTube EDU is enabled. * @throws Engine_Exception */ public function get_youtube_edu_enabled() { clearos_profile(__METHOD__, __LINE__); $file = new File(self::FILE_ECAP_SQUID_CONFIG, TRUE); $value = trim($file->lookup_value("/^ecap_enable\\s*/i")); return preg_match('/off/', $value) ? FALSE : TRUE; }
/** * Returns parameter from PPTP configuration file. * * @param string $parameter parameter in options file * * @access private * @return void */ protected function _get_config_parameter($parameter) { clearos_profile(__METHOD__, __LINE__); $value = ''; try { $file = new File(self::FILE_CONFIG); $value = $file->lookup_value("/^{$parameter}\\s+/i"); } catch (File_No_Match_Exception $e) { return; } catch (Exception $e) { throw new Engine_Exception($e->get_message()); } return $value; }
/** * Get the notification email. * * @return String notification email * @throws Engine_Exception */ function get_email() { clearos_profile(__METHOD__, __LINE__); $file = new File(self::FILE_APC_CONTROL, TRUE); try { return $file->lookup_value('/^export SYSADMIN=/'); } catch (Exception $e) { throw new Engine_Exception(clearos_exception_message($e), CLEAROS_ERROR); } }