Skip to content
Browse files

Throw an error if MTV is loaded twice, added a base template for admi…

…n screens
  • Loading branch information...
1 parent 7ab5d8d commit 3ad51c7663accaaa29fac6d510ad8de0806c4c6a @ryanmark ryanmark committed Mar 3, 2012
Showing with 17 additions and 4 deletions.
  1. +7 −4 mtv.php
  2. +10 −0 wp/templates/admin/base.html
View
11 mtv.php
@@ -4,9 +4,11 @@
require 'Twig/Autoloader.php';
-use Twig_Autoloader, Twig_Environment, Twig_Loader_Filesystem;
-
-use mtv\http;
+use Twig_Autoloader,
+ Twig_Environment,
+ Twig_Loader_Filesystem,
+ Exception,
+ mtv\http;
define("MTV_VERSION", "1.0.0");
@@ -84,7 +86,8 @@ function load( $apps ) {
'auto_reload' => true
));
}
- }
+ } else
+ throw new Exception("MTV is already loaded!");
# now that we have a template engine, load some goodies
foreach ( $apps as $name ) {
View
10 wp/templates/admin/base.html
@@ -0,0 +1,10 @@
+<div class="wrap nosubsub">
+ <div id="icon-edit" class="icon32 icon32-posts-post"><br></div>
+ <h2>{% block headline %}Wordpress{% endblock %}</h2>
+
+ <div id="ajax-response"></div>
+
+ {% block body %}{% endblock %}
+
+</div>
+

0 comments on commit 3ad51c7

Please sign in to comment.
Something went wrong with that request. Please try again.