18 require_once SQ_INCLUDE_PATH.
'/general_occasional.inc';
19 require_once SQ_CORE_PACKAGE_PATH.
'/system/triggers/trigger_action/trigger_action.inc';
47 parent::__construct($assetid);
62 public static function execute($settings, &$state)
64 if (empty($state[
'assetid']))
return FALSE;
65 $cascade = array_get_index($settings,
'cascade_clear_cache', FALSE);
68 'assetid' => $state[
'assetid'],
69 'cascade' => $cascade,
70 'repopulate' => FALSE,
72 $hh =& $GLOBALS[
'SQ_SYSTEM']->getHipoHerder();
73 $status_errors = $hh->freestyleHipo(
'hipo_job_tool_clear_squid_cache', $vars, SQ_PACKAGES_PATH.
'/squid/hipo_jobs');
74 if (!empty($status_errors))
return FALSE;
91 public static function getInterface($settings, $prefix, $write_access=FALSE)
93 $settings[
'cascade_clear_cache'] = array_get_index($settings,
'cascade_clear_cache', FALSE);
97 echo translate(
'cascade_question').
' ';
99 check_box($prefix.
'[cascade_clear_cache]', 1, $settings[
'cascade_clear_cache']);
101 echo
'<img src="'.sq_web_path(
'lib').
'/web/images/'.($settings[
'cascade_clear_cache'] ?
'tick' :
'cross').
'.gif" alt="'.($settings[
'cascade_clear_cache'] ? translate(
'yes') : translate(
'no')).
'" /> ';
104 echo translate(
'squid_tool_cascade_note');
107 echo translate(
'squid_tool_hostname_note');
109 return ob_get_clean();
127 $settings[
'cascade_clear_cache'] = array_get_index($request_data,
'cascade_clear_cache', FALSE);