Changeset 14851
- Timestamp:
- 02/11/08 14:11:21 (10 months ago)
- Files:
-
- branches/MidCOM_2_8/org.maemo.devcodes/handler/application/admin.php (modified) (7 diffs)
- branches/MidCOM_2_8/org.maemo.devcodes/handler/application/create.php (modified) (6 diffs)
- branches/MidCOM_2_8/org.maemo.devcodes/handler/application/list.php (modified) (4 diffs)
- branches/MidCOM_2_8/org.maemo.devcodes/handler/application/view.php (modified) (2 diffs)
- branches/MidCOM_2_8/org.maemo.devcodes/handler/code/admin.php (modified) (7 diffs)
- branches/MidCOM_2_8/org.maemo.devcodes/handler/code/assign.php (modified) (11 diffs)
- branches/MidCOM_2_8/org.maemo.devcodes/handler/code/create.php (modified) (4 diffs)
- branches/MidCOM_2_8/org.maemo.devcodes/handler/code/import.php (modified) (6 diffs)
- branches/MidCOM_2_8/org.maemo.devcodes/handler/code/list.php (modified) (2 diffs)
- branches/MidCOM_2_8/org.maemo.devcodes/handler/code/view.php (modified) (2 diffs)
- branches/MidCOM_2_8/org.maemo.devcodes/handler/device/admin.php (modified) (7 diffs)
- branches/MidCOM_2_8/org.maemo.devcodes/handler/device/create.php (modified) (4 diffs)
- branches/MidCOM_2_8/org.maemo.devcodes/handler/device/view.php (modified) (2 diffs)
- branches/MidCOM_2_8/org.maemo.devcodes/handler/index.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/MidCOM_2_8/org.maemo.devcodes/handler/application/admin.php
r12691 r14851 96 96 * Loads and prepares the schema database. 97 97 * 98 * Special treat ement is done for the name field, which is set readonly for non-admins98 * Special treatment is done for the name field, which is set readonly for non-admins 99 99 * if the simple_name_handling config option is set. (using an auto-generated urlname based 100 100 * on the title, if it is missing.) … … 153 153 154 154 /** 155 * Helper, updates the context so that we get a complete breadcrum line towards the current155 * Helper, updates the context so that we get a complete breadcrumb line towards the current 156 156 * location. 157 157 * … … 183 183 * phase. 184 184 * 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. 186 191 */ 187 192 function _handler_edit($handler_id, $args, &$data) … … 209 214 // *** FALL-THROUGH *** 210 215 211 case 'cancel': 216 case 'cancel': 212 217 $_MIDCOM->relocate("application/{$this->_application->guid}.html"); 213 218 // This will exit. … … 227 232 /** 228 233 * Shows the loaded application. 234 * 235 * @param mixed $handler_id The ID of the handler. 236 * @param mixed &$data The local request data. 229 237 */ 230 238 function _show_edit ($handler_id, &$data) … … 239 247 * phase. 240 248 * 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. 242 255 */ 243 256 function _handler_delete($handler_id, $args, &$data) … … 294 307 /** 295 308 * Shows the loaded application. 309 * 310 * @param mixed $handler_id The ID of the handler. 311 * @param mixed &$data The local request data. 296 312 */ 297 313 function _show_delete ($handler_id, &$data) branches/MidCOM_2_8/org.maemo.devcodes/handler/application/create.php
r14775 r14851 79 79 * Loads and prepares the schema database. 80 80 * 81 * Special treat ement is done for the name field, which is set readonly for non-creates81 * Special treatment is done for the name field, which is set readonly for non-creates 82 82 * if the simple_name_handling config option is set. (using an auto-generated urlname based 83 83 * on the title, if it is missing.) … … 152 152 * phase. 153 153 * 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. 155 160 */ 156 161 function _handler_create($handler_id, $args, &$data) … … 196 201 /** 197 202 * Shows the loaded article. 203 * 204 * @param mixed $handler_id The ID of the handler. 205 * @param mixed &$data The local request data. 198 206 */ 199 207 function _show_create ($handler_id, &$data) … … 202 210 } 203 211 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 */ 204 218 function _handler_apply($handler_id, $args, &$data) 205 219 { … … 238 252 // see the relocate in process_form as well 239 253 $_MIDCOM->relocate("application/{$applications[0]->guid}.html"); 240 } 254 } 241 255 242 256 if (!$this->_device->can_apply($_MIDGARD['user'])) … … 286 300 } 287 301 302 /** 303 * 304 * @param mixed $handler_id The ID of the handler. 305 * @param mixed &$data The local request data. 306 */ 288 307 function _show_apply($handler_id, &$data) 289 308 { branches/MidCOM_2_8/org.maemo.devcodes/handler/application/list.php
r12241 r14851 65 65 66 66 /** 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. 68 73 */ 69 74 function _handler_my($handler_id, $args, &$data) … … 92 97 /** 93 98 * Shows the loaded list. 99 * 100 * @param mixed $handler_id The ID of the handler. 101 * @param mixed &$data The local request data. 94 102 */ 95 103 function _show_my($handler_id, &$data) … … 106 114 /** 107 115 * 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. 108 121 */ 109 122 function _handler_list($handler_id, $args, &$data) … … 163 176 /** 164 177 * Shows the loaded list. 178 * 179 * @param mixed $handler_id The ID of the handler. 180 * @param mixed &$data The local request data. 165 181 */ 166 182 function _show_list ($handler_id, &$data) branches/MidCOM_2_8/org.maemo.devcodes/handler/application/view.php
r12691 r14851 78 78 /** 79 79 * 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. 80 85 */ 81 86 function _handler_view ($handler_id, $args, &$data) … … 153 158 /** 154 159 * Shows the loaded application. 160 * 161 * @param mixed $handler_id The ID of the handler. 162 * @param mixed &$data The local request data. 155 163 */ 156 164 function _show_view ($handler_id, &$data) branches/MidCOM_2_8/org.maemo.devcodes/handler/code/admin.php
r12691 r14851 96 96 * Loads and prepares the schema database. 97 97 * 98 * Special treat ement is done for the name field, which is set readonly for non-admins98 * Special treatment is done for the name field, which is set readonly for non-admins 99 99 * if the simple_name_handling config option is set. (using an auto-generated urlname based 100 100 * on the title, if it is missing.) … … 145 145 146 146 /** 147 * Helper, updates the context so that we get a complete breadcrum line towards the current147 * Helper, updates the context so that we get a complete breadcrumb line towards the current 148 148 * location. 149 149 * … … 170 170 171 171 /** 172 * Displays a ncode edit view.172 * Displays a code edit view. 173 173 * 174 174 * Note, that the code for non-index mode operation is automatically determined in the can_handle 175 175 * phase. 176 176 * 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. 178 183 */ 179 184 function _handler_edit($handler_id, $args, &$data) … … 200 205 // *** FALL-THROUGH *** 201 206 202 case 'cancel': 207 case 'cancel': 203 208 $_MIDCOM->relocate("code/{$this->_code->guid}.html"); 204 209 // This will exit. … … 218 223 /** 219 224 * Shows the loaded code. 225 * 226 * @param mixed $handler_id The ID of the handler. 227 * @param mixed &$data The local request data. 220 228 */ 221 229 function _show_edit ($handler_id, &$data) … … 225 233 226 234 /** 227 * Displays a ncode delete confirmation view.235 * Displays a code delete confirmation view. 228 236 * 229 237 * Note, that the code for non-index mode operation is automatically determined in the can_handle 230 238 * phase. 231 239 * 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. 233 246 */ 234 247 function _handler_delete($handler_id, $args, &$data) … … 286 299 /** 287 300 * Shows the loaded code. 301 * 302 * @param mixed $handler_id The ID of the handler. 303 * @param mixed &$data The local request data. 288 304 */ 289 305 function _show_delete ($handler_id, &$data) branches/MidCOM_2_8/org.maemo.devcodes/handler/code/assign.php
r13271 r14851 24 24 25 25 var $_area = false; 26 26 27 27 var $_code_pool = array(); 28 28 … … 189 189 /** 190 190 * 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. 191 196 */ 192 197 function _handler_process($handler_id, $args, &$data) … … 265 270 MIDCOM_NAV_NAME => $this->_device->title, 266 271 ); 267 272 268 273 $tmp[] = Array 269 274 ( … … 285 290 } 286 291 292 /** 293 * 294 * @param mixed $handler_id The ID of the handler. 295 * @param mixed &$data The local request data. 296 */ 287 297 function _show_process($handler_id, &$data) 288 298 { … … 292 302 /** 293 303 * 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. 294 309 */ 295 310 function _handler_list($handler_id, $args, &$data) … … 348 363 MIDCOM_NAV_NAME => $this->_device->title, 349 364 ); 350 365 351 366 $tmp[] = Array 352 367 ( … … 373 388 } 374 389 375 /** 390 /** 376 391 * Used to sort the $data['applications'] array by applicants karma 377 * 392 * 378 393 * Done this way since we can't sort by linked metadata in 1.8.4 379 394 */ … … 412 427 /** 413 428 * Shows the loaded list. 429 * 430 * @param mixed $handler_id The ID of the handler. 431 * @param mixed &$data The local request data. 414 432 */ 415 433 function _show_list($handler_id, &$data) … … 434 452 /** 435 453 * 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. 436 459 */ 437 460 function _handler_select_area($handler_id, $args, &$data) … … 455 478 '__ANY__' => 0, 456 479 ); 457 480 458 481 // Use raw collector to be able to set key property 459 482 $mc = new midgard_collector('org_maemo_devcodes_code', 'device', $this->_device->id); … … 509 532 $_MIDCOM->set_pagetitle("{$this->_topic->extra}: {$data['title']}"); 510 533 511 534 512 535 return true; 513 536 } 514 537 538 /** 539 * 540 * @param mixed $handler_id The ID of the handler. 541 * @param mixed &$data The local request data. 542 */ 515 543 function _show_select_area($handler_id, &$data) 516 544 { branches/MidCOM_2_8/org.maemo.devcodes/handler/code/create.php
r14775 r14851 76 76 * Loads and prepares the schema database. 77 77 * 78 * Special treat ement is done for the name field, which is set readonly for non-creates78 * Special treatment is done for the name field, which is set readonly for non-creates 79 79 * if the simple_name_handling config option is set. (using an auto-generated urlname based 80 80 * on the title, if it is missing.) … … 135 135 * phase. 136 136 * 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. 138 143 */ 139 144 function _handler_create($handler_id, $args, &$data) … … 169 174 170 175 /** 171 * Helper, updates the context so that we get a complete breadcrum line towards the current176 * Helper, updates the context so that we get a complete breadcrumb line towards the current 172 177 * location. 173 178 * … … 187 192 /** 188 193 * Shows the loaded article. 194 * 195 * @param mixed $handler_id The ID of the handler. 196 * @param mixed &$data The local request data. 189 197 */ 190 198 function _show_create ($handler_id, &$data) branches/MidCOM_2_8/org.maemo.devcodes/handler/code/import.php
r12440 r14851 57 57 } 58 58 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 */ 59 65 function _handler_process($handler_id, $args, &$data) 60 66 { … … 91 97 $this->_device->require_do('midgard:create'); 92 98 $data['device'] =& $this->_device; 93 99 94 100 95 101 $data['import_stats'] = array … … 219 225 } 220 226 $code->set_parameter('midcom.helper.datamanager2', 'schema_name', 'code'); 221 227 222 228 223 229 ++$data['import_stats']['ok']; … … 225 231 } 226 232 233 /** 234 * 235 * @param mixed $handler_id The ID of the handler. 236 * @param mixed &$data The local request data. 237 */ 227 238 function _show_process($handler_id, &$data) 228 239 { … … 232 243 /** 233 244 * 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. 234 250 */ 235 251 function _handler_import($handler_id, $args, &$data) … … 272 288 /** 273 289 * Shows the loaded list. 290 * 291 * @param mixed $handler_id The ID of the handler. 292 * @param mixed &$data The local request data. 274 293 */ 275 294 function _show_import($handler_id, &$data) branches/MidCOM_2_8/org.maemo.devcodes/handler/code/list.php
r12230 r14851 59 59 /** 60 60 * 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. 61 66 */ 62 67 function _handler_list($handler_id, $args, &$data) … … 114 119 /** 115 120 * Shows the loaded list. 121 * 122 * @param mixed $handler_id The ID of the handler. 123 * @param mixed &$data The local request data. 116 124 */ 117 125 function _show_list ($handler_id, &$data) branches/MidCOM_2_8/org.maemo.devcodes/handler/code/view.php
r12569 r14851 78 78 /** 79 79 * 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. 80 85 */ 81 86 function _handler_view ($handler_id, $args, &$data) … … 170 175 /** 171 176 * Shows the loaded code. 177 * 178 * @param mixed $handler_id The ID of the handler. 179 * @param mixed &$data The local request data. 172 180 */ 173 181 function _show_view ($handler_id, &$data) branches/MidCOM_2_8/org.maemo.devcodes/handler/device/admin.php
r12691 r14851 96 96 * Loads and prepares the schema database. 97 97 * 98 * Special treat ement is done for the name field, which is set readonly for non-admins98 * Special treatment is done for the name field, which is set readonly for non-admins 99 99 * if the simple_name_handling config option is set. (using an auto-generated urlname based 100 100 * on the title, if it is missing.) … … 145 145 146 146 /** 147 * Helper, updates the context so that we get a complete breadcrum line towards the current147 * Helper, updates the context so that we get a complete breadcrumb line towards the current 148 148 * location. 149 149 * … … 170 170 171 171 /** 172 * Displays a ndevice edit view.172 * Displays a device edit view. 173 173 * 174 174 * Note, that the device for non-index mode operation is automatically determined in the can_handle 175 175 * phase. 176 176 * 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. 178 183 */ 179 184 function _handler_edit($handler_id, $args, &$data) … … 201 206 // *** FALL-THROUGH *** 202 207 203 case 'cancel': 208 case 'cancel': 204 209 $_MIDCOM->relocate("device/{$this->_device->guid}.html"); 205 210 // This will exit. … … 219 224 /** 220 225 * Shows the loaded device. 226 * 227 * @param mixed $handler_id The ID of the handler. 228 * @param mixed &$data The local request data. 221 229 */ 222 230 function _show_edit ($handler_id, &$data) … … 226 234 227 235 /** 228 * Displays a ndevice delete confirmation view.236 * Displays a device delete confirmation view. 229 237 * 230 238 * Note, that the device for non-index mode operation is automatically determined in the can_handle 231 239 * phase. 232 240 * 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. 234 247 */ 235 248 function _handler_delete($handler_id, $args, &$data) … … 287 300 /** 288 301 * Shows the loaded device. 302 * 303 * @param mixed $handler_id The ID of the handler. 304 * @param mixed &$data The local request data. 289 305 */ 290 306 function _show_delete ($handler_id, &$data) branches/MidCOM_2_8/org.maemo.devcodes/handler/device/create.php
r14775 r14851 76 76 * Loads and prepares the schema database. 77 77 * 78 * Special treat ement is done for the name field, which is set readonly for non-creates78 * Special treatment is done for the name field, which is set readonly for non-creates 79 79 * if the simple_name_handling config option is set. (using an auto-generated urlname based 80 80 * on the title, if it is missing.) … … 135 135 * phase. 136 136 * 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. 138 143 */ 139 144 function _handler_create($handler_id, $args, &$data) … … 169 174 170 175 /** 171 * Helper, updates the context so that we get a complete breadcrum line towards the current176 * Helper, updates the context so that we get a complete breadcrumb line towards the current 172 177 * location. 173 178 * … … 187 192 /** 188 193 * Shows the loaded article. 194 * 195 * @param mixed $handler_id The ID of the handler. 196 * @param mixed &$data The local request data. 189 197 */ 190 198 function _show_create ($handler_id, &$data) branches/MidCOM_2_8/org.maemo.devcodes/handler/device/view.php
r12569 r14851 106 106 /** 107 107 * 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. 108 113 */ 109 114 function _handler_view ($handler_id, $args, &$data) … … 174 179 /** 175 180 * Shows the loaded device. 181 * 182 * @param mixed $handler_id The ID of the handler. 183 * @param mixed &$data The local request data. 176 184 */ 177 185 function _show_view ($handler_id, &$data) branches/MidCOM_2_8/org.maemo.devcodes/handler/index.php
r14775 r14851 8 8 9 9 /** 10 * This is a nURL handler class for org.maemo.devcodes10 * This is a URL handler class for org.maemo.devcodes 11 11 * 12 12 * 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.html14 * 13 * 14 * @see midcom_baseclasses_components_handler 15 15 * @package org.maemo.devcodes 16 16 */ 17 class org_maemo_devcodes_handler_index extends midcom_baseclasses_components_handler 17 class org_maemo_devcodes_handler_index extends midcom_baseclasses_components_handler 18 18 { 19 19 var $_mode = 'user'; 20 20 21 21 /** 22 22 * Simple default constructor. … … 26 26 parent::midcom_baseclasses_components_handler(); 27 27 } 28 28 29 29 /** 30 * _on_initialize is called by midcom on creation of the handler. 30 * _on_initialize is called by midcom on creation of the handler. 31 31 */ 32 32 function _on_initialize() 33 33 { 34 34 } 35 35 36 36 /** 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 39 40 * @param array $args the arguments given to the handler 40 * 41 * @param Array &$data The local request data. 42 * @return boolean Indicating success. 41 43 */ 42 44 function _handler_index ($handler_id, $args, &$data) … … 66 68 return true; 67 69 } 68 70 69 71 /** 70 72 * 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. 72 76 */ 73 77 function _show_index($handler_id, &$data)
