Skip to content

Commit

Permalink
merging gwoo's orchestra updates except for db config
Browse files Browse the repository at this point in the history
  • Loading branch information
daetal-us committed Sep 16, 2011
2 parents c23e69c + 9440083 commit 20f4afe
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 11 deletions.
5 changes: 5 additions & 0 deletions config/bootstrap.php
Expand Up @@ -6,6 +6,8 @@
* @license http://opensource.org/licenses/bsd-license.php The BSD License
*/

date_default_timezone_set('America/Los_Angeles');

/**
* This is the primary bootstrap file of your application, and is loaded immediately after the front
* controller (`webroot/index.php`) is invoked. It includes references to other feature-specific
Expand All @@ -31,6 +33,9 @@
*/
require __DIR__ . '/bootstrap/libraries.php';

/* Add Orchestra Configuration */
require __DIR__ . '/bootstrap/orchestra.php';

/**
* The error configuration allows you to use the filter system along with the advanced matching
* rules of the `ErrorHandler` class to provide a high level of control over managing exceptions in
Expand Down
3 changes: 0 additions & 3 deletions config/bootstrap/connections.php
Expand Up @@ -27,9 +27,6 @@
'password' => 'mofa7b9m641mdh379abfsukd3v',
));

/**
* Users Collection
*/
Connections::add('li3_users', array(
'adapter' => 'MongoDb',
'host' => 'dbh43.mongolab.com:27437',
Expand Down
27 changes: 27 additions & 0 deletions config/bootstrap/orchestra.php
@@ -0,0 +1,27 @@
<?php
/**
* Orchestra.io Bootstap for Lithium
*
* add `require __DIR__ . '/bootstrap/orchestra.php';` immediately after
* `require __DIR__ . '/bootstrap/libraries.php';` in bootstrap.php
*/
use lithium\core\Libraries;
use lithium\action\Dispatcher;

Dispatcher::applyFilter('run', function($self, $params, $chain) {
$params['request']->url = "";

if (isset($_SERVER['REQUEST_URI']) && strlen(trim($_SERVER['REQUEST_URI'])) > 0) {
$params['request']->url = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
}
return $chain->next($self, $params, $chain);
});

$resources = str_replace("//", "/", sys_get_temp_dir() . '/resources');

if (!is_dir($resources)) {
mkdir($resources, 0777, true);
mkdir("{$resources}/logs", 0777, true);
mkdir("{$resources}/tmp/cache/templates", 0777, true);
}
Libraries::add('app', array('default'=> true, 'resources' => $resources));
2 changes: 1 addition & 1 deletion libraries/lithium
Submodule lithium updated 125 files
22 changes: 15 additions & 7 deletions views/layouts/default.html.php
Expand Up @@ -10,8 +10,8 @@
<html>
<head>
<?php echo $this->html->charset();?>
<title>▴❍ <?php echo $this->title?></title>
<?php echo $this->html->style(array('reset', 'base', 'forms', 'polish', 'sphere'));?>
<title>#li3 > ▴❍ > <?php echo $this->title?></title>
<?php echo $this->html->style(array('reset', 'base.css?1', 'forms.css?1', 'polish.css?1', 'sphere.css?1'));?>
<?php echo $this->scripts();?>
<?php echo $this->html->link('Icon', null, array('type' => 'icon'));?>
</head>
Expand All @@ -21,10 +21,10 @@
<h2><?php echo $this->html->link('power of community', '/');?></h2>
<div class="nav account">
<?php
if ($user = $this->user->session()) {
if ($session = $this->user->session()) {
echo $this->html->image(
'http://gravatar.com/avatar/' . md5($user['email']) . '?s=16',
array('title' => $user['_id'])
'http://gravatar.com/avatar/' . md5($session['email']) . '?s=16',
array('title' => $session['_id'])
);
echo $this->html->link('logout', array(
'controller' => 'users', 'action' => 'logout'
Expand Down Expand Up @@ -233,12 +233,20 @@
</div>
</div>
<div class="footer">
<p class="copyright">&copy; 2010 and beyond, <?php echo $this->html->link('the union of rad', 'http://union-of-rad.org/'); ?> &nbsp; ▴ &nbsp; powered by <?php echo $this->html->link('lithium', 'http://lithify.me'); ?> and <?php echo $this->html->link('mongodb', 'http://mongodb.org'); ?> &nbsp; ▴ &nbsp; <?php echo $this->html->link('open source', 'http://github.com/pointlessjon/sphere'); ?> &nbsp; ▴ &nbsp; <?php echo $this->html->link('@lithified', 'http://twitter.com/lithified'); ?></p>
<p class="copyright">&copy; 2011 and beyond, <?php echo $this->html->link('the union of rad', 'http://union-of-rad.org/'); ?>
&nbsp; ▴ &nbsp;
powered by <?php echo $this->html->link('lithium', 'http://lithify.me'); ?>,
<?php echo $this->html->link('mongodb', 'http://mongodb.org'); ?>
and <?php echo $this->html->link('orchestra', 'http://orchestra.io'); ?>
&nbsp; ▴ &nbsp;
<?php echo $this->html->link('open source', 'http://github.com/pointlessjon/sphere'); ?>
&nbsp; ▴ &nbsp;
<?php echo $this->html->link('@lithified', 'http://twitter.com/lithified'); ?></p>
</div>
<?php echo $this->html->script(array(
"jquery-1.6.2.min",
"jquery.xdomainajax",
"sphere",
"sphere.js?1",
"jquery.oembed.2",
"pretty.date",
// "showdown/showdown",
Expand Down

0 comments on commit 20f4afe

Please sign in to comment.