Skip to content

Commit

Permalink
Env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Anatoliy committed Feb 20, 2010
1 parent 63c8e14 commit 9b1a759
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/view/layout.default.tpl
Expand Up @@ -27,7 +27,8 @@
{/if}
</div>
<div style="float:right;padding-right: 5px;">
my webdesk
<a href="/">my webdesk</a>
<strong>{$WD_ENV}</strong>
</div>
</div>
<div class="contentdiv">
Expand Down
3 changes: 3 additions & 0 deletions config/config.dev.inc
Expand Up @@ -4,6 +4,8 @@ require_once 'classes/config.inc';

$config = new Config();

$config->environment = 'development';

// common settings
$config->base_path = realpath(dirname(__FILE__) . '/..');
$config->site_name = 'Webdesk';
Expand All @@ -26,6 +28,7 @@ $config->smarty_dir = $config->base_path . '/smarty';
$config->template_dir = $config->base_path . '/app/view';
require_once 'template.inc';
$tpl = new Template();
$tpl->add_secondary('WD_ENV', $config->environment);

// locale
setlocale(LC_ALL, 'ru_RU.utf8');
Expand Down
2 changes: 2 additions & 0 deletions config/config.live.inc
Expand Up @@ -4,6 +4,8 @@ require_once 'classes/config.inc';

$config = new Config();

$config->environment = 'production';

// common settings
$config->base_path = realpath(dirname(__FILE__) . '/..');
$config->site_name = 'Webdesk';
Expand Down

0 comments on commit 9b1a759

Please sign in to comment.