Improvements to field views and minor updates
This commit is contained in:
4
classes/Arr.php
Normal file
4
classes/Arr.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
class Arr extends lnApp_Arr {}
|
||||
?>
|
20
classes/lnApp/Arr.php
Normal file
20
classes/lnApp/Arr.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class extends Kohana's Arr
|
||||
*
|
||||
* @package lnApp
|
||||
* @category Modifications
|
||||
* @author Deon George
|
||||
* @copyright (c) 2010 Deon George
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
abstract class lnApp_Arr extends Kohana_Arr {
|
||||
/**
|
||||
* Convert an array into a string with key=value
|
||||
*/
|
||||
public static function convert(array $array) {
|
||||
return implode(' ',array_map(function ($v, $k) { return sprintf('%s="%s"', $k, $v); },$array,array_keys($array)));
|
||||
}
|
||||
}
|
||||
?>
|
@@ -13,8 +13,8 @@ abstract class lnApp_Controller_User_Account extends Controller_Account {
|
||||
protected $auth_required = TRUE;
|
||||
|
||||
protected $secure_actions = array(
|
||||
'edit'=>0,
|
||||
'resetpassword'=>0,
|
||||
'edit'=>TRUE,
|
||||
'resetpassword'=>TRUE,
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -58,9 +58,8 @@ abstract class lnApp_Controller_User_Account extends Controller_Account {
|
||||
// Log the password reset
|
||||
$this->ao->log('Password reset');
|
||||
|
||||
HTTP::redirect('login');
|
||||
}
|
||||
|
||||
HTTP::redirect('login');
|
||||
}
|
||||
|
||||
Block::factory()
|
||||
|
@@ -54,7 +54,7 @@ abstract class lnApp_SystemMessage extends HTMLRender {
|
||||
|
||||
$output = '';
|
||||
|
||||
$output .= sprintf('<div class="alert %s">',empty($record['type']) ? '' : 'alert-'.$record['type']);
|
||||
$output .= sprintf('<div class="alert %s">',empty($record['type']) ? '' : 'alert-'.($record['type'] == 'error' ? 'danger' : $record['type']));
|
||||
$output .= '<button type="button" class="close" data-dismiss="alert">×</button>';
|
||||
switch ($record['type']) {
|
||||
case 'error':
|
||||
|
Reference in New Issue
Block a user