Changeset 52 for trunk

Show
Ignore:
Timestamp:
31/01/11 02:50:11 (16 months ago)
Author:
bombadil
Message:

correcciones de rutas para inclusion de un directorio 'public'

Location:
trunk/src/Oak
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/Oak/Action.php

    r46 r52  
    4545        $access =& $this->session->get("access"); 
    4646        $realname = ''; 
    47         if ($access instanceof Oak_Access or is_subclass_of($access, 'Oak_Access')) { 
     47        if (is_subclass_of($access, 'Oak_Access')) { 
    4848            $user = $access->get("user"); 
    4949            if (!is_scalar($user)) { 
     
    110110                    return $rt; 
    111111                } 
     112                                if (!$rt) { 
     113                                        return true; 
     114                                } 
    112115            } 
    113116        } 
  • trunk/src/Oak/Action/Login.php

    r51 r52  
    8484            $this->alert = $e->getMessage(); 
    8585        } 
    86         return false; 
     86        return true; 
    8787    } 
    8888 
  • trunk/src/Oak/Components/Form.php

    r44 r52  
    5252     *  @param name nombre del formulario. 
    5353     */ 
    54     function addForm( $fieldsets, $id = "", $name = "" ) { 
     54    function addForm( $fieldsets = null, $id = "", $name = "" ) { 
    5555        $i = $this->cf_index++; 
    5656        $this->template->put("main/forms/form[$i]", array ( 
    5757            "@id" => $id, 
    58             "@name" => $name, 
    59             "fieldset" => $fieldsets 
     58            "@name" => $name 
    6059        )); 
     60                if ($fieldsets) { 
     61            $this->template->put("main/forms/form[$i]/fieldset", $fieldsets); 
     62                } 
    6163    } 
    6264 
  • trunk/src/Oak/Components/Table.php

    r50 r52  
    117117     */ 
    118118    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" ); 
    120120        if (in_array($type, $types)) { 
    121121            return array ( 
     
    124124            ); 
    125125        } 
    126         return new PEAR_Error(sprintf(_("Tipo %s no válido."), $type)); 
     126        throw new Exception(sprintf(_("Tipo %s no válido."), $type)); 
    127127    } 
    128128 
  • trunk/src/Oak/Menu.php

    r51 r52  
    2626     */ 
    2727    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")) { 
    2929                        $this->cut = array(); 
    3030                        $this->logout = array(); 
    3131                        $this->opt = array(); 
    32                         $this->menu = Horde_Yaml::loadFile("conf/menu.yml"); 
     32                        $this->menu = Horde_Yaml::loadFile("../conf/menu.yml"); 
    3333                        $this->checkMenu($access); 
    3434                }