Merge branch 'develop' of github.com:laravel/laravel into develop
This commit is contained in:
@@ -137,10 +137,12 @@ class HTML {
|
|||||||
* @param bool $https
|
* @param bool $https
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function link($url, $title, $attributes = array(), $https = null)
|
public static function link($url, $title = null, $attributes = array(), $https = null)
|
||||||
{
|
{
|
||||||
$url = URL::to($url, $https);
|
$url = URL::to($url, $https);
|
||||||
|
|
||||||
|
if (is_null($title)) $title = $url;
|
||||||
|
|
||||||
return '<a href="'.$url.'"'.static::attributes($attributes).'>'.static::entities($title).'</a>';
|
return '<a href="'.$url.'"'.static::attributes($attributes).'>'.static::entities($title).'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,7 +154,7 @@ class HTML {
|
|||||||
* @param array $attributes
|
* @param array $attributes
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function link_to_secure($url, $title, $attributes = array())
|
public static function link_to_secure($url, $title = null, $attributes = array())
|
||||||
{
|
{
|
||||||
return static::link($url, $title, $attributes, true);
|
return static::link($url, $title, $attributes, true);
|
||||||
}
|
}
|
||||||
@@ -168,7 +170,7 @@ class HTML {
|
|||||||
* @param bool $https
|
* @param bool $https
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function link_to_asset($url, $title, $attributes = array(), $https = null)
|
public static function link_to_asset($url, $title = null, $attributes = array(), $https = null)
|
||||||
{
|
{
|
||||||
$url = URL::to_asset($url, $https);
|
$url = URL::to_asset($url, $https);
|
||||||
|
|
||||||
@@ -183,7 +185,7 @@ class HTML {
|
|||||||
* @param array $attributes
|
* @param array $attributes
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function link_to_secure_asset($url, $title, $attributes = array())
|
public static function link_to_secure_asset($url, $title = null, $attributes = array())
|
||||||
{
|
{
|
||||||
return static::link_to_asset($url, $title, $attributes, true);
|
return static::link_to_asset($url, $title, $attributes, true);
|
||||||
}
|
}
|
||||||
@@ -207,7 +209,7 @@ class HTML {
|
|||||||
* @param array $attributes
|
* @param array $attributes
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function link_to_route($name, $title, $parameters = array(), $attributes = array())
|
public static function link_to_route($name, $title = null, $parameters = array(), $attributes = array())
|
||||||
{
|
{
|
||||||
return static::link(URL::to_route($name, $parameters), $title, $attributes);
|
return static::link(URL::to_route($name, $parameters), $title, $attributes);
|
||||||
}
|
}
|
||||||
@@ -231,7 +233,7 @@ class HTML {
|
|||||||
* @param array $attributes
|
* @param array $attributes
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function link_to_action($action, $title, $parameters = array(), $attributes = array())
|
public static function link_to_action($action, $title = null, $parameters = array(), $attributes = array())
|
||||||
{
|
{
|
||||||
return static::link(URL::to_action($action, $parameters), $title, $attributes);
|
return static::link(URL::to_action($action, $parameters), $title, $attributes);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ use Laravel\File;
|
|||||||
use Laravel\Event;
|
use Laravel\Event;
|
||||||
use Laravel\Config;
|
use Laravel\Config;
|
||||||
use Laravel\Request;
|
use Laravel\Request;
|
||||||
|
use Laravel\Database;
|
||||||
|
|
||||||
class Profiler {
|
class Profiler {
|
||||||
|
|
||||||
@@ -57,6 +58,8 @@ class Profiler {
|
|||||||
{
|
{
|
||||||
foreach ($bindings as $binding)
|
foreach ($bindings as $binding)
|
||||||
{
|
{
|
||||||
|
$binding = Database::connection()->pdo->quote($binding);
|
||||||
|
|
||||||
$sql = preg_replace('/\?/', $binding, $sql, 1);
|
$sql = preg_replace('/\?/', $binding, $sql, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -178,6 +178,16 @@ class Request {
|
|||||||
return static::foundation()->headers->get('referer');
|
return static::foundation()->headers->get('referer');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the timestamp of the time when the request was started.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public static function time()
|
||||||
|
{
|
||||||
|
return (int) LARAVEL_START;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the current request is via the command line.
|
* Determine if the current request is via the command line.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user