Permalink
Browse files

removed googleanalytics validate form function

  • Loading branch information...
1 parent 166e371 commit 80be742fda82a285dbea2bce0705a50d83f5eb77 troelslenda committed Sep 14, 2010
Showing with 1 addition and 28 deletions.
  1. +1 −28 gemius.admin.inc
View
29 gemius.admin.inc
@@ -58,33 +58,6 @@ function gemius_admin_settings_form(&$form_state) {
'#options' => $role_options,
'#description' => t('Add tracking only for the selected role(s). If none of the roles are selected, all users will be tracked. If a user has any of the roles checked, that user will be tracked.'),
);
-
return system_settings_form($form);
-}
-/*
-function googleanalytics_admin_settings_form_validate($form, &$form_state) {
- if (!preg_match('/^UA-\d{4,}-\d+$/', $form_state['values']['googleanalytics_account'])) {
- form_set_error('googleanalytics_account', t('A valid Google Analytics account number is case sensitive and formatted like UA-xxxxxx-x.'));
- }
-
- // This is for the Newbie's who cannot read a text area description.
- if (stristr($form_state['values']['googleanalytics_codesnippet_before'], 'google-analytics.com/ga.js')) {
- form_set_error('googleanalytics_codesnippet_before', t('Do not add the tracker code provided by Google into the javascript code snippets! This module already builds the tracker code based on your Google Analytics account number and settings.'));
- }
- if (stristr($form_state['values']['googleanalytics_codesnippet_after'], 'google-analytics.com/ga.js')) {
- form_set_error('googleanalytics_codesnippet_after', t('Do not add the tracker code provided by Google into the javascript code snippets! This module already builds the tracker code based on your Google Analytics account number and settings.'));
- }
- if (preg_match('/(.*)<\/?script(.*)>(.*)/i', $form_state['values']['googleanalytics_codesnippet_before'])) {
- form_set_error('googleanalytics_codesnippet_before', t('Do not include the &lt;script&gt; tags in the javascript code snippets.'));
- }
- if (preg_match('/(.*)<\/?script(.*)>(.*)/i', $form_state['values']['googleanalytics_codesnippet_after'])) {
- form_set_error('googleanalytics_codesnippet_after', t('Do not include the &lt;script&gt; tags in the javascript code snippets.'));
- }
-
- // Trim some text area values.
- $form_state['values']['googleanalytics_pages'] = trim($form_state['values']['googleanalytics_pages']);
- $form_state['values']['googleanalytics_codesnippet_before'] = trim($form_state['values']['googleanalytics_codesnippet_before']);
- $form_state['values']['googleanalytics_codesnippet_after'] = trim($form_state['values']['googleanalytics_codesnippet_after']);
-}
- */
+}

0 comments on commit 80be742

Please sign in to comment.