Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Removing error files/lines whenever an error occured  (Read 5876 times)

0 Members and 1 Guest are viewing this topic.

yoshikiwei

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 68
Removing error files/lines whenever an error occured
« on: September 20, 2004, 07:46:59 am »

I dont really like the idea of displaying error file/lines to my users when an error occured
like attached picture

therefore i made some changes to functions.inc.php,
this allows only the admin (thats me) to see the error files/lines, and not my users
find
Code: [Select]
        $params = array(
                '{MESSAGE}' => $msg_text,
                '{FILE_TXT}' => $lang_cpg_die['file'],
                '{FILE}' => $error_file,
                '{LINE_TXT}' => $lang_cpg_die['line'],
                '{LINE}' => $error_line,
                '{OUTPUT_BUFFER}' => $ob,
        );
replace with
Code: [Select]
if (GALLERY_ADMIN_MODE){
        $params = array(
                '{MESSAGE}' => $msg_text,
                '{FILE_TXT}' => $lang_cpg_die['file'],
                '{FILE}' => $error_file,
                '{LINE_TXT}' => $lang_cpg_die['line'],
                '{LINE}' => $error_line,
                '{OUTPUT_BUFFER}' => $ob,
        );
} else {
        $params = array(
                '{MESSAGE}' => $msg_text,
                '{FILE_TXT}' => "",
                '{FILE}' => "",
                '{LINE_TXT}' => "",
                '{LINE}' => "",
                '{OUTPUT_BUFFER}' => $ob,
        );
}
« Last Edit: April 12, 2005, 06:57:10 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Removing error files/lines whenever an error occured
« Reply #1 on: September 20, 2004, 08:10:51 am »

However, if there are errors that only occur when a regular user is logged in (instead of the admin), it's helpfull for trouble-shooting and debuggig to have those lines available. This might be a helpfull little mod if you know your way around in coppermine (you will have to revert to the original code when bug-hunting) though.

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.