Exemplo n.º 1
0
 /**
  * construct method
  *
  * @param mixed $one null
  * @param mixed $two null
  * @param mixed $three null
  * @return void
  * @access private
  */
 public function __construct($one = null, $two = null, $three = null)
 {
     if (!isProduction()) {
         $this->actsAs['MiEmail.Email']['delivery'] = 'debug';
     }
     return parent::__construct($one, $two, $three);
 }
/**
 * @return array with these keys:
 * - host: The host where the database lives.
 * - login
 * - password
 * - name: Name of the database to connect. 
 */
function getDatabaseSettings()
{
    if (isProduction()) {
        return array("host" => "localhost", "login" => "FILL-ME-IN", "password" => "FILL-ME-IN", "name" => "loeppky_chuckanutbayextra");
    } else {
        return array("host" => "localhost", "login" => "root", "password" => "root", "name" => "loeppky_chuckanutbayextra");
    }
}
Exemplo n.º 3
0
/**
 * @return array with these keys:
 * - host: The host where the database lives.
 * - login
 * - password
 * - name: Name of the database to connect. 
 */
function getDatabaseSettings()
{
    if (isProduction()) {
        return array("host" => "localhost", "login" => "root", "password" => "root", "name" => "chuckanut_bay_internal");
    } else {
        return array("host" => "localhost", "login" => "root", "password" => "root", "name" => "chuckanut_bay_internal");
    }
}
Exemplo n.º 4
0
function isTestMode()
{
    return !isProduction() && !(defined('TEST_MODE') && !TEST_MODE);
}
Exemplo n.º 5
0
<?php

require_once "setUpEnvironment.php";
if (isProduction()) {
    ?>
	<!-- Google Analytics Tracking -->
	<script type="text/javascript">
		var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
		document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	</script>
	<script type="text/javascript">
		try{
			var pageTracker = _gat._getTracker("UA-7548729-1");
			pageTracker._trackPageview();
		} catch(err) {}
	</script>
<?php 
}
?>
	</body>
</html>
Exemplo n.º 6
0
 /**
  * if productionCheck is true - check if we're currently on the production site.
  * 	if it is, and we're not, don't do anything
  * Initialize the view object reference, generate the code block and inject it
  *
  * @return void
  * @access public
  */
 public function afterLayout()
 {
     if ($this->settings['productionCheck']) {
         if (!function_exists('isProduction')) {
             trigger_error('AnalyticsHelper afterLayout: This helper is configured to check production mode, but the function isProduction() doens\'t exist');
             return;
         }
         if (!isProduction()) {
             return;
         }
     }
     $this->View =& ClassRegistry::getObject('View');
     $code = $this->_codeBlock($this->settings['code'], $this->settings['domain']);
     if ($code) {
         $this->View->output = str_replace('</body>', $code . '</body>', $this->View->output);
     }
 }