Produced by Araxis Merge on Mon Jan 24 00:09:17 2005 UTC. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Internet Explorer. For optimum results when printing this report, enable printing of background images and colours in your browser and use landscape orientation.
# | Location | File | Last Modified |
---|---|---|---|
1 | e:\tech\cvs\coppermine\stable-head\include | functions.inc.php | Thu Jan 6 08:26:51 2005 UTC |
2 | e:\tech\cvs\coppermine\stable\include | functions.inc.php | Sun Jan 23 14:48:40 2005 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Blocks | Lines | |
Unchanged | 9 | 1767 |
Changed | 4 | 8 |
Inserted | 4 | 33 |
Removed | 0 | 0 |
Whitespace | All differences in whitespace within lines are ignored |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Hidden in comparison detail |
No regular expressions were active.
1 | <?php | 1 | <?php | |||
2 | // ------------------------------------------------------------------------- // | 2 | // ------------------------------------------------------------------------- // | |||
3 | // Coppermine Photo Gallery 1.3.2 // | 3 | // Coppermine Photo Gallery 1.3.2 // | |||
4 | // ------------------------------------------------------------------------- // | 4 | // ------------------------------------------------------------------------- // | |||
(83 unchanged lines omitted) | ||||||
88 | return $result; | 88 | return $result; | |||
89 | } | 89 | } | |||
90 | 90 | |||||
91 | // Error message if a query failed | 91 | // Error message if a query failed | |||
92 | function cpg_getPhpCaller($lev=2) { | |||||
93 | $aTrace = debug_backtrace(); | |||||
94 | $sCallingFile=$aTrace[$lev]['file']; | |||||
95 | $sCallingLine=$aTrace[$lev]['line']; | |||||
96 | return $sCallingFile.'('.$sCallingLine.')'; | |||||
97 | } | |||||
98 | ||||||
92 | function db_error($the_error) | 99 | function db_error($the_error) | |||
93 | { | 100 | { | |||
94 | global $CONFIG; | 101 | global $CONFIG; | |||
95 | 102 | |||||
96 | if (!$CONFIG['debug_mode']) { | 103 | if (!$CONFIG['debug_mode']) { | |||
97 | cpg_die(CRITICAL_ERROR, ' T here was an error while processing a database query', __FILE__, __LINE__); | 104 | cpg_die(CRITICAL_ERROR, ' In: '.cpg_getPhpCaller().', t here was an error while processing a database query', __FILE__, __LINE__); | |||
98 | } else { | 105 | } else { | |||
99 | 106 | |||||
100 | $the_error .= "\n\nmySQL error: ".mysql_error()."\n"; | 107 | $the_error .= "\n\nmySQL error: ".mysql_error()."\n"; | |||
101 | 108 | |||||
102 | $out = "<br /> There was an error while processing a database query.<br /><br/> | 109 | $out = "<br /> In: ".cpg_getPhpCaller().", "." There was an error while processing a database query.<br /><br/> | |||
103 | <form name='mysql'><textarea rows=\"8\" cols=\"60\">".htmlspecialchars($the_error)."</textarea></form>"; | 110 | <form name='mysql'><textarea rows=\"8\" cols=\"60\">".htmlspecialchars($the_error)."</textarea></form>"; | |||
104 | 111 | |||||
105 | cpg_die(CRITICAL_ERROR, $out, __FILE__, __LINE__); | 112 | cpg_die(CRITICAL_ERROR, $out, __FILE__, __LINE__); | |||
106 | } | 113 | } | |||
(25 unchanged lines omitted) | ||||||
132 | echo 'Fatal error :<br />'.$msg_text; | 139 | echo 'Fatal error :<br />'.$msg_text; | |||
133 | exit; | 140 | exit; | |||
134 | } | 141 | } | |||
135 | 142 | |||||
143 | if (!defined('UDB_INTEGRATION') || UDB_INTEGRATION != 'e107') | |||||
144 | { | |||||
145 | // e107 manages the buffer | |||||
136 | $ob = ob_get_contents(); | 146 | $ob = ob_get_contents(); | |||
137 | if ($ob) ob_end_clean(); | 147 | if ($ob) ob_end_clean(); | |||
148 | } | |||||
138 | 149 | |||||
139 | if(!$CONFIG['debug_mode']) template_extract_block($template_cpg_die, 'file_line'); | 150 | if(!$CONFIG['debug_mode']) template_extract_block($template_cpg_die, 'file_line'); | |||
140 | if(!$output_buffer && !$CONFIG['debug_mode']) template_extract_block($template_cpg_die, 'output_buffer'); | 151 | if(!$output_buffer && !$CONFIG['debug_mode']) template_extract_block($template_cpg_die, 'output_buffer'); | |||
141 | 152 | |||||
(260 unchanged lines omitted) | ||||||
402 | function template_extract_block(&$template, $block_name, $subst='') | 413 | function template_extract_block(&$template, $block_name, $subst='') | |||
403 | { | 414 | { | |||
404 | $pattern = "#(<!-- BEGIN $block_name -->)(.*?)(<!-- END $block_name -->)#s"; | 415 | $pattern = "#(<!-- BEGIN $block_name -->)(.*?)(<!-- END $block_name -->)#s"; | |||
405 | if ( !preg_match($pattern, $template, $matches)){ | 416 | if ( !preg_match($pattern, $template, $matches)){ | |||
406 | die('<b> Template error<b><br />Failed to find block \''.$block_name.'\'('.htmlspecialchars($pattern).') in :<br /><pre>'.htmlspecialchars($template).'</pre>'); | 417 | die('<b> In '.cpg_getPhpCaller(1).', Template error<b><br />Failed to find block \''.$block_name.'\'('.htmlspecialchars($pattern).') in :<br /><pre>'.htmlspecialchars($template).'</pre>'); | |||
407 | } | 418 | } | |||
408 | $template = str_replace($matches[1].$matches[2].$matches[3], $subst, $template); | 419 | $template = str_replace($matches[1].$matches[2].$matches[3], $subst, $template); | |||
409 | return $matches[2]; | 420 | return $matches[2]; | |||
410 | } | 421 | } | |||
(943 unchanged lines omitted) | ||||||
1354 | echo '</td><td align="left" valign="middle" class="tableh2">'; | 1365 | echo '</td><td align="left" valign="middle" class="tableh2">'; | |||
1355 | if (GALLERY_ADMIN_MODE){echo '<span class="album_stat">('.$lang_cpg_debug_output['copy_and_paste_instructions'].')</span>';} | 1366 | if (GALLERY_ADMIN_MODE){echo '<span class="album_stat">('.$lang_cpg_debug_output['copy_and_paste_instructions'].')</span>';} | |||
1356 | echo '</td></tr>'; | 1367 | echo '</td></tr>'; | |||
1357 | echo '<tr><td class="tableb" colspan="2">'; | 1368 | echo '<tr><td class="tableb" colspan="2">'; | |||
1358 | echo '<textarea rows="10" c lass="debug_text" name="debugtext">'; | 1369 | echo '<textarea rows="10" c ols="60" c lass="debug_text" name="debugtext">'; | |||
1359 | echo "USER: "; | 1370 | echo "USER: "; | |||
1360 | echo $debug_underline; | 1371 | echo $debug_underline; | |||
1361 | print_r($USER); | 1372 | print_r($USER); | |||
1362 | echo $debug_separate; | 1373 | echo $debug_separate; | |||
(400 unchanged lines omitted) | ||||||
1763 | 1774 | |||||
1764 | return $return; | 1775 | return $return; | |||
1765 | } | 1776 | } | |||
1766 | 1777 | |||||
1778 | function cpg_safe_mkdir($path,$mode) | |||||
1779 | { | |||||
1780 | global $CONFIG; | |||||
1781 | ||||||
1782 | if (strcmp($mode{0},'0')) { | |||||
1783 | /* convert mode to octal */ | |||||
1784 | $mode = '0'.decoct($mode); | |||||
1785 | } | |||||
1786 | ||||||
1787 | $cmdstring = $CONFIG['safe_mode_mkdir']; | |||||
1788 | $cmdstring .= '?dir='.$CONFIG['safe_mode_cpg_path'].$path; | |||||
1789 | $cmdstring .= '&mode='.$mode; | |||||
1790 | ||||||
1791 | $res = fopen($cmdstring, "r"); | |||||
1792 | if (!$res) | |||||
1793 | { | |||||
1794 | return FALSE; | |||||
1795 | } else { | |||||
1796 | fclose($res); | |||||
1797 | return TRUE; | |||||
1798 | } | |||||
1799 | } | |||||
1767 | 1800 | |||||
1768 | 1801 | |||||
1769 | 1802 | |||||
1770 | 1803 | |||||
1771 | ?> | 1804 | ?> |
Araxis Merge (but not this generated report) is Copyright © 1993-2003 Araxis Ltd (www.araxis.com). All rights reserved.