This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/classes/Kohana/Route.php b/classes/Kohana/Route.php | |
index fdd2e1b..d8e33fe 100644 | |
--- a/classes/Kohana/Route.php | |
+++ b/classes/Kohana/Route.php | |
@@ -531,8 +531,12 @@ class Kohana_Route { | |
return rtrim($params['host'], '/').'/'.$uri; | |
} | |
+ // Keep track of whether an optional param was replaced | |
+ $provided_optional = FALSE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
// Just use this file in application/classes/url.php for a fix until 3.2.2 is out | |
class URL extends Kohana_URL { | |
/** | |
* Fetches an absolute site URL based on a URI segment. | |
* | |
* echo URL::site('foo/bar'); | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Class View_Page_Browse extends View_Page { | |
// On this page, 'browse' tab is selected | |
protected $_selected_top_nav_item = 'browse'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 1 Property | |
class Minion_Task_Example extends Minion_Task { | |
protected $_options = array( | |
'force' => array( | |
'default' => NULL, | |
// Defaults to --{{key}} (--force in this case) | |
'names' => array('--force', '-f'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
class Model_Bla extends ORM { | |
public function rules() | |
{ | |
return array( | |
'phone_one' => array( | |
array('at_least', array(':validation', 1, array('phone_one', 'phone_two', 'phone_three'))), | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* | |
* | |
* @package OAuth2 | |
* @category Library | |
* @author Managed I.T. | |
* @copyright (c) 2011 Managed I.T. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script is similar to minion but will do a few additional things: | |
# - PHP process is run in the background | |
# - PHP process is monitored and restarted if it exits for any reason | |
# - Added handlers for SUGHUP, SIGINT, and SIGTERM | |
# | |
# This is meant for long running minion tasks (like background workers). | |
# Shutting down the minion tasks is done by sending a SIGINT or SIGTERM signal | |
# to this miniond process. You can also restart the minion task by sending a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script is similar to minion but will do a few additional things: | |
# - PHP process is run in the background | |
# - PHP process is monitored and restarted if it exits for any reason | |
# - Added handlers for SUGHUP, SIGINT, and SIGTERM | |
# | |
# This is meant for long running minion tasks (like background workers). | |
# Shutting down the minion tasks is done by sending a SIGINT or SIGTERM signal | |
# to this miniond process. You can also restart the minion task by sending a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
class View_Model | |
{ | |
public static function factory(Model $model) | |
{ | |
// Get the associated View_ name (ex: View_Model_User) | |
$class = 'View_'.get_class($model); | |
if (class_exists($class)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function save(Validate $validate = NULL) | |
{ | |
DB::query(NULL, 'START TRANSACTION')->execute(); | |
try | |
{ | |
parent::save($validate); | |
} | |
catch (ORM_Validation_Exception $e) |
NewerOlder