AAAAindex.html000066600000000035151375065770006563 0ustar00 load_fields_hash.ctp000066600000004450151375065770010553 0ustar00
Load Fields Hash
Header(array('settings' => 'Settings', 'help' => 'Help'), 'load_fields_hash_config_{n}'); ?> tabStart('settings'); ?> input('action_load_fields_hash_{n}_fields_config', array('type' => 'text', 'label' => 'Fields list', 'class' => 'big_input', 'smalldesc' => 'Comma separated list of fields, no spaces, you can use dots to get sub arrays values.')); ?> input('action_load_fields_hash_{n}_hash_field_name_config', array('type' => 'text', 'label' => 'Hash field name', 'smalldesc' => '')); ?> tabEnd(); ?> tabStart('help'); ?>

tabEnd(); ?>
.htaccess000066600000000177151375065770006373 0ustar00 Order allow,deny Deny from all load_fields_hash.php000066600000003157151375066000010542 0ustar00 'form_security', 'title' => 'Security'); var $details = array('title' => 'Load Fields Hash', 'tooltip' => 'Injects a security hash representing the values of specific fields values.'); function run($form, $actiondata){ $mainframe = JFactory::getApplication(); $session = JFactory::getSession(); $params = new JParameter($actiondata->params); //get secret $secret = $mainframe->getCfg('secret'); $fields = array(); if(strlen(trim($params->get('fields', '')))){ $fields = explode(',', trim($params->get('fields', ''))); } $hashed_values = array(); foreach($fields as $k => $field){ $hashed_values[$field] = $form->get_array_value($form->data, explode('.', $field)); } $form->debug['Load Fields Hash'][$actiondata->order] = $hashed_values; $hash = serialize($hashed_values); $hash = md5($hash); $hash = md5($hash.':'.$secret); $form->extra_content .= ''; } function load($clear){ if($clear){ $action_params = array( 'content1' => '', 'enabled' => 1, 'hash_field_name' => 'cf_fields_hash', 'fields' => '' ); } return array('action_params' => $action_params); } } ?>