Skip to content

Fixed typo in form.php #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions system/download.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ public static function file($path, $name = null)
}

return Response::make(file_get_contents($path))->header('Content-Description', 'File Transfer')
->header('Content-Type', static::mime(pathinfo($path, PATHINFO_EXTENSION)))
->header('Content-Disposition', 'attachment; filename="'.$name.'"')
->header('Content-Transfer-Encoding', 'binary')
->header('Expires', 0)
->header('Cache-Control', 'must-revalidate, post-check=0, pre-check=0')
->header('Pragma', 'public')
->header('Content-Length', filesize($path));
->header('Content-Type', static::mime(pathinfo($path, PATHINFO_EXTENSION)))
->header('Content-Disposition', 'attachment; filename="'.$name.'"')
->header('Content-Transfer-Encoding', 'binary')
->header('Expires', 0)
->header('Cache-Control', 'must-revalidate, post-check=0, pre-check=0')
->header('Pragma', 'public')
->header('Content-Length', filesize($path));
}

/**
Expand Down
26 changes: 13 additions & 13 deletions system/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ class Error {
* @var array
*/
public static $levels = array(
0 => 'Error',
E_ERROR => 'Error',
E_WARNING => 'Warning',
E_PARSE => 'Parsing Error',
E_NOTICE => 'Notice',
E_CORE_ERROR => 'Core Error',
E_CORE_WARNING => 'Core Warning',
E_COMPILE_ERROR => 'Compile Error',
E_COMPILE_WARNING => 'Compile Warning',
E_USER_ERROR => 'User Error',
E_USER_WARNING => 'User Warning',
E_USER_NOTICE => 'User Notice',
E_STRICT => 'Runtime Notice'
0 => 'Error',
E_ERROR => 'Error',
E_WARNING => 'Warning',
E_PARSE => 'Parsing Error',
E_NOTICE => 'Notice',
E_CORE_ERROR => 'Core Error',
E_CORE_WARNING => 'Core Warning',
E_COMPILE_ERROR => 'Compile Error',
E_COMPILE_WARNING => 'Compile Warning',
E_USER_ERROR => 'User Error',
E_USER_WARNING => 'User Warning',
E_USER_NOTICE => 'User Notice',
E_STRICT => 'Runtime Notice'
);

/**
Expand Down
2 changes: 1 addition & 1 deletion system/filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static function call($filters, $parameters = array(), $override = false)
{
if ( ! isset(static::$filters[$filter]))
{
throw new \Exception("Route filter [$filter] is not defined.");
throw new \Exception("Route filter [$filter] is not defined.");
}

$response = call_user_func_array(static::$filters[$filter], $parameters);
Expand Down
18 changes: 9 additions & 9 deletions system/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Form {
* @param string $method
* @param array $attributes
* @return string
*/
*/
public static function open($action = null, $method = 'POST', $attributes = array())
{
// -------------------------------------------------------
Expand All @@ -34,7 +34,7 @@ public static function open($action = null, $method = 'POST', $attributes = arra

if ( ! array_key_exists('accept-charset', $attributes))
{
$attributes['accept-charset'] = Config::get('application.encoding');
$attributes['accept-charset'] = Config::get('application.encoding');
}

$html = '<form'.HTML::attributes($attributes).'>';
Expand All @@ -56,7 +56,7 @@ public static function open($action = null, $method = 'POST', $attributes = arra
/**
* Close a HTML form.
*
* @return void
* @return string
*/
public static function close()
{
Expand All @@ -82,7 +82,7 @@ public static function raw_token()
{
if (Config::get('session.driver') == '')
{
throw new \Exception('Sessions must be enabled to retrieve a CSRF token.');
throw new \Exception('Sessions must be enabled to retrieve a CSRF token.');
}

return Session::get('csrf_token');
Expand All @@ -99,7 +99,7 @@ public static function raw_token()
public static function label($name, $value, $attributes = array())
{
static::$labels[] = $name;

return '<label for="'.$name.'"'.HTML::attributes($attributes).'>'.HTML::entities($value).'</label>'.PHP_EOL;
}

Expand All @@ -110,7 +110,7 @@ public static function label($name, $value, $attributes = array())
* @param string $value
* @param array $attributes
* @return string
*/
*/
public static function text($name, $value = null, $attributes = array())
{
return static::input('text', $name, $value, $attributes);
Expand All @@ -122,7 +122,7 @@ public static function text($name, $value = null, $attributes = array())
* @param string $name
* @param array $attributes
* @return string
*/
*/
public static function password($name, $attributes = array())
{
return static::input('password', $name, null, $attributes);
Expand All @@ -134,7 +134,7 @@ public static function password($name, $attributes = array())
* @param string $name
* @param array $attributes
* @return string
*/
*/
public static function hidden($name, $value = null, $attributes = array())
{
return static::input('hidden', $name, $value, $attributes);
Expand All @@ -146,7 +146,7 @@ public static function hidden($name, $value = null, $attributes = array())
* @param string $name
* @param array $attributes
* @return string
*/
*/
public static function file($name, $attributes = array())
{
return static::input('file', $name, null, $attributes);
Expand Down
4 changes: 2 additions & 2 deletions system/hash.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class Hash {

/**
/**
* The salty, hashed value.
*
* @var string
Expand Down Expand Up @@ -49,4 +49,4 @@ public static function make($value, $salt = null)
return new self($value, $salt);
}

}
}
4 changes: 2 additions & 2 deletions system/html.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class HTML {
*/
public static function entities($value)
{
return htmlentities($value, ENT_QUOTES, Config::get('application.encoding'), false);
return htmlentities($value, ENT_QUOTES, Config::get('application.encoding'), false);
}

/**
Expand Down Expand Up @@ -186,7 +186,7 @@ private static function list_elements($type, $list, $attributes)
*
* @param array $attributes
* @return string
*/
*/
public static function attributes($attributes)
{
$html = array();
Expand Down
Loading