Skip to content

Commit

Permalink
Merge branch '3.1/release/3.1.2' into 3.1/master
Browse files Browse the repository at this point in the history
  • Loading branch information
zombor committed Mar 13, 2011
2 parents bfefdd6 + db4477e commit 2d8e099
Show file tree
Hide file tree
Showing 93 changed files with 1,436 additions and 564 deletions.
2 changes: 1 addition & 1 deletion classes/http.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

abstract class Http extends Kohana_Http {}
abstract class HTTP extends Kohana_HTTP {}
2 changes: 1 addition & 1 deletion classes/http/exception.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception extends Kohana_Http_Exception {}
class HTTP_Exception extends Kohana_HTTP_Exception {}
2 changes: 1 addition & 1 deletion classes/http/exception/400.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_400 extends Kohana_Http_Exception_400 {}
class HTTP_Exception_400 extends Kohana_HTTP_Exception_400 {}
2 changes: 1 addition & 1 deletion classes/http/exception/401.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_401 extends Kohana_Http_Exception_401 {}
class HTTP_Exception_401 extends Kohana_HTTP_Exception_401 {}
2 changes: 1 addition & 1 deletion classes/http/exception/402.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_402 extends Kohana_Http_Exception_402 {}
class HTTP_Exception_402 extends Kohana_HTTP_Exception_402 {}
2 changes: 1 addition & 1 deletion classes/http/exception/403.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_403 extends Kohana_Http_Exception_403 {}
class HTTP_Exception_403 extends Kohana_HTTP_Exception_403 {}
2 changes: 1 addition & 1 deletion classes/http/exception/404.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_404 extends Kohana_Http_Exception_404 {}
class HTTP_Exception_404 extends Kohana_HTTP_Exception_404 {}
2 changes: 1 addition & 1 deletion classes/http/exception/405.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_405 extends Kohana_Http_Exception_405 {}
class HTTP_Exception_405 extends Kohana_HTTP_Exception_405 {}
2 changes: 1 addition & 1 deletion classes/http/exception/406.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_406 extends Kohana_Http_Exception_406 {}
class HTTP_Exception_406 extends Kohana_HTTP_Exception_406 {}
2 changes: 1 addition & 1 deletion classes/http/exception/407.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_407 extends Kohana_Http_Exception_407 {}
class HTTP_Exception_407 extends Kohana_HTTP_Exception_407 {}
2 changes: 1 addition & 1 deletion classes/http/exception/408.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_408 extends Kohana_Http_Exception_408 {}
class HTTP_Exception_408 extends Kohana_HTTP_Exception_408 {}
2 changes: 1 addition & 1 deletion classes/http/exception/409.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_409 extends Kohana_Http_Exception_409 {}
class HTTP_Exception_409 extends Kohana_HTTP_Exception_409 {}
2 changes: 1 addition & 1 deletion classes/http/exception/410.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_410 extends Kohana_Http_Exception_410 {}
class HTTP_Exception_410 extends Kohana_HTTP_Exception_410 {}
2 changes: 1 addition & 1 deletion classes/http/exception/411.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_411 extends Kohana_Http_Exception_411 {}
class HTTP_Exception_411 extends Kohana_HTTP_Exception_411 {}
2 changes: 1 addition & 1 deletion classes/http/exception/412.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_412 extends Kohana_Http_Exception_412 {}
class HTTP_Exception_412 extends Kohana_HTTP_Exception_412 {}
2 changes: 1 addition & 1 deletion classes/http/exception/413.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_413 extends Kohana_Http_Exception_413 {}
class HTTP_Exception_413 extends Kohana_HTTP_Exception_413 {}
2 changes: 1 addition & 1 deletion classes/http/exception/414.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_414 extends Kohana_Http_Exception_414 {}
class HTTP_Exception_414 extends Kohana_HTTP_Exception_414 {}
2 changes: 1 addition & 1 deletion classes/http/exception/415.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_415 extends Kohana_Http_Exception_415 {}
class HTTP_Exception_415 extends Kohana_HTTP_Exception_415 {}
2 changes: 1 addition & 1 deletion classes/http/exception/416.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_416 extends Kohana_Http_Exception_416 {}
class HTTP_Exception_416 extends Kohana_HTTP_Exception_416 {}
2 changes: 1 addition & 1 deletion classes/http/exception/417.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_417 extends Kohana_Http_Exception_417 {}
class HTTP_Exception_417 extends Kohana_HTTP_Exception_417 {}
2 changes: 1 addition & 1 deletion classes/http/exception/500.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_500 extends Kohana_Http_Exception_500 {}
class HTTP_Exception_500 extends Kohana_HTTP_Exception_500 {}
2 changes: 1 addition & 1 deletion classes/http/exception/501.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_501 extends Kohana_Http_Exception_501 {}
class HTTP_Exception_501 extends Kohana_HTTP_Exception_501 {}
2 changes: 1 addition & 1 deletion classes/http/exception/502.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_502 extends Kohana_Http_Exception_502 {}
class HTTP_Exception_502 extends Kohana_HTTP_Exception_502 {}
2 changes: 1 addition & 1 deletion classes/http/exception/503.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_503 extends Kohana_Http_Exception_503 {}
class HTTP_Exception_503 extends Kohana_HTTP_Exception_503 {}
2 changes: 1 addition & 1 deletion classes/http/exception/504.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_504 extends Kohana_Http_Exception_504 {}
class HTTP_Exception_504 extends Kohana_HTTP_Exception_504 {}
2 changes: 1 addition & 1 deletion classes/http/exception/505.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Exception_505 extends Kohana_Http_Exception_505 {}
class HTTP_Exception_505 extends Kohana_HTTP_Exception_505 {}
2 changes: 1 addition & 1 deletion classes/http/header.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Header extends Kohana_Http_Header {}
class HTTP_Header extends Kohana_HTTP_Header {}
2 changes: 1 addition & 1 deletion classes/http/header/value.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

class Http_Header_Value extends Kohana_Http_Header_Value {}
class HTTP_Header_Value extends Kohana_HTTP_Header_Value {}
2 changes: 1 addition & 1 deletion classes/http/interaction.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

interface Http_Interaction extends Kohana_Http_Interaction {}
interface HTTP_Interaction extends Kohana_HTTP_Interaction {}
2 changes: 1 addition & 1 deletion classes/http/request.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

interface Http_Request extends Kohana_Http_Request {}
interface HTTP_Request extends Kohana_HTTP_Request {}
2 changes: 1 addition & 1 deletion classes/http/response.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');

interface Http_Response extends Kohana_Http_Response {}
interface HTTP_Response extends Kohana_HTTP_Response {}
4 changes: 2 additions & 2 deletions classes/kohana/arr.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public static function pluck($array, $key)
* Adds a value to the beginning of an associative array.
*
* // Add an empty value to the start of a select list
* Arr::unshift_assoc($array, 'none', 'Select a value');
* Arr::unshift($array, 'none', 'Select a value');
*
* @param array array to modify
* @param string array key name
Expand Down Expand Up @@ -464,7 +464,7 @@ public static function merge(array $a1, array $a2)
* $array = Arr::overwrite($a1, $a2);
*
* // The output of $array will now be:
* array('name' => 'jack', 'mood' => 'happy', 'food' => 'bacon')
* array('name' => 'jack', 'mood' => 'happy', 'food' => 'tacos')
*
* @param array master array
* @param array input arrays that will overwrite existing values
Expand Down
14 changes: 7 additions & 7 deletions classes/kohana/controller/rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ abstract class Kohana_Controller_REST extends Controller {
*/
protected $_action_map = array
(
Http_Request::GET => 'index',
Http_Request::PUT => 'update',
Http_Request::POST => 'create',
Http_Request::DELETE => 'delete',
HTTP_Request::GET => 'index',
HTTP_Request::PUT => 'update',
HTTP_Request::POST => 'create',
HTTP_Request::DELETE => 'delete',
);

/**
Expand Down Expand Up @@ -75,9 +75,9 @@ public function before()
public function after()
{
if (in_array(Arr::get($_SERVER, 'HTTP_X_HTTP_METHOD_OVERRIDE', $this->request->method()), array(
Http_Request::PUT,
Http_Request::POST,
Http_Request::DELETE)))
HTTP_Request::PUT,
HTTP_Request::POST,
HTTP_Request::DELETE)))
{
$this->response->headers('cache-control', 'no-cache, no-store, max-age=0, must-revalidate');
}
Expand Down
10 changes: 5 additions & 5 deletions classes/kohana/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
class Kohana_Core {

// Release version and codename
const VERSION = '3.1.1.1';
const CODENAME = 'aesalon';
const VERSION = '3.1.2';
const CODENAME = 'Hirondelle';

// Common environment type constants for consistency and convenience
const PRODUCTION = 1;
Expand Down Expand Up @@ -627,10 +627,10 @@ public static function find_file($dir, $file, $ext = NULL, $array = FALSE)
// Create a partial path of the filename
$path = $dir.DIRECTORY_SEPARATOR.$file.$ext;

if (Kohana::$caching === TRUE AND isset(Kohana::$_files[$path]))
if (Kohana::$caching === TRUE AND isset(Kohana::$_files[$path.($array ? '_array' : '_path')]))
{
// This path has been cached
return Kohana::$_files[$path];
return Kohana::$_files[$path.($array ? '_array' : '_path')];
}

if (Kohana::$profiling === TRUE AND class_exists('Profiler', FALSE))
Expand Down Expand Up @@ -677,7 +677,7 @@ public static function find_file($dir, $file, $ext = NULL, $array = FALSE)
if (Kohana::$caching === TRUE)
{
// Add the path to the cache
Kohana::$_files[$path] = $found;
Kohana::$_files[$path.($array ? '_array' : '_path')] = $found;

// Files have been changed
Kohana::$_files_changed = TRUE;
Expand Down
24 changes: 12 additions & 12 deletions classes/kohana/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* - Variable and path debugging
*
* @package Kohana
* @category Http
* @category HTTP
* @author Kohana Team
* @since 3.1.0
* @copyright (c) 2008-2011 Kohana Team
* @license http://kohanaphp.com/license
*/
abstract class Kohana_Http {
abstract class Kohana_HTTP {

/**
* @var The default protocol to use if it cannot be detected
Expand All @@ -30,15 +30,15 @@ abstract class Kohana_Http {
* Parses a HTTP header string into an associative array
*
* @param string $header_string Header string to parse
* @return Http_Header
* @return HTTP_Header
*/
public static function parse_header_string($header_string)
{
// If the PECL Http extension is loaded
// If the PECL HTTP extension is loaded
if (extension_loaded('http'))
{
// Use the fast method to parse header string
return new Http_Header(http_parse_headers($header_string));
return new HTTP_Header(http_parse_headers($header_string));
}

// Otherwise we use the slower PHP parsing
Expand Down Expand Up @@ -78,7 +78,7 @@ public static function parse_header_string($header_string)
}

// Return the headers
return new Http_Header($headers);
return new HTTP_Header($headers);
}

/**
Expand All @@ -87,23 +87,23 @@ public static function parse_header_string($header_string)
* representation of the HTTP request.
*
* // Get http headers into the request
* $request->headers = Http::request_headers();
* $request->headers = HTTP::request_headers();
*
* @return Http_Header
* @return HTTP_Header
*/
public static function request_headers()
{
// If running on apache server
if (function_exists('apache_request_headers'))
{
// Return the much faster method
return new Http_Header(apache_request_headers());
return new HTTP_Header(apache_request_headers());
}
// If the PECL HTTP tools are installed
elseif (extension_loaded('http'))
{
// Return the much faster method
return new Http_Header(http_get_request_headers());
return new HTTP_Header(http_get_request_headers());
}

// Setup the output
Expand Down Expand Up @@ -133,7 +133,7 @@ public static function request_headers()
$headers[str_replace(array('HTTP_', '_'), array('', '-'), $key)] = $value;
}

return new Http_Header($headers);
return new HTTP_Header($headers);
}

/**
Expand All @@ -157,4 +157,4 @@ public static function www_form_urlencode(array $params = array())

return implode('&', $encoded);
}
} // End Kohana_Http
} // End Kohana_HTTP
Loading

0 comments on commit 2d8e099

Please sign in to comment.