diff --git a/addons/Core/Core.inc b/addons/Core/Core.inc index 5bc66f3..ecfe1ec 100644 --- a/addons/Core/Core.inc +++ b/addons/Core/Core.inc @@ -1,6 +1,6 @@ comicpress->save(); + + $this->info("ComicPress configuration updated."); } } diff --git a/classes/ComicPressAddon.inc b/classes/ComicPressAddon.inc new file mode 100644 index 0000000..ab9e4c0 --- /dev/null +++ b/classes/ComicPressAddon.inc @@ -0,0 +1,27 @@ + array(), + 'warn' => array(), + 'error' => array() + ); + + function info($message) { $this->messages['info'][] = $message; } + function warn($message) { $this->messages['warn'][] = $message; } + function error($message) { $this->messages['error'][] = $message; } + + function display_messages() { + foreach ($this->messages as $type => $messages) { + if (!empty($messages)) { + echo '
' . $message . '
'; + } + echo '