summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryoung hahn2009-07-24 01:47:36 (GMT)
committer young hahn2009-07-24 01:47:36 (GMT)
commitf1cd0cc834a5a5002e5b9aa0c520716c12461aae (patch)
treebc0335087d5be7b0a4a97943cbdf74ae98bfab0a
parentea3c61a037b0dfa51e6418bb92ba221212c96032 (diff)
#514126: Fix for text on revert confirmation page.
-rw-r--r--context_ui/context_ui.admin.inc13
1 files changed, 11 insertions, 2 deletions
diff --git a/context_ui/context_ui.admin.inc b/context_ui/context_ui.admin.inc
index 5e961e5..ba7db5b 100644
--- a/context_ui/context_ui.admin.inc
+++ b/context_ui/context_ui.admin.inc
@@ -413,8 +413,17 @@ function context_ui_confirm(&$form_state, $op = 'delete', $context) {
$form['action'] = array('#type' => 'value', '#value' => $op);
switch ($op) {
case 'delete':
- $action = t('delete');
- $message = t('This action will remove this context permanently from your site.');
+ $contexts = context_contexts();
+ switch ($contexts["{$context->namespace}-{$context->attribute}-{$context->value}"]->type) {
+ case CONTEXT_STORAGE_OVERRIDDEN:
+ $action = t('revert');
+ $message = t('This action will permanently remove any customizations made to this context.');
+ break;
+ default:
+ $action = t('delete');
+ $message = t('This action will remove this context permanently from your site.');
+ break;
+ }
break;
case 'disable':
$action = t('disable');