CommunityID/modules/default/controllers/PrivacyController.php

33 lines
1021 B
PHP
Raw Normal View History

2019-07-17 20:08:50 +00:00
<?php
/*
* @copyright Copyright (C) 2005-2009 Keyboard Monkeys Ltd. http://www.kb-m.com
* @license http://creativecommons.org/licenses/BSD/ BSD License
* @author Keyboard Monkey Ltd
* @since CommunityID 0.9
* @package CommunityID
* @packager Keyboard Monkeys
*/
2019-07-17 20:16:19 +00:00
class PrivacyController extends CommunityID_Controller_Action
2019-07-17 20:08:50 +00:00
{
protected $_numCols = 1;
public function indexAction()
{
$locale = Zend_Registry::get('Zend_Locale');
$localeElements = explode('_', $locale);
if (file_exists(APP_DIR . "/resources/$locale/privacy.txt")) {
$file = APP_DIR . "/resources/$locale/privacy.txt";
} else if (count($localeElements == 2)
&& file_exists(APP_DIR . "/resources/".$localeElements[0]."/privacy.txt")) {
$file = APP_DIR . "/resources/".$localeElements[0]."/privacy.txt";
} else {
$file = APP_DIR . "/resources/en/privacy.txt";
}
$this->view->privacyPolicy = nl2br(file_get_contents($file));
}
}