Changeset 17900
- Timestamp:
- 10/03/08 16:58:36 (2 months ago)
- Files:
-
- trunk/midcom/midcom.core/midcom/application.php (modified) (3 diffs)
- trunk/midcom/midcom.core/midcom/baseclasses/components/request.php (modified) (7 diffs)
- trunk/midcom/midcom.core/midcom/baseclasses/core/dbobject.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/baseclasses/database/attachment.php (modified) (3 diffs)
- trunk/midcom/midcom.core/midcom/services/auth.php (modified) (4 diffs)
- trunk/midcom/midcom.core/midcom/services/cache/module/content.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.core/midcom/application.php
r17899 r17900 2303 2303 2304 2304 debug_push_class(__CLASS__, __FUNCTION__); 2305 debug_add("Serving Attachment {$attachment->name} (parent: {$attachment->parentguid})", MIDCOM_LOG_INFO);2305 //debug_add("Serving Attachment {$attachment->name} (parent: {$attachment->parentguid})", MIDCOM_LOG_INFO); 2306 2306 2307 2307 $etag = md5("{$last_modified}{$attachment->name}{$attachment->mimetype}{$attachment->guid}"); … … 2323 2323 while(@ob_end_flush()); 2324 2324 //debug_add('headers sent, exit()ing so nothing has a chance the mess things up anymore'); 2325 //debug_pop(); 2325 debug_pop(); 2326 debug_add("End of MidCOM run: {$_SERVER['REQUEST_URI']}", MIDCOM_LOG_INFO); 2326 2327 exit(); 2327 2328 } … … 2407 2408 fpassthru($f); 2408 2409 $attachment->close(); 2409 debug_add('file sent, exit()ing so nothing has a chance the mess things up anymore');2410 //debug_add('file sent, exit()ing so nothing has a chance the mess things up anymore'); 2410 2411 debug_pop(); 2412 debug_add("End of MidCOM run: {$_SERVER['REQUEST_URI']}", MIDCOM_LOG_INFO); 2411 2413 exit(); 2412 2414 } trunk/midcom/midcom.core/midcom/baseclasses/components/request.php
r17556 r17900 545 545 if (! $result) 546 546 { 547 debug_push_class($this, 'can_handle');548 debug_add('The _on_can_handle event handler returned false, aborting.');549 debug_pop();547 //debug_push_class(__CLASS__, __FUNCTION__); 548 //debug_add('The _on_can_handle event handler returned false, aborting.'); 549 //debug_pop(); 550 550 return false; 551 551 } … … 558 558 $namespace = $argv[0]; 559 559 $plugin = $argv[1]; 560 debug_push_class( $this, 'can_handle');560 debug_push_class(__CLASS__, __FUNCTION__); 561 561 debug_add("Loading the plugin {$namespace}/{$plugin}"); 562 562 debug_pop(); … … 606 606 else 607 607 { 608 debug_push_class($this, 'can_handle');609 debug_add("Handler method {$method} returned FALSE, we cannot handle this therefore.");610 debug_pop();608 //debug_push_class(__CLASS__, __FUNCTION__); 609 //debug_add("Handler method {$method} returned FALSE, we cannot handle this therefore."); 610 //debug_pop(); 611 611 return false; 612 612 } … … 618 618 } 619 619 // No match 620 debug_push_class($this, 'can_handle');621 debug_add('No matching handler could be found, we cannot handle this therefore.');622 debug_pop();620 //debug_push_class(__CLASS__, __FUNCTION__); 621 //debug_add('No matching handler could be found, we cannot handle this therefore.'); 622 //debug_pop(); 623 623 return false; 624 624 } … … 665 665 if (! $result) 666 666 { 667 debug_push_class($this, 'handle');668 debug_add('The _on_handle event handler returned false, aborting.');669 debug_pop();667 //debug_push_class($this, 'handle'); 668 //debug_add('The _on_handle event handler returned false, aborting.'); 669 //debug_pop(); 670 670 return false; 671 671 } … … 775 775 public function show() 776 776 { 777 debug_push_class($this, 'show');778 779 777 // Call the event handler 780 778 $result = $this->_on_show($this->_handler['id']); 781 779 if (! $result) 782 780 { 781 debug_push_class(__CLASS__, __FUNCTION__); 783 782 debug_add('The _on_show event handler returned false, aborting.'); 784 783 debug_pop(); … … 798 797 799 798 $this->_on_shown($this->_handler['id']); 800 801 debug_pop();802 799 } 803 800 trunk/midcom/midcom.core/midcom/baseclasses/core/dbobject.php
r17898 r17900 1864 1864 if (count($result) == 0) 1865 1865 { 1866 debug_push_class($object, __FUNCTION__);1867 debug_add("Cannot retrieve the parameter {$domain} for {$object->__table__} ID {$object->id}; query execution failed, this is most probably an empty resultset.",1868 MIDCOM_LOG_INFO);1869 debug_pop();1866 //debug_push_class($object, __FUNCTION__); 1867 //debug_add("Cannot retrieve the parameter {$domain} for {$object->__table__} ID {$object->id}; query execution failed, this is most probably an empty resultset.", 1868 // MIDCOM_LOG_INFO); 1869 //debug_pop(); 1870 1870 return Array(); 1871 1871 } trunk/midcom/midcom.core/midcom/baseclasses/database/attachment.php
r17747 r17900 103 103 function open() 104 104 { 105 debug_push_class(__CLASS__, __FUNCTION__);106 107 105 if (! $this->id) 108 106 { 107 debug_push_class(__CLASS__, __FUNCTION__); 109 108 debug_add('Cannot open a non-persistent attachment..', MIDCOM_LOG_WARN); 110 109 debug_print_r('Object state:', $this); … … 115 114 if ($this->_open_handle !== null) 116 115 { 116 debug_push_class(__CLASS__, __FUNCTION__); 117 117 debug_add("Warning, the Attachment {$this->id} already had an open file handle, we close it impliciltly.", MIDCOM_LOG_WARN); 118 debug_pop(); 118 119 fclose($this->_open_handle); 119 120 $this->_open_handle = null; … … 168 169 if (! $handle) 169 170 { 171 debug_push_class(__CLASS__, __FUNCTION__); 170 172 debug_add("Failed to open attachment with mode {$mode}, last Midgard error was:" . mgd_errstr(), MIDCOM_LOG_WARN); 173 debug_pop(); 171 174 } 172 175 173 176 $this->_open_handle = $handle; 174 177 175 debug_pop();176 178 return $handle; 177 179 } trunk/midcom/midcom.core/midcom/services/auth.php
r17899 r17900 515 515 function _check_for_new_login_session() 516 516 { 517 debug_push_class(__CLASS__, __FUNCTION__);518 519 517 $credentials = $this->_auth_frontend->read_authentication_data(); 520 518 … … 529 527 if (! $this->_auth_backend->create_login_session($credentials['username'], $credentials['password'])) 530 528 { 529 debug_push_class(__CLASS__, __FUNCTION__); 531 530 debug_add('The login information passed to the system was invalid.', MIDCOM_LOG_ERROR); 532 531 debug_add("Username was {$credentials['username']}"); … … 536 535 } 537 536 537 debug_push_class(__CLASS__, __FUNCTION__); 538 538 debug_add('Authentication was successful, we have a new login session now. Updating timestamps'); 539 debug_pop(); 539 540 540 541 $this->_sync_user_with_backend(); … … 559 560 // This will exit. 560 561 } 561 562 debug_pop();563 562 return true; 564 563 } trunk/midcom/midcom.core/midcom/services/cache/module/content.php
r17899 r17900 1021 1021 $request_id = $this->generate_request_identifier($context); 1022 1022 1023 debug_push_class(__CLASS__, __FUNCTION__);1024 debug_add("Creating cache entry for {$content_id} as {$request_id}", MIDCOM_LOG_INFO);1025 debug_pop();1023 //debug_push_class(__CLASS__, __FUNCTION__); 1024 //debug_add("Creating cache entry for {$content_id} as {$request_id}", MIDCOM_LOG_INFO); 1025 //debug_pop(); 1026 1026 1027 1027 if (!is_null($this->_expires)) … … 1042 1042 $entry_data['last_modified'] = $this->_last_modified; 1043 1043 $entry_data['sent_headers'] = $this->_sent_headers; 1044 1044 1045 /** 1045 1046 * Remove comment to debug cache 1046 */1047 1047 debug_push_class(__CLASS__, __FUNCTION__); 1048 1048 debug_print_r("Writing meta-cache entry {$content_id}", $entry_data); 1049 1049 debug_pop(); 1050 /* */ 1050 */ 1051 1051 1052 $this->_meta_cache->open(true); 1052 1053 $this->_meta_cache->put($content_id, $entry_data);
