Index: trunk/admin/help/help.php =================================================================== diff -u -r3076 -r3757 --- trunk/admin/help/help.php (.../help.php) (revision 3076) +++ trunk/admin/help/help.php (.../help.php) (revision 3757) @@ -21,15 +21,21 @@ $section = explode(':', $section); if($section[0] == 'in-portal') $section[0] = 'kernel'; -$topic_path = FULL_PATH.'/'.$section[0].'/'.$admin.'/include/help/'.$section[1].'.txt'; +$help_directory = FULL_PATH.'/'.$section[0].'/'.$admin.'/include/help'; +$topic_path = $help_directory.'/'.$section[1].'.txt'; // for debugging: save new help content if( GetVar('action') == 'save_help' ) { - error_reporting(E_ALL); - $fp = fopen($topic_path, 'w'); - fwrite($fp, stripslashes(GetVar('help_content')) ); - fclose($fp); + $fp = fopen($topic_path, 'w'); + if ($fp) { + fwrite($fp, stripslashes(GetVar('help_content')) ); + fclose($fp); + } + else { + trigger_error('Help file was not saved to '.$topic_path.'', E_USER_WARNING); + } + } $help_data = file_exists($topic_path) ? file_get_contents($topic_path) : GetVar('help_content');