Переглянути джерело

New hooks for managing/catching/logging errors

pdontthink 21 роки тому
батько
коміт
a174393e31
1 змінених файлів з 4 додано та 0 видалено
  1. 4 0
      functions/display_messages.php

+ 4 - 0
functions/display_messages.php

@@ -87,6 +87,8 @@ function logout_error( $errString, $errTitle = '' ) {
         $color[8]  = '#000000';  /* black         Normal text            */
     }
 
+    list($junk, $errString, $errTitle) = do_hook('logout_error', $errString, $errTitle);
+
     if ( $errTitle == '' ) {
         $errTitle = $errString;
     }
@@ -124,6 +126,8 @@ function error_box($string, $color) {
 
     $err = _("ERROR");
 
+    $string = concat_hook_function('error_box', $string);
+
     /* check if the page header has been sent; if not, send it! */
     if(!isset($pageheader_sent) && !$pageheader_sent) {
         /* include this just to be sure */