Index: branches/2.0singleton/bin/module_maker/skel/admin.php
===================================================================
--- branches/2.0singleton/bin/module_maker/skel/admin.php	(revision 122)
+++ branches/2.0singleton/bin/module_maker/skel/admin.php	(revision 127)
@@ -11,5 +11,5 @@
 $auth->requireLogin();
 // $auth->requireAccessClearance(ZONE_ADMIN_%NAME_UPPER%);
-App::sslOn();
+$app->sslOn();
 
 require_once 'codebase/lib/PageNumbers.inc.php';
@@ -41,6 +41,6 @@
 
 // Search limiters retain their values between page requests.
-App::carryQuery('search_query');
-App::carryQuery('filter_<##>');
+$app->carryQuery('search_query');
+$app->carryQuery('filter_<##>');
 %ADMIN_UPLOAD_CONFIG%
 /******************************************************************************
@@ -51,5 +51,5 @@
 // allows us to remember which page we came from so we can go back there.
 if (getFormData('boomerang', false) && isset($_SERVER['HTTP_REFERER'])) {
-    App::setBoomerangURL($_SERVER['HTTP_REFERER'], '%NAME_PLURAL%');
+    $app->setBoomerangURL($_SERVER['HTTP_REFERER'], '%NAME_PLURAL%');
 }
 
@@ -81,10 +81,10 @@
 //     $auth->requireAccessClearance(ZONE_ADMIN_%NAME_UPPER%_FUNC_DELETE);
     deleteRecord(getFormData('%PRIMARY_KEY%'));%ADMIN_UPLOAD_DEL%
-    if (App::validBoomerangURL('%NAME_PLURAL%')) {
+    if ($app->validBoomerangURL('%NAME_PLURAL%')) {
         // Display boomerang page.
-        App::dieBoomerangURL('%NAME_PLURAL%');
+        $app->dieBoomerangURL('%NAME_PLURAL%');
     }
     // Display default page.
-    App::dieURL($_SERVER['PHP_SELF']);
+    $app->dieURL($_SERVER['PHP_SELF']);
     break;
 
@@ -92,10 +92,10 @@
 //     $auth->requireAccessClearance(ZONE_ADMIN_%NAME_UPPER%_FUNC_ADD);
     if (getFormdata('cancel', false)) {
-        if (App::validBoomerangURL('%NAME_PLURAL%')) {
+        if ($app->validBoomerangURL('%NAME_PLURAL%')) {
             // Display boomerang page.
-            App::dieBoomerangURL('%NAME_PLURAL%');
+            $app->dieBoomerangURL('%NAME_PLURAL%');
         }
         // Display default page.
-        App::dieURL($_SERVER['PHP_SELF']);
+        $app->dieURL($_SERVER['PHP_SELF']);
     }
     validateInput();
@@ -109,11 +109,11 @@
         if (getFormdata('repeat', false)) {
             // Display function again.
-            App::dieURL($_SERVER['PHP_SELF'] . '?op=add');
-        } else if (App::validBoomerangURL('%NAME_PLURAL%')) {
+            $app->dieURL($_SERVER['PHP_SELF'] . '?op=add');
+        } else if ($app->validBoomerangURL('%NAME_PLURAL%')) {
             // Display boomerang page.
-            App::dieBoomerangURL('%NAME_PLURAL%');
+            $app->dieBoomerangURL('%NAME_PLURAL%');
         }
         // Display default page.
-        App::dieURL($_SERVER['PHP_SELF']);
+        $app->dieURL($_SERVER['PHP_SELF']);
     }
     break;
@@ -122,6 +122,6 @@
 //     $auth->requireAccessClearance(ZONE_ADMIN_%NAME_UPPER%_FUNC_EDIT);
     if (getFormdata('reset', false)) {
-        App::raiseMsg(_("Saved values have been reloaded."), MSG_NOTICE, __FILE__, __LINE__);
-        App::dieURL($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . getFormData('%PRIMARY_KEY%'));
+        $app->raiseMsg(_("Saved values have been reloaded."), MSG_NOTICE, __FILE__, __LINE__);
+        $app->dieURL($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . getFormData('%PRIMARY_KEY%'));
     }
     if (getFormdata('cancel', false)) {
@@ -129,10 +129,10 @@
         $lock->select('%DB_TBL%', '%PRIMARY_KEY%', getFormData('%PRIMARY_KEY%'));
         $lock->remove();
-        if (App::validBoomerangURL('%NAME_PLURAL%')) {
+        if ($app->validBoomerangURL('%NAME_PLURAL%')) {
             // Display boomerang page.
-            App::dieBoomerangURL('%NAME_PLURAL%');
+            $app->dieBoomerangURL('%NAME_PLURAL%');
         }
         // Display default page.
-        App::dieURL($_SERVER['PHP_SELF']);
+        $app->dieURL($_SERVER['PHP_SELF']);
     }
     validateInput();
@@ -148,14 +148,14 @@
             $qid = DB::query("SELECT %PRIMARY_KEY% FROM %DB_TBL% WHERE %PRIMARY_KEY% > '" . DB::escapeString(getFormData('%PRIMARY_KEY%')) . "' ORDER BY %PRIMARY_KEY% ASC LIMIT 1");
             if (list($next_id) = mysql_fetch_row($qid)) {
-                App::dieURL($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . $next_id);
+                $app->dieURL($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . $next_id);
             } else {
-                App::raiseMsg(_("Cannot edit next, the end of the list was reached"), MSG_NOTICE, __FILE__, __LINE__);
+                $app->raiseMsg(_("Cannot edit next, the end of the list was reached"), MSG_NOTICE, __FILE__, __LINE__);
             }
-        } else if (App::validBoomerangURL('%NAME_PLURAL%')) {
+        } else if ($app->validBoomerangURL('%NAME_PLURAL%')) {
             // Display boomerang page.
-            App::dieBoomerangURL('%NAME_PLURAL%');
+            $app->dieBoomerangURL('%NAME_PLURAL%');
         }
         // Display default page.
-        App::dieURL($_SERVER['PHP_SELF']);
+        $app->dieURL($_SERVER['PHP_SELF']);
     }
     break;
@@ -164,5 +164,5 @@
 //     $auth->requireAccessClearance(ZONE_ADMIN_PROGRAMS_FUNC_REORDER);
     updateRank(getFormData('rank'));
-    App::dieURL($_SERVER['PHP_SELF']);
+    $app->dieURL($_SERVER['PHP_SELF']);
     break;
 
@@ -220,7 +220,7 @@
     ");
     if (!$frm = mysql_fetch_assoc($qid)) {
-        App::logMsg('Could not find record with %PRIMARY_KEY%: ' . $id, LOG_WARNING, __FILE__, __LINE__);
-        App::raiseMsg(sprintf(_("The requested record %s could not be found."), $id), MSG_ERR, __FILE__, __LINE__);
-        App::dieBoomerangURL();
+        $app->logMsg('Could not find record with %PRIMARY_KEY%: ' . $id, LOG_WARNING, __FILE__, __LINE__);
+        $app->raiseMsg(sprintf(_("The requested record %s could not be found."), $id), MSG_ERR, __FILE__, __LINE__);
+        $app->dieBoomerangURL();
     }
 
@@ -262,7 +262,7 @@
     ");
     if (! list($name) = mysql_fetch_row($qid)) {
-        App::logMsg('Could not find record with %PRIMARY_KEY%: ' . $id, LOG_WARNING, __FILE__, __LINE__);
-        App::raiseMsg(sprintf(_("The requested record %s could not be found."), $id), MSG_ERR, __FILE__, __LINE__);
-        App::dieBoomerangURL();
+        $app->logMsg('Could not find record with %PRIMARY_KEY%: ' . $id, LOG_WARNING, __FILE__, __LINE__);
+        $app->raiseMsg(sprintf(_("The requested record %s could not be found."), $id), MSG_ERR, __FILE__, __LINE__);
+        $app->dieBoomerangURL();
     }
 
@@ -270,5 +270,5 @@
     DB::query("DELETE FROM %DB_TBL% WHERE %PRIMARY_KEY% = '" . DB::escapeString($id) . "'");
 
-    App::raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been deleted."), $name), MSG_SUCCESS, __FILE__, __LINE__);
+    $app->raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been deleted."), $name), MSG_SUCCESS, __FILE__, __LINE__);
 
     // Unlock record.
@@ -290,5 +290,5 @@
     $version->create('%DB_TBL%', '%PRIMARY_KEY%', $last_insert_id, $frm['<##>']);
 
-    App::raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been added."), $frm['<##>']), MSG_SUCCESS, __FILE__, __LINE__);
+    $app->raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been added."), $frm['<##>']), MSG_SUCCESS, __FILE__, __LINE__);
 
     return $last_insert_id;
@@ -313,5 +313,5 @@
     $version->create('%DB_TBL%', '%PRIMARY_KEY%', $frm['%PRIMARY_KEY%'], $frm['<##>']);
 
-    App::raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been updated."), $frm['<##>']), MSG_SUCCESS, __FILE__, __LINE__);
+    $app->raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been updated."), $frm['<##>']), MSG_SUCCESS, __FILE__, __LINE__);
 
     // Unlock record.
@@ -399,5 +399,5 @@
 {
     if (!is_array($ranks)) {
-        App::logMsg('Saving rank failed, data posted is not an array: ' . $ranks, LOG_ERR, __FILE__, __LINE__);
+        $app->logMsg('Saving rank failed, data posted is not an array: ' . $ranks, LOG_ERR, __FILE__, __LINE__);
         return false;
     }
@@ -423,7 +423,7 @@
     }
 
-    App::raiseMsg(_("Records have been reordered with the new rank."), MSG_SUCCESS, __FILE__, __LINE__);
+    $app->raiseMsg(_("Records have been reordered with the new rank."), MSG_SUCCESS, __FILE__, __LINE__);
     if ($unspecified_counter > 0) {
-        App::raiseMsg(sprintf(_("%s items with unspecified ranks were automatically assigned a rank of 10000."), $unspecified_counter), MSG_NOTICE, __FILE__, __LINE__);
+        $app->raiseMsg(sprintf(_("%s items with unspecified ranks were automatically assigned a rank of 10000."), $unspecified_counter), MSG_NOTICE, __FILE__, __LINE__);
     }
 }
Index: branches/2.0singleton/bin/module_maker/skel/public.php
===================================================================
--- branches/2.0singleton/bin/module_maker/skel/public.php	(revision 122)
+++ branches/2.0singleton/bin/module_maker/skel/public.php	(revision 127)
@@ -42,6 +42,6 @@
     ");
     if (!$item = mysql_fetch_assoc($qid)) {
-        App::raiseMsg(_("Sorry that %ITEM_TITLE% could not be found"), MSG_WARNING, __FILE__, __LINE__);
-        App::dieBoomerangURL();
+        $app->raiseMsg(_("Sorry that %ITEM_TITLE% could not be found"), MSG_WARNING, __FILE__, __LINE__);
+        $app->dieBoomerangURL();
     }
 
