[phpcvsview-cvs-updates] phpcvsview func_DiffFile.php,1.3,1.4
Status: Pre-Alpha
Brought to you by:
bcheesem
From: Sijis A. <si...@us...> - 2005-02-04 09:40:27
|
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9530 Modified Files: func_DiffFile.php Log Message: - fixed warning given in php5 about using references - added error text to i18n support - removed unecessary $env['script_path'] recalculation - removed reference to $env['mod_path'] in function calls Index: func_DiffFile.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/func_DiffFile.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** func_DiffFile.php 3 Feb 2005 23:50:36 -0000 1.3 --- func_DiffFile.php 4 Feb 2005 09:40:18 -0000 1.4 *************** *** 14,24 **** function DisplayFileDiff($Rev1, $Rev2) { ! global $config, $env; ! ! // Calculate the path from the $env['script_name'] variable. ! $env['script_path'] = substr($env['script_name'], 0, strrpos($env['script_name'], "/")); ! if ($env['script_path'] == "") { ! $env['script_path'] = "/"; ! } // Create our CVS connection object and set the required properties. --- 14,18 ---- function DisplayFileDiff($Rev1, $Rev2) { ! global $config, $env, $lang; // Create our CVS connection object and set the required properties. *************** *** 38,42 **** // Add the quick link navigation bar. ! echo GetQuickLinkBar($env['mod_path'], "Revision Diff for: ", true, true, ""); echo "<hr />"; --- 32,36 ---- // Add the quick link navigation bar. ! echo GetQuickLinkBar($lang['rev_diff'], true, true, ""); echo "<hr />"; *************** *** 65,69 **** $FileContents = $CVSServer->FILECONTENTS; if ($FileContents === false) { ! echo "<pre>ERROR Getting Revision $Rev1 of file</pre>"; } $Lines = explode("\n", $FileContents); --- 59,63 ---- $FileContents = $CVSServer->FILECONTENTS; if ($FileContents === false) { ! echo $lang['err_get_rev'].'<h3>'. $Rev1 .'</h3>'; } $Lines = explode("\n", $FileContents); *************** *** 94,98 **** { $TempLine = array('mode' => "+", 'text' => substr($DiffLines[++$linenumber], 2)); ! InsertIntoArray(&$FilePatching, $TempLine, $InsertLocation[0]+$LineCounter+1); $LineOffset++; } --- 88,92 ---- { $TempLine = array('mode' => "+", 'text' => substr($DiffLines[++$linenumber], 2)); ! $FilePatching = InsertIntoArray($FilePatching, $TempLine, $InsertLocation[0]+$LineCounter+1); $LineOffset++; } *************** *** 112,116 **** $linenumber++; $TempLine = array('mode' => "+", 'text' => substr($DiffLines[$linenumber], 2)); ! InsertIntoArray(&$FilePatching, $TempLine, $InsertLocation[0]+$LineCounter+$LineOffset); $LineOffset++; } --- 106,110 ---- $linenumber++; $TempLine = array('mode' => "+", 'text' => substr($DiffLines[$linenumber], 2)); ! $FilePatching = InsertIntoArray($FilePatching, $TempLine, $InsertLocation[0]+$LineCounter+$LineOffset); $LineOffset++; } *************** *** 121,125 **** $linenumber++; $TempLine = array('mode' => "+", 'text' => substr($DiffLines[$linenumber], 2)); ! InsertIntoArray(&$FilePatching, $TempLine, $InsertLocation[0]+$LineCounter+$LineOffset); } } --- 115,119 ---- $linenumber++; $TempLine = array('mode' => "+", 'text' => substr($DiffLines[$linenumber], 2)); ! $FilePatching = InsertIntoArray($FilePatching, $TempLine, $InsertLocation[0]+$LineCounter+$LineOffset); } } *************** *** 163,167 **** $CVSServer->Disconnect(); } else { ! echo "Connection Failed."; } echo GetPageFooter(); --- 157,161 ---- $CVSServer->Disconnect(); } else { ! echo $lang['err_connect']; } echo GetPageFooter(); |