Skip to content

Commit

Permalink
Minor bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Apr 3, 2012
1 parent 48e62b4 commit c7c5c56
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion vendors/titon/Titon.php
Expand Up @@ -100,11 +100,11 @@ public static function initialize() {
self::install('app', new Application(), true);
self::install('cache', new Cache(), true);
self::install('config', new Config(), true);
self::install('event', new Event(), true);
self::install('registry', new Registry(), true);
self::install('router', new Router(), true);
self::install('g11n', new G11n(), true);
self::install('environment', new Environment(), true);
self::install('event', new Event(), true);
self::install('dispatch', new Dispatch(), true);
}

Expand Down
2 changes: 1 addition & 1 deletion vendors/titon/core/Dispatch.php
Expand Up @@ -43,7 +43,7 @@ class Dispatch {
* @return void
*/
public function run() {
$params = Titon::router()->current()->params();
$params = Titon::router()->current()->getParams();
$dispatcher = null;

if (!empty($this->_mapping)) {
Expand Down
6 changes: 3 additions & 3 deletions vendors/titon/core/Event.php
Expand Up @@ -124,12 +124,12 @@ public function getListeners() {
* @return void
*/
public function notify($event, $object = null) {
if (empty($this->_listeners)) {
$route = Titon::router()->current();

if (!$route || empty($this->_listeners)) {
return;
}

$route = Titon::router()->current();

foreach ($this->_listeners as &$listener) {
if (isset($listener['executed'][$event])) {
continue;
Expand Down
4 changes: 4 additions & 0 deletions vendors/titon/core/G11n.php
Expand Up @@ -35,6 +35,7 @@ class G11n {
const FORMAT_1 = 1;
const FORMAT_2 = 2;
const FORMAT_3 = 3;
const FORMAT_4 = 3;

/**
* Currently active locale bundle based on the client.
Expand Down Expand Up @@ -95,6 +96,9 @@ public function canonicalize($key, $format = self::FORMAT_1) {
case self::FORMAT_3:
$return .= '_' . strtoupper($parts[1]);
break;
case self::FORMAT_4:
$return .= strtoupper($parts[1]);
break;
}
}

Expand Down
2 changes: 0 additions & 2 deletions vendors/titon/libs/bundles/messages/MessageBundleAbstract.php
Expand Up @@ -38,9 +38,7 @@ abstract class MessageBundleAbstract extends BundleAbstract {
*/
public function initialize() {
$this->findBundle(array(
APP_MODULES . '{module}/resources/messages/{bundle}/LC_MESSAGES/',
APP_MODULES . '{module}/resources/messages/{bundle}/',
APP_RESOURCES . 'messages/{bundle}/LC_MESSAGES/',
APP_RESOURCES . 'messages/{bundle}/',
TITON_RESOURCES . 'messages/{bundle}/'
));
Expand Down

0 comments on commit c7c5c56

Please sign in to comment.