Skip to content

Commit

Permalink
Dev More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SamMousa committed Aug 24, 2015
1 parent be28b97 commit 8fc56ca
Show file tree
Hide file tree
Showing 35 changed files with 41 additions and 3,783 deletions.
24 changes: 13 additions & 11 deletions application/components/LocalizedFormatter.php
Expand Up @@ -23,16 +23,18 @@ public function formatBooleanIcon($value) {
public function formatPercentage($factor) {
return number_format($factor * 100, 1) . '%';
}

public function formatEmail($email) {
$encoded = '';
foreach (str_split($email, 1) as $character) {
$ord = ord($character);
$encoded .= '&#';
$encoded .= rand(0, 1) === 0 ? 'x' . dechex($ord) : $ord;
$encoded .= ';';
}
return $encoded;
}
/**
* This encodes an email, but it breaks the mailto link. For now this has been disabled.
*/
// public function formatEmail($email) {
// $encoded = '';
// foreach (str_split($email, 1) as $character) {
// $ord = ord($character);
// $encoded .= '&#';
// $encoded .= rand(0, 1) === 0 ? 'x' . dechex($ord) : $ord;
// $encoded .= ';';
// }
// return parent::formatEmail($encoded);
// }

}
1 change: 0 additions & 1 deletion application/controllers/PrintanswersController.php
Expand Up @@ -57,7 +57,6 @@ function actionView($surveyid,$printableexport=FALSE)
$iSurveyID=0;
$sLanguage = Yii::app()->getConfig("defaultlang");
}
SetSurveyLanguage($iSurveyID, $sLanguage);
$aSurveyInfo = getSurveyInfo($iSurveyID,$sLanguage);
//SET THE TEMPLATE DIRECTORY
$sTemplate = $aSurveyInfo['template'];
Expand Down
2 changes: 0 additions & 2 deletions application/controllers/Statistics_userController.php
Expand Up @@ -138,8 +138,6 @@ function actionAction($surveyid,$language=null)
{
$sLanguage=sanitize_languagecode($sLanguage);
}
//set survey language for translations
SetSurveyLanguage($iSurveyID, $sLanguage);
//Create header
sendCacheHeaders();
$condition = false;
Expand Down
1 change: 0 additions & 1 deletion application/controllers/admin/printablesurvey.php
Expand Up @@ -43,7 +43,6 @@ function index($surveyid, $lang = null)
$aSurveyInfo=getSurveyInfo($surveyid,$lang);
if (!($aSurveyInfo))
$this->getController()->error('Invalid survey ID');
SetSurveyLanguage($surveyid,$lang);
$sLanguageCode=App()->language;

$templatename = $aSurveyInfo['template'];
Expand Down
660 changes: 0 additions & 660 deletions application/controllers/admin/surveypermission.php

This file was deleted.

0 comments on commit 8fc56ca

Please sign in to comment.