- Timestamp:
- 31/01/11 02:50:11 (16 months ago)
- Location:
- trunk/src/Oak
- Files:
-
- 5 modified
-
Action.php (modified) (2 diffs)
-
Action/Login.php (modified) (1 diff)
-
Components/Form.php (modified) (1 diff)
-
Components/Table.php (modified) (2 diffs)
-
Menu.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Oak/Action.php
r46 r52 45 45 $access =& $this->session->get("access"); 46 46 $realname = ''; 47 if ( $access instanceof Oak_Access oris_subclass_of($access, 'Oak_Access')) {47 if (is_subclass_of($access, 'Oak_Access')) { 48 48 $user = $access->get("user"); 49 49 if (!is_scalar($user)) { … … 110 110 return $rt; 111 111 } 112 if (!$rt) { 113 return true; 114 } 112 115 } 113 116 } -
trunk/src/Oak/Action/Login.php
r51 r52 84 84 $this->alert = $e->getMessage(); 85 85 } 86 return false;86 return true; 87 87 } 88 88 -
trunk/src/Oak/Components/Form.php
r44 r52 52 52 * @param name nombre del formulario. 53 53 */ 54 function addForm( $fieldsets , $id = "", $name = "" ) {54 function addForm( $fieldsets = null, $id = "", $name = "" ) { 55 55 $i = $this->cf_index++; 56 56 $this->template->put("main/forms/form[$i]", array ( 57 57 "@id" => $id, 58 "@name" => $name, 59 "fieldset" => $fieldsets 58 "@name" => $name 60 59 )); 60 if ($fieldsets) { 61 $this->template->put("main/forms/form[$i]/fieldset", $fieldsets); 62 } 61 63 } 62 64 -
trunk/src/Oak/Components/Table.php
r50 r52 117 117 */ 118 118 function thead( $name, $type ) { 119 $types = array ( "id", "center", "string", "text", "number", "currency", "date", "link" );119 $types = array ( "id", "center", "string", "text", "number", "currency", "date", "link", "check" ); 120 120 if (in_array($type, $types)) { 121 121 return array ( … … 124 124 ); 125 125 } 126 return new PEAR_Error(sprintf(_("Tipo %s no válido."), $type));126 throw new Exception(sprintf(_("Tipo %s no válido."), $type)); 127 127 } 128 128 -
trunk/src/Oak/Menu.php
r51 r52 26 26 */ 27 27 function __construct( &$access ) { 28 if (($access instanceof Oak_Access) and file_exists(" conf/menu.yml")) {28 if (($access instanceof Oak_Access) and file_exists("../conf/menu.yml")) { 29 29 $this->cut = array(); 30 30 $this->logout = array(); 31 31 $this->opt = array(); 32 $this->menu = Horde_Yaml::loadFile(" conf/menu.yml");32 $this->menu = Horde_Yaml::loadFile("../conf/menu.yml"); 33 33 $this->checkMenu($access); 34 34 }
