Changeset 17899
- Timestamp:
- 10/03/08 16:58:05 (2 months ago)
- Files:
-
- trunk/midcom/midcom.core/midcom/application.php (modified) (17 diffs)
- trunk/midcom/midcom.core/midcom/services/_i18n_l10n.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/services/auth.php (modified) (4 diffs)
- trunk/midcom/midcom.core/midcom/services/auth/backend/simple.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/services/cache/module/content.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/services/i18n.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.core/midcom/application.php
r17898 r17899 709 709 public function finish() 710 710 { 711 debug_push_class(__CLASS__, __FUNCTION__);712 711 $this->_status = MIDCOM_STATUS_CLEANUP; 713 712 … … 731 730 $this->cache->shutdown(); 732 731 733 debug_add('Flushing...');734 732 // This is here to avoid trouble with end-of-processing segfaults. Will block AFAIK 735 733 flush(); 736 debug_pop();737 738 734 debug_add("End of MidCOM run: {$_SERVER['REQUEST_URI']}", MIDCOM_LOG_INFO); 739 735 } … … 771 767 * @access private 772 768 */ 773 private function _process() { 774 debug_push_class(__CLASS__, __FUNCTION__); 775 769 private function _process() 770 { 776 771 $success = false; 777 772 $substyle = ""; … … 785 780 case 'substyle': 786 781 $substyle = $value; 782 debug_push_class(__CLASS__, __FUNCTION__); 787 783 debug_add("Substyle '$substyle' selected", MIDCOM_LOG_INFO); 784 debug_pop(); 788 785 break; 789 786 … … 792 789 if ($this->_parser->argc > 1) 793 790 { 791 debug_push_class(__CLASS__, __FUNCTION__); 794 792 debug_add('Too many arguments remaining for serve_attachment.', MIDCOM_LOG_ERROR); 793 debug_pop(); 795 794 } 796 797 debug_add("Trying to serve Attachment with GUID {$value}", MIDCOM_LOG_INFO);798 795 799 796 $attachment = new midcom_baseclasses_database_attachment($value); … … 839 836 { 840 837 $this->cache->content->no_cache(); 838 } 839 else 840 { 841 $this->generate_error(MIDCOM_ERRNOTFOUND, "Invalid cache request URL."); 842 // This will exit; 841 843 } 842 844 break; … … 904 906 905 907 case 'log': 906 if ($this->_parser->argc > 1) { 908 if ($this->_parser->argc > 1) 909 { 910 debug_push_class(__CLASS__, __FUNCTION__); 907 911 debug_add("Too many arguments remaining for debuglog.", MIDCOM_LOG_ERROR); 912 debug_pop(); 908 913 $this->generate_error(MIDCOM_ERRNOTFOUND, "Failed to access debug log: Too many arguments for debuglog"); 914 // This will exit 909 915 } 910 916 $this->_showdebuglog($value); … … 939 945 || !$object->guid ) 940 946 { 941 debug_add("Root node missing.", MIDCOM_LOG_ERROR); 942 $this->generate_error(MIDCOM_ERRCRIT, "Root node missing."); 947 debug_push_class(__CLASS__, __FUNCTION__); 948 debug_add('Root node missing.', MIDCOM_LOG_ERROR); 949 debug_pop(); 950 $this->generate_error(MIDCOM_ERRCRIT, 'Root node missing.'); 943 951 } 944 952 … … 951 959 { 952 960 $path = 'midcom.core.nullcomponent'; 953 debug_add("No component defined for this node.", MIDCOM_LOG_ERROR); 954 debug_print_r("Root node:",$object,MIDCOM_LOG_DEBUG); 961 debug_push_class(__CLASS__, __FUNCTION__); 962 debug_add("No component defined for this node, using 'midcom.core.nullcomponent' instead.", MIDCOM_LOG_ERROR); 963 debug_pop(); 955 964 } 956 965 … … 1009 1018 && $this->skip_page_style == true) 1010 1019 { 1011 debug_add('We are in skip_page_style mode and context 0 is active. Executing the output handler and exiting afterwards.'); 1020 //debug_push_class(__CLASS__, __FUNCTION__); 1021 //debug_add('We are in skip_page_style mode and context 0 is active. Executing the output handler and exiting afterwards.'); 1022 //debug_pop(); 1012 1023 $this->_status = MIDCOM_STATUS_CONTENT; 1013 1024 1014 1025 // Enter Context 1015 debug_add("Entering Context 0 (old Context: $this->_currentcontext)", MIDCOM_LOG_DEBUG);1026 //debug_add("Entering Context 0 (old Context: $this->_currentcontext)", MIDCOM_LOG_DEBUG); 1016 1027 $oldcontext = $this->_currentcontext; 1017 1028 $this->_currentcontext = 0; … … 1021 1032 1022 1033 // Leave Context 1023 debug_add("Leaving Context 0 (new Context: $oldcontext)", MIDCOM_LOG_DEBUG);1034 //debug_add("Leaving Context 0 (new Context: $oldcontext)", MIDCOM_LOG_DEBUG); 1024 1035 $this->style->leave_context(); 1025 1036 $this->_currentcontext = $oldcontext; … … 1030 1041 else 1031 1042 { 1032 debug_add("_process finished successfully", MIDCOM_LOG_DEBUG); 1043 //debug_push_class(__CLASS__, __FUNCTION__); 1044 //debug_add("_process finished successfully", MIDCOM_LOG_DEBUG); 1033 1045 $this->_status = MIDCOM_STATUS_CONTENT; 1034 debug_pop();1046 //debug_pop(); 1035 1047 } 1036 1048 } … … 1138 1150 private function _can_handle($object) 1139 1151 { 1140 debug_push_class(__CLASS__, __FUNCTION__);1141 1142 1152 $path = $this->get_context_data(MIDCOM_CONTEXT_COMPONENT); 1143 1153 … … 1145 1155 if ($this->_context[$this->_currentcontext][MIDCOM_CONTEXT_REQUESTTYPE] != MIDCOM_REQUEST_CONTENT) 1146 1156 { 1157 debug_push_class(__CLASS__, __FUNCTION__); 1147 1158 debug_add("Unkown Request Type encountered:" . $this->_context[$this->current_context][MIDCOM_CONTEXT_REQUESTTYPE], MIDCOM_LOG_ERROR); 1148 1159 debug_pop(); … … 1164 1175 if (! $component_interface->configure($config, $this->_currentcontext)) 1165 1176 { 1177 debug_push_class(__CLASS__, __FUNCTION__); 1166 1178 debug_add ("Component Configuration failed: " . $component_interface->errstr($this->_currentcontext), MIDCOM_LOG_ERROR); 1167 1179 debug_pop(); … … 1172 1184 if (!$component_interface->can_handle($object, $this->_parser->argc, $this->_parser->argv, $this->_currentcontext)) 1173 1185 { 1186 debug_push_class(__CLASS__, __FUNCTION__); 1174 1187 debug_add("Component {$path} in {$object->name} declared unable to handle request.", MIDCOM_LOG_INFO); 1175 1188 debug_pop(); … … 1177 1190 } 1178 1191 1179 debug_add("Component {$path} in {$object->name} will handle request.", MIDCOM_LOG_INFO);1180 debug_pop();1192 //debug_add("Component {$path} in {$object->name} will handle request.", MIDCOM_LOG_INFO); 1193 //debug_pop(); 1181 1194 return true; 1182 1195 } trunk/midcom/midcom.core/midcom/services/_i18n_l10n.php
r17439 r17899 243 243 if (! file_exists($filename)) 244 244 { 245 debug_push_class(__CLASS__, __FUNCTION__);246 debug_add("{$filename} does not exist, creating an empty language array therefore.");245 //debug_push_class(__CLASS__, __FUNCTION__); 246 //debug_add("{$filename} does not exist, creating an empty language array therefore."); 247 247 $this->_stringdb[$lang] = Array(); 248 debug_pop();248 //debug_pop(); 249 249 return; 250 250 } trunk/midcom/midcom.core/midcom/services/auth.php
r17839 r17899 488 488 function initialize() 489 489 { 490 debug_push_class(__CLASS__, __FUNCTION__);491 492 490 $this->sessionmgr = new midcom_services_auth_sessionmgr($this); 493 491 494 // Midgard 1.9compatibility: ensure that Midgard's sitegroup ID is always int492 // Midgard 8.09beta compatibility: ensure that Midgard's sitegroup ID is always int 495 493 if (!is_integer($_MIDGARD['sitegroup'])) 496 494 { … … 506 504 $this->_check_for_active_login_session(); 507 505 } 508 509 debug_pop();510 506 } 511 507 … … 821 817 if (!isset($cached_privileges[$privilege_key])) 822 818 { 823 debug_push_class(__CLASS__, __FUNCTION__);824 debug_add("Cache {$privilege_key} miss, fetching privileges for {$object_guid}");825 debug_pop();819 //debug_push_class(__CLASS__, __FUNCTION__); 820 //debug_add("Cache {$privilege_key} miss, fetching privileges for {$object_guid}"); 821 //debug_pop(); 826 822 $full_privileges = $this->get_privileges_byguid($object_guid, $object_class, $for_user); 827 823 foreach ($full_privileges as $priv => $value) … … 1123 1119 else 1124 1120 { 1125 debug_push_class(__CLASS__, __FUNCTION__);1126 debug_add("Cache miss for {$cache_id}");1127 debug_pop();1121 //debug_push_class(__CLASS__, __FUNCTION__); 1122 //debug_add("Cache miss for {$cache_id}"); 1123 //debug_pop(); 1128 1124 if ( is_object($user) 1129 1125 && method_exists($user, 'get_privileges') trunk/midcom/midcom.core/midcom/services/auth/backend/simple.php
r17697 r17899 66 66 if (! array_key_exists($this->_cookie_id, $_COOKIE)) 67 67 { 68 debug_push_class(__CLASS__, __FUNCTION__);69 debug_add('There is no cookie, we cannot read the login session.');70 debug_pop();68 //debug_push_class(__CLASS__, __FUNCTION__); 69 //debug_add('There is no cookie, we cannot read the login session.'); 70 //debug_pop(); 71 71 return false; 72 72 } trunk/midcom/midcom.core/midcom/services/cache/module/content.php
r17898 r17899 1252 1252 } 1253 1253 1254 debug_push_class(__CLASS__, __FUNCTION__);1255 debug_add("Setting last modified to " . gmdate('c', $time));1256 debug_pop();1254 //debug_push_class(__CLASS__, __FUNCTION__); 1255 //debug_add("Setting last modified to " . gmdate('c', $time)); 1256 //debug_pop(); 1257 1257 1258 1258 $header = "Last-Modified: " . gmdate('D, d M Y H:i:s', $time) . ' GMT'; trunk/midcom/midcom.core/midcom/services/i18n.php
r17558 r17899 551 551 $this->_current_language = $this->_cookie_data['language']; 552 552 $this->_current_charset = $this->_cookie_data['charset']; 553 debug_push_class(__CLASS__, __FUNCTION__);554 debug_add("Set current language to {$this->_current_language} with charset {$this->_current_charset} (source: cookie)", MIDCOM_LOG_INFO);555 debug_pop();553 //debug_push_class(__CLASS__, __FUNCTION__); 554 //debug_add("Set current language to {$this->_current_language} with charset {$this->_current_charset} (source: cookie)", MIDCOM_LOG_INFO); 555 //debug_pop(); 556 556 return; 557 557 } … … 562 562 { 563 563 $this->_current_language = $content_language; 564 debug_push_class(__CLASS__, __FUNCTION__);565 debug_add("Set current language to {$this->_current_language} (source: Midgard host language)", MIDCOM_LOG_INFO);566 debug_pop();564 //debug_push_class(__CLASS__, __FUNCTION__); 565 //debug_add("Set current language to {$this->_current_language} (source: Midgard host language)", MIDCOM_LOG_INFO); 566 //debug_pop(); 567 567 return; 568 568 } … … 580 580 } 581 581 } 582 debug_push_class(__CLASS__, __FUNCTION__);583 debug_add("Set current language to {$this->_current_language} with charset {$this->_current_charset} (Source: HTTP)", MIDCOM_LOG_INFO);584 debug_pop();582 //debug_push_class(__CLASS__, __FUNCTION__); 583 //debug_add("Set current language to {$this->_current_language} with charset {$this->_current_charset} (Source: HTTP)", MIDCOM_LOG_INFO); 584 //debug_pop(); 585 585 } 586 586
