plugins/admin/LangManager.php
changeset 399 a3a9e463c62f
parent 387 92664d2efab8
child 400 7eef739a5b81
--- a/plugins/admin/LangManager.php	Sat Feb 02 23:14:32 2008 -0500
+++ b/plugins/admin/LangManager.php	Mon Feb 04 05:19:20 2008 -0500
@@ -56,6 +56,13 @@
     switch ( $action )
     {
       case 'install_language':
+        
+        if ( defined('ENANO_DEMO_MODE') )
+        {
+          echo '<div class="error-box">' . $lang->get('acplm_err_lang_install_demo') . '</div>';
+          break;
+        }
+        
         $lang_list = list_available_languages();
         // Verify that we have this language's metadata
         if ( isset($lang_list[@$parms['iso639']]) )
@@ -87,6 +94,13 @@
         }
         break;
       case 'modify_language':
+        
+        if ( defined('ENANO_DEMO_MODE') )
+        {
+          echo '<div class="error-box">' . $lang->get('acplm_err_lang_install_demo') . '</div>';
+          break;
+        }
+        
         $lang_id =& $parms['lang_id'];
         if ( !is_int($lang_id) )
         {
@@ -246,7 +260,7 @@
         
         $lang_id =& $parms['lang_id'];
         
-        if ( isset($parms['save']) )
+        if ( isset($parms['save']) && !defined('ENANO_DEMO_MODE') )
         {
           // Grab a Language object
           if ( $lang->lang_id == $lang_id )
@@ -286,6 +300,11 @@
           
           echo '<div class="info-box">' . $lang->get('acplm_msg_string_save_success') . '</div>';
         }
+        else if ( isset($parms['save']) && defined('ENANO_DEMO_MODE') )
+        {
+          echo '<div class="error-box">' . $lang->get('acplm_err_lang_install_demo') . '</div>';
+          break;
+        }
         
         acp_start_form();
         
@@ -363,6 +382,12 @@
         if ( !isset($parms['iso639']) || !is_int(@$parms['lang_id']) )
           break;
         
+        if ( defined('ENANO_DEMO_MODE') )
+        {
+          echo '<div class="error-box">' . $lang->get('acplm_err_lang_install_demo') . '</div>';
+          break;
+        }
+        
         $lang_code =& $parms['iso639'];
         $lang_id =& $parms['lang_id'];
         
@@ -442,6 +467,12 @@
         if ( !is_int(@$parms['lang_id']) )
           break;
         
+        if ( defined('ENANO_DEMO_MODE') )
+        {
+          echo '<div class="error-box">' . $lang->get('acplm_err_lang_install_demo') . '</div>';
+          break;
+        }
+        
         $lang_id =& $parms['lang_id'];
         
         if ( isset($parms['confirm']) )