diff --git a/owa_base.php b/owa_base.php index a51957e90..4bfc06b2a 100644 --- a/owa_base.php +++ b/owa_base.php @@ -90,20 +90,25 @@ function getMsg($code, $substitutions = []) { static $_owa_messages; + $msg = array(); + if (empty($_owa_messages)) { require_once(OWA_DIR.'conf/messages.php'); } + + if ( $code && array_key_exists( $code, $_owa_messages ) ) { + + $msg = $_owa_messages[$code]; - $msg = $_owa_messages[$code]; - - if (isset($msg['headline'])) { - $msg['headline'] = vsprintf($msg['headline'], $substitutions['headline']); - } - - if (isset($msg['message'])) { - $msg['message'] = vsprintf($msg['message'], $substitutions['message']); - } - + if (isset($msg['headline'])) { + $msg['headline'] = vsprintf($msg['headline'], $substitutions['headline']); + } + + if (isset($msg['message'])) { + $msg['message'] = vsprintf($msg['message'], $substitutions['message']); + } + } + return $msg; } diff --git a/owa_wp.php b/owa_wp.php deleted file mode 100644 index 3b9761fda..000000000 --- a/owa_wp.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @copyright Copyright © 2006 Peter Adams - * @license http://www.gnu.org/copyleft/gpl.html GPL v2.0 - * @category owa - * @package owa - * @version $Revision$ - * @since owa 1.0.0 - */ -class owa_wp extends owa_client { - - /** - * Constructor - * - * @return owa_wp - */ - - function __construct($config = null) { - - ob_start(); - - return parent::__construct($config); - - } -} - -?> \ No newline at end of file