Changeset 14851

Show
Ignore:
Timestamp:
02/11/08 14:11:21 (10 months ago)
Author:
rambo
Message:

backport documentation improvements

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/application/admin.php

    r12691 r14851  
    9696     * Loads and prepares the schema database. 
    9797     * 
    98      * Special treatement is done for the name field, which is set readonly for non-admins 
     98     * Special treatment is done for the name field, which is set readonly for non-admins 
    9999     * if the simple_name_handling config option is set. (using an auto-generated urlname based 
    100100     * on the title, if it is missing.) 
     
    153153 
    154154    /** 
    155      * Helper, updates the context so that we get a complete breadcrum line towards the current 
     155     * Helper, updates the context so that we get a complete breadcrumb line towards the current 
    156156     * location. 
    157157     * 
     
    183183     * phase. 
    184184     * 
    185      * If create privileges apply, we relocate to the index creation application, 
     185     * If create privileges apply, we relocate to the index creation application 
     186     * 
     187     * @param mixed $handler_id The ID of the handler. 
     188     * @param Array $args The argument list. 
     189     * @param Array &$data The local request data. 
     190     * @return boolean Indicating success. 
    186191     */ 
    187192    function _handler_edit($handler_id, $args, &$data) 
     
    209214                // *** FALL-THROUGH *** 
    210215 
    211             case 'cancel':        
     216            case 'cancel': 
    212217                $_MIDCOM->relocate("application/{$this->_application->guid}.html"); 
    213218                // This will exit. 
     
    227232    /** 
    228233     * Shows the loaded application. 
     234     * 
     235     * @param mixed $handler_id The ID of the handler. 
     236     * @param mixed &$data The local request data. 
    229237     */ 
    230238    function _show_edit ($handler_id, &$data) 
     
    239247     * phase. 
    240248     * 
    241      * If create privileges apply, we relocate to the index creation application, 
     249     * If create privileges apply, we relocate to the index creation application 
     250     * 
     251     * @param mixed $handler_id The ID of the handler. 
     252     * @param Array $args The argument list. 
     253     * @param Array &$data The local request data. 
     254     * @return boolean Indicating success. 
    242255     */ 
    243256    function _handler_delete($handler_id, $args, &$data) 
     
    294307    /** 
    295308     * Shows the loaded application. 
     309     * 
     310     * @param mixed $handler_id The ID of the handler. 
     311     * @param mixed &$data The local request data. 
    296312     */ 
    297313    function _show_delete ($handler_id, &$data) 
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/application/create.php

    r14775 r14851  
    7979     * Loads and prepares the schema database. 
    8080     * 
    81      * Special treatement is done for the name field, which is set readonly for non-creates 
     81     * Special treatment is done for the name field, which is set readonly for non-creates 
    8282     * if the simple_name_handling config option is set. (using an auto-generated urlname based 
    8383     * on the title, if it is missing.) 
     
    152152     * phase. 
    153153     * 
    154      * If create privileges apply, we relocate to the index creation article, 
     154     * If create privileges apply, we relocate to the index creation article 
     155     * 
     156     * @param mixed $handler_id The ID of the handler. 
     157     * @param Array $args The argument list. 
     158     * @param Array &$data The local request data. 
     159     * @return boolean Indicating success. 
    155160     */ 
    156161    function _handler_create($handler_id, $args, &$data) 
     
    196201    /** 
    197202     * Shows the loaded article. 
     203     * 
     204     * @param mixed $handler_id The ID of the handler. 
     205     * @param mixed &$data The local request data. 
    198206     */ 
    199207    function _show_create ($handler_id, &$data) 
     
    202210    } 
    203211 
     212    /** 
     213     * @param mixed $handler_id The ID of the handler. 
     214     * @param Array $args The argument list. 
     215     * @param Array &$data The local request data. 
     216     * @return boolean Indicating success. 
     217     */ 
    204218    function _handler_apply($handler_id, $args, &$data) 
    205219    { 
     
    238252            // see the relocate in process_form as well 
    239253            $_MIDCOM->relocate("application/{$applications[0]->guid}.html"); 
    240         }     
     254        } 
    241255 
    242256        if (!$this->_device->can_apply($_MIDGARD['user'])) 
     
    286300    } 
    287301 
     302    /** 
     303     * 
     304     * @param mixed $handler_id The ID of the handler. 
     305     * @param mixed &$data The local request data. 
     306     */ 
    288307    function _show_apply($handler_id, &$data) 
    289308    { 
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/application/list.php

    r12241 r14851  
    6565 
    6666    /** 
    67      * Render a view of the users applications 
     67     * Render a view of the user's applications 
     68     * 
     69     * @param mixed $handler_id The ID of the handler. 
     70     * @param Array $args The argument list. 
     71     * @param Array &$data The local request data. 
     72     * @return boolean Indicating success. 
    6873     */ 
    6974    function _handler_my($handler_id, $args, &$data) 
     
    9297    /** 
    9398     * Shows the loaded list. 
     99     * 
     100     * @param mixed $handler_id The ID of the handler. 
     101     * @param mixed &$data The local request data. 
    94102     */ 
    95103    function _show_my($handler_id, &$data) 
     
    106114    /** 
    107115     * Handle actual application display 
     116     * 
     117     * @param mixed $handler_id The ID of the handler. 
     118     * @param Array $args The argument list. 
     119     * @param Array &$data The local request data. 
     120     * @return boolean Indicating success. 
    108121     */ 
    109122    function _handler_list($handler_id, $args, &$data) 
     
    163176    /** 
    164177     * Shows the loaded list. 
     178     * 
     179     * @param mixed $handler_id The ID of the handler. 
     180     * @param mixed &$data The local request data. 
    165181     */ 
    166182    function _show_list ($handler_id, &$data) 
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/application/view.php

    r12691 r14851  
    7878    /** 
    7979     * Handle actual application display 
     80     * 
     81     * @param mixed $handler_id The ID of the handler. 
     82     * @param Array $args The argument list. 
     83     * @param Array &$data The local request data. 
     84     * @return boolean Indicating success. 
    8085     */ 
    8186    function _handler_view ($handler_id, $args, &$data) 
     
    153158    /** 
    154159     * Shows the loaded application. 
     160     * 
     161     * @param mixed $handler_id The ID of the handler. 
     162     * @param mixed &$data The local request data. 
    155163     */ 
    156164    function _show_view ($handler_id, &$data) 
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/code/admin.php

    r12691 r14851  
    9696     * Loads and prepares the schema database. 
    9797     * 
    98      * Special treatement is done for the name field, which is set readonly for non-admins 
     98     * Special treatment is done for the name field, which is set readonly for non-admins 
    9999     * if the simple_name_handling config option is set. (using an auto-generated urlname based 
    100100     * on the title, if it is missing.) 
     
    145145 
    146146    /** 
    147      * Helper, updates the context so that we get a complete breadcrum line towards the current 
     147     * Helper, updates the context so that we get a complete breadcrumb line towards the current 
    148148     * location. 
    149149     * 
     
    170170 
    171171    /** 
    172      * Displays an code edit view. 
     172     * Displays a code edit view. 
    173173     * 
    174174     * Note, that the code for non-index mode operation is automatically determined in the can_handle 
    175175     * phase. 
    176176     * 
    177      * If create privileges apply, we relocate to the index creation code, 
     177     * If create privileges apply, we relocate to the index creation code 
     178     * 
     179     * @param mixed $handler_id The ID of the handler. 
     180     * @param Array $args The argument list. 
     181     * @param Array &$data The local request data. 
     182     * @return boolean Indicating success. 
    178183     */ 
    179184    function _handler_edit($handler_id, $args, &$data) 
     
    200205                // *** FALL-THROUGH *** 
    201206 
    202             case 'cancel':        
     207            case 'cancel': 
    203208                $_MIDCOM->relocate("code/{$this->_code->guid}.html"); 
    204209                // This will exit. 
     
    218223    /** 
    219224     * Shows the loaded code. 
     225     * 
     226     * @param mixed $handler_id The ID of the handler. 
     227     * @param mixed &$data The local request data. 
    220228     */ 
    221229    function _show_edit ($handler_id, &$data) 
     
    225233 
    226234    /** 
    227      * Displays an code delete confirmation view. 
     235     * Displays a code delete confirmation view. 
    228236     * 
    229237     * Note, that the code for non-index mode operation is automatically determined in the can_handle 
    230238     * phase. 
    231239     * 
    232      * If create privileges apply, we relocate to the index creation code, 
     240     * If create privileges apply, we relocate to the index creation code 
     241     * 
     242     * @param mixed $handler_id The ID of the handler. 
     243     * @param Array $args The argument list. 
     244     * @param Array &$data The local request data. 
     245     * @return boolean Indicating success. 
    233246     */ 
    234247    function _handler_delete($handler_id, $args, &$data) 
     
    286299    /** 
    287300     * Shows the loaded code. 
     301     * 
     302     * @param mixed $handler_id The ID of the handler. 
     303     * @param mixed &$data The local request data. 
    288304     */ 
    289305    function _show_delete ($handler_id, &$data) 
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/code/assign.php

    r13271 r14851  
    2424 
    2525    var $_area = false; 
    26      
     26 
    2727    var $_code_pool = array(); 
    2828 
     
    189189    /** 
    190190     * Handle actual code display 
     191     * 
     192     * @param mixed $handler_id The ID of the handler. 
     193     * @param Array $args The argument list. 
     194     * @param Array &$data The local request data. 
     195     * @return boolean Indicating success. 
    191196     */ 
    192197    function _handler_process($handler_id, $args, &$data) 
     
    265270            MIDCOM_NAV_NAME => $this->_device->title, 
    266271        ); 
    267          
     272 
    268273        $tmp[] = Array 
    269274        ( 
     
    285290    } 
    286291 
     292    /** 
     293     * 
     294     * @param mixed $handler_id The ID of the handler. 
     295     * @param mixed &$data The local request data. 
     296     */ 
    287297    function _show_process($handler_id, &$data) 
    288298    { 
     
    292302    /** 
    293303     * Handle actual code display 
     304     * 
     305     * @param mixed $handler_id The ID of the handler. 
     306     * @param Array $args The argument list. 
     307     * @param Array &$data The local request data. 
     308     * @return boolean Indicating success. 
    294309     */ 
    295310    function _handler_list($handler_id, $args, &$data) 
     
    348363            MIDCOM_NAV_NAME => $this->_device->title, 
    349364        ); 
    350          
     365 
    351366        $tmp[] = Array 
    352367        ( 
     
    373388    } 
    374389 
    375     /**  
     390    /** 
    376391     * Used to sort the $data['applications'] array by applicants karma 
    377      *  
     392     * 
    378393     * Done this way since we can't sort by linked metadata in 1.8.4 
    379394     */ 
     
    412427    /** 
    413428     * Shows the loaded list. 
     429     * 
     430     * @param mixed $handler_id The ID of the handler. 
     431     * @param mixed &$data The local request data. 
    414432     */ 
    415433    function _show_list($handler_id, &$data) 
     
    434452    /** 
    435453     * Handle actual code display 
     454     * 
     455     * @param mixed $handler_id The ID of the handler. 
     456     * @param Array $args The argument list. 
     457     * @param Array &$data The local request data. 
     458     * @return boolean Indicating success. 
    436459     */ 
    437460    function _handler_select_area($handler_id, $args, &$data) 
     
    455478            '__ANY__' => 0, 
    456479        ); 
    457          
     480 
    458481        // Use raw collector to be able to set key property 
    459482        $mc = new midgard_collector('org_maemo_devcodes_code', 'device', $this->_device->id); 
     
    509532        $_MIDCOM->set_pagetitle("{$this->_topic->extra}: {$data['title']}"); 
    510533 
    511          
     534 
    512535        return true; 
    513536    } 
    514537 
     538    /** 
     539     * 
     540     * @param mixed $handler_id The ID of the handler. 
     541     * @param mixed &$data The local request data. 
     542     */ 
    515543    function _show_select_area($handler_id, &$data) 
    516544    { 
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/code/create.php

    r14775 r14851  
    7676     * Loads and prepares the schema database. 
    7777     * 
    78      * Special treatement is done for the name field, which is set readonly for non-creates 
     78     * Special treatment is done for the name field, which is set readonly for non-creates 
    7979     * if the simple_name_handling config option is set. (using an auto-generated urlname based 
    8080     * on the title, if it is missing.) 
     
    135135     * phase. 
    136136     * 
    137      * If create privileges apply, we relocate to the index creation article, 
     137     * If create privileges apply, we relocate to the index creation article 
     138     * 
     139     * @param mixed $handler_id The ID of the handler. 
     140     * @param Array $args The argument list. 
     141     * @param Array &$data The local request data. 
     142     * @return boolean Indicating success. 
    138143     */ 
    139144    function _handler_create($handler_id, $args, &$data) 
     
    169174 
    170175    /** 
    171      * Helper, updates the context so that we get a complete breadcrum line towards the current 
     176     * Helper, updates the context so that we get a complete breadcrumb line towards the current 
    172177     * location. 
    173178     * 
     
    187192    /** 
    188193     * Shows the loaded article. 
     194     * 
     195     * @param mixed $handler_id The ID of the handler. 
     196     * @param mixed &$data The local request data. 
    189197     */ 
    190198    function _show_create ($handler_id, &$data) 
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/code/import.php

    r12440 r14851  
    5757    } 
    5858 
     59    /** 
     60     * @param mixed $handler_id The ID of the handler. 
     61     * @param Array $args The argument list. 
     62     * @param Array &$data The local request data. 
     63     * @return boolean Indicating success. 
     64     */ 
    5965    function _handler_process($handler_id, $args, &$data) 
    6066    { 
     
    9197        $this->_device->require_do('midgard:create'); 
    9298        $data['device'] =& $this->_device; 
    93          
     99 
    94100 
    95101        $data['import_stats'] = array 
     
    219225        } 
    220226        $code->set_parameter('midcom.helper.datamanager2', 'schema_name', 'code'); 
    221          
     227 
    222228 
    223229        ++$data['import_stats']['ok']; 
     
    225231    } 
    226232 
     233    /** 
     234     * 
     235     * @param mixed $handler_id The ID of the handler. 
     236     * @param mixed &$data The local request data. 
     237     */ 
    227238    function _show_process($handler_id, &$data) 
    228239    { 
     
    232243    /** 
    233244     * Handle actual code display 
     245     * 
     246     * @param mixed $handler_id The ID of the handler. 
     247     * @param Array $args The argument list. 
     248     * @param Array &$data The local request data. 
     249     * @return boolean Indicating success. 
    234250     */ 
    235251    function _handler_import($handler_id, $args, &$data) 
     
    272288    /** 
    273289     * Shows the loaded list. 
     290     * 
     291     * @param mixed $handler_id The ID of the handler. 
     292     * @param mixed &$data The local request data. 
    274293     */ 
    275294    function _show_import($handler_id, &$data) 
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/code/list.php

    r12230 r14851  
    5959    /** 
    6060     * Handle actual code display 
     61     * 
     62     * @param mixed $handler_id The ID of the handler. 
     63     * @param Array $args The argument list. 
     64     * @param Array &$data The local request data. 
     65     * @return boolean Indicating success. 
    6166     */ 
    6267    function _handler_list($handler_id, $args, &$data) 
     
    114119    /** 
    115120     * Shows the loaded list. 
     121     * 
     122     * @param mixed $handler_id The ID of the handler. 
     123     * @param mixed &$data The local request data. 
    116124     */ 
    117125    function _show_list ($handler_id, &$data) 
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/code/view.php

    r12569 r14851  
    7878    /** 
    7979     * Handle actual code display 
     80     * 
     81     * @param mixed $handler_id The ID of the handler. 
     82     * @param Array $args The argument list. 
     83     * @param Array &$data The local request data. 
     84     * @return boolean Indicating success. 
    8085     */ 
    8186    function _handler_view ($handler_id, $args, &$data) 
     
    170175    /** 
    171176     * Shows the loaded code. 
     177     * 
     178     * @param mixed $handler_id The ID of the handler. 
     179     * @param mixed &$data The local request data. 
    172180     */ 
    173181    function _show_view ($handler_id, &$data) 
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/device/admin.php

    r12691 r14851  
    9696     * Loads and prepares the schema database. 
    9797     * 
    98      * Special treatement is done for the name field, which is set readonly for non-admins 
     98     * Special treatment is done for the name field, which is set readonly for non-admins 
    9999     * if the simple_name_handling config option is set. (using an auto-generated urlname based 
    100100     * on the title, if it is missing.) 
     
    145145 
    146146    /** 
    147      * Helper, updates the context so that we get a complete breadcrum line towards the current 
     147     * Helper, updates the context so that we get a complete breadcrumb line towards the current 
    148148     * location. 
    149149     * 
     
    170170 
    171171    /** 
    172      * Displays an device edit view. 
     172     * Displays a device edit view. 
    173173     * 
    174174     * Note, that the device for non-index mode operation is automatically determined in the can_handle 
    175175     * phase. 
    176176     * 
    177      * If create privileges apply, we relocate to the index creation device, 
     177     * If create privileges apply, we relocate to the index creation device 
     178     * 
     179     * @param mixed $handler_id The ID of the handler. 
     180     * @param Array $args The argument list. 
     181     * @param Array &$data The local request data. 
     182     * @return boolean Indicating success. 
    178183     */ 
    179184    function _handler_edit($handler_id, $args, &$data) 
     
    201206                // *** FALL-THROUGH *** 
    202207 
    203             case 'cancel':        
     208            case 'cancel': 
    204209                $_MIDCOM->relocate("device/{$this->_device->guid}.html"); 
    205210                // This will exit. 
     
    219224    /** 
    220225     * Shows the loaded device. 
     226     * 
     227     * @param mixed $handler_id The ID of the handler. 
     228     * @param mixed &$data The local request data. 
    221229     */ 
    222230    function _show_edit ($handler_id, &$data) 
     
    226234 
    227235    /** 
    228      * Displays an device delete confirmation view. 
     236     * Displays a device delete confirmation view. 
    229237     * 
    230238     * Note, that the device for non-index mode operation is automatically determined in the can_handle 
    231239     * phase. 
    232240     * 
    233      * If create privileges apply, we relocate to the index creation device, 
     241     * If create privileges apply, we relocate to the index creation device 
     242     * 
     243     * @param mixed $handler_id The ID of the handler. 
     244     * @param Array $args The argument list. 
     245     * @param Array &$data The local request data. 
     246     * @return boolean Indicating success. 
    234247     */ 
    235248    function _handler_delete($handler_id, $args, &$data) 
     
    287300    /** 
    288301     * Shows the loaded device. 
     302     * 
     303     * @param mixed $handler_id The ID of the handler. 
     304     * @param mixed &$data The local request data. 
    289305     */ 
    290306    function _show_delete ($handler_id, &$data) 
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/device/create.php

    r14775 r14851  
    7676     * Loads and prepares the schema database. 
    7777     * 
    78      * Special treatement is done for the name field, which is set readonly for non-creates 
     78     * Special treatment is done for the name field, which is set readonly for non-creates 
    7979     * if the simple_name_handling config option is set. (using an auto-generated urlname based 
    8080     * on the title, if it is missing.) 
     
    135135     * phase. 
    136136     * 
    137      * If create privileges apply, we relocate to the index creation article, 
     137     * If create privileges apply, we relocate to the index creation article 
     138     * 
     139     * @param mixed $handler_id The ID of the handler. 
     140     * @param Array $args The argument list. 
     141     * @param Array &$data The local request data. 
     142     * @return boolean Indicating success. 
    138143     */ 
    139144    function _handler_create($handler_id, $args, &$data) 
     
    169174 
    170175    /** 
    171      * Helper, updates the context so that we get a complete breadcrum line towards the current 
     176     * Helper, updates the context so that we get a complete breadcrumb line towards the current 
    172177     * location. 
    173178     * 
     
    187192    /** 
    188193     * Shows the loaded article. 
     194     * 
     195     * @param mixed $handler_id The ID of the handler. 
     196     * @param mixed &$data The local request data. 
    189197     */ 
    190198    function _show_create ($handler_id, &$data) 
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/device/view.php

    r12569 r14851  
    106106    /** 
    107107     * Handle actual device display 
     108     * 
     109     * @param mixed $handler_id The ID of the handler. 
     110     * @param Array $args The argument list. 
     111     * @param Array &$data The local request data. 
     112     * @return boolean Indicating success. 
    108113     */ 
    109114    function _handler_view ($handler_id, $args, &$data) 
     
    174179    /** 
    175180     * Shows the loaded device. 
     181     * 
     182     * @param mixed $handler_id The ID of the handler. 
     183     * @param mixed &$data The local request data. 
    176184     */ 
    177185    function _show_view ($handler_id, &$data) 
  • branches/MidCOM_2_8/org.maemo.devcodes/handler/index.php

    r14775 r14851  
    88 
    99/** 
    10  * This is an URL handler class for org.maemo.devcodes 
     10 * This is a URL handler class for org.maemo.devcodes 
    1111 * 
    1212 * The midcom_baseclasses_components_handler class defines a bunch of helper vars 
    13  * See: http://www.midgard-project.org/api-docs/midcom/dev/midcom.baseclasses/midcom_baseclasses_components_handler.html 
    14  *  
     13 * 
     14 * @see midcom_baseclasses_components_handler 
    1515 * @package org.maemo.devcodes 
    1616 */ 
    17 class org_maemo_devcodes_handler_index  extends midcom_baseclasses_components_handler  
     17class org_maemo_devcodes_handler_index  extends midcom_baseclasses_components_handler 
    1818{ 
    1919    var $_mode = 'user'; 
    20      
     20 
    2121    /** 
    2222     * Simple default constructor. 
     
    2626        parent::midcom_baseclasses_components_handler(); 
    2727    } 
    28      
     28 
    2929    /** 
    30      * _on_initialize is called by midcom on creation of the handler.  
     30     * _on_initialize is called by midcom on creation of the handler. 
    3131     */ 
    3232    function _on_initialize() 
    3333    { 
    3434    } 
    35      
     35 
    3636    /** 
    37      * The handler for the index article.  
    38      * @param mixed $handler_id the array key from the requestarray 
     37     * The handler for the index article. 
     38     * 
     39     * @param mixed $handler_id the array key from the request array 
    3940     * @param array $args the arguments given to the handler 
    40      *  
     41     * @param Array &$data The local request data. 
     42     * @return boolean Indicating success. 
    4143     */ 
    4244    function _handler_index ($handler_id, $args, &$data) 
     
    6668        return true; 
    6769    } 
    68      
     70 
    6971    /** 
    7072     * This function does the output. 
    71      *   
     73     * 
     74     * @param mixed $handler_id The ID of the handler. 
     75     * @param mixed &$data The local request data. 
    7276     */ 
    7377    function _show_index($handler_id, &$data)