Author: mj
Date: Fri Nov  4 10:11:40 2011
New Revision: 10257

Log:
Part of fixes in #2064.

Modified:
   trunk/apps/qubit/modules/menu/actions/deleteAction.class.php
   trunk/apps/qubit/modules/menu/actions/listAction.class.php

Modified: trunk/apps/qubit/modules/menu/actions/deleteAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/menu/actions/deleteAction.class.php        Fri Nov 
 4 10:00:21 2011        (r10256)
+++ trunk/apps/qubit/modules/menu/actions/deleteAction.class.php        Fri Nov 
 4 10:11:40 2011        (r10257)
@@ -38,8 +38,11 @@
       }
 
       // Remove cache
-      
$this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_browseMenu&sf_cache_key=settings');
-      
$this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_mainMenu&sf_cache_key=settings');
+      if ($this->context->getViewCacheManager() !== null)
+      {
+        
$this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_browseMenu&sf_cache_key=settings');
+        
$this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_mainMenu&sf_cache_key=settings');
+      }
 
       $this->redirect(array('module' => 'menu', 'action' => 'list'));
     }

Modified: trunk/apps/qubit/modules/menu/actions/listAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/menu/actions/listAction.class.php  Fri Nov  4 
10:00:21 2011        (r10256)
+++ trunk/apps/qubit/modules/menu/actions/listAction.class.php  Fri Nov  4 
10:11:40 2011        (r10257)
@@ -42,8 +42,11 @@
       }
 
       // Remove cache
-      
$this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_browseMenu&sf_cache_key=settings');
-      
$this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_mainMenu&sf_cache_key=settings');
+      if ($this->context->getViewCacheManager() !== null)
+      {
+        
$this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_browseMenu&sf_cache_key=settings');
+        
$this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_mainMenu&sf_cache_key=settings');
+      }
     }
 
     // Get an array with menu ids and depth (relative to top menu) to create

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to