<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
// this prints a complete form and also generates a qfKey, can we replace this with
// snippet = 2?? Does the constant _NOFFORM do anything?
PRINT_QFKEY = 5,
- // this sends the output back in json
- PRINT_JSON = 6;
+ // Note: added in v 4.3 with the value '6'
+ // Value changed in 4.5 to 'json' for better readability
+ // @see CRM_Core_Page_AJAX::returnJsonResponse
+ PRINT_JSON = 'json';
/**
* We only need one instance of this object. So we use the singleton
}
$this->register_function('crmURL', array('CRM_Utils_System', 'crmURL'));
+ $this->load_filter('pre', 'resetExtScope');
+
+ $this->assign('crmPermissions', new CRM_Core_Smarty_Permissions());
}
/**
* @param boolean $display
*/
function fetch($resource_name, $cache_id = NULL, $compile_id = NULL, $display = FALSE) {
- return parent::fetch($resource_name, $cache_id, $compile_id, $display);
+ if (preg_match( '/^(\s+)?string:/', $resource_name)) {
+ $old_security = $this->security;
+ $this->security = TRUE;
+ }
+ $output = parent::fetch($resource_name, $cache_id, $compile_id, $display);
+ if (isset($old_security)) {
+ $this->security = $old_security;
+ }
+ return $output;
}
function appendValue($name, $value) {