From: <tu...@us...> - 2018-01-27 22:59:21
|
Revision: 7926 http://sourceforge.net/p/web-erp/reponame/7926 Author: turbopt Date: 2018-01-27 22:59:18 +0000 (Sat, 27 Jan 2018) Log Message: ----------- Paul Becker (PaulT commit): Remove stray ; appearing after if, else, and foreach blocks. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8064) Modified Paths: -------------- trunk/CustItem.php trunk/Factors.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/PcClaimExpensesFromTab.php trunk/PurchData.php trunk/SupplierPriceList.php trunk/SystemParameters.php trunk/doc/Change.log trunk/includes/MiscFunctions.php trunk/includes/class.pdf.php trunk/javascripts/MiscFunctions.js Modified: trunk/CustItem.php =================================================================== --- trunk/CustItem.php 2018-01-27 19:11:13 UTC (rev 7925) +++ trunk/CustItem.php 2018-01-27 22:59:18 UTC (rev 7926) @@ -229,7 +229,7 @@ </form>'; include ('includes/footer.php'); exit; - }; + } } if ($Edit == true) { Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2018-01-27 19:11:13 UTC (rev 7925) +++ trunk/Factors.php 2018-01-27 22:59:18 UTC (rev 7926) @@ -20,7 +20,7 @@ if (isset($_POST['Create'])) { $FactorID = 0; $_POST['New'] = 'Yes'; -}; +} echo '<div class="centre"><p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" title="' . _('Factor Companies') . '" alt="" />' . ' ' .$Title . '</p></div>'; Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2018-01-27 19:11:13 UTC (rev 7925) +++ trunk/MRPPlannedPurchaseOrders.php 2018-01-27 22:59:18 UTC (rev 7926) @@ -333,7 +333,7 @@ $displayconsolidation = _('Weekly'); } else { $displayconsolidation = _('Monthly'); - }; + } $pdf->addTextWrap($Left_Margin,$YPos,65,$FontSize,_('Consolidation').':'); $pdf->addTextWrap(110,$YPos,40,$FontSize,$displayconsolidation); Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2018-01-27 19:11:13 UTC (rev 7925) +++ trunk/MRPPlannedWorkOrders.php 2018-01-27 22:59:18 UTC (rev 7926) @@ -376,7 +376,7 @@ $displayconsolidation = _('Weekly'); } else { $displayconsolidation = _('Monthly'); - }; + } $pdf->addTextWrap($Left_Margin,$YPos,65,$FontSize,_('Consolidation').':'); $pdf->addTextWrap(110,$YPos,40,$FontSize,$displayconsolidation); Modified: trunk/PcClaimExpensesFromTab.php =================================================================== --- trunk/PcClaimExpensesFromTab.php 2018-01-27 19:11:13 UTC (rev 7925) +++ trunk/PcClaimExpensesFromTab.php 2018-01-27 22:59:18 UTC (rev 7926) @@ -127,7 +127,7 @@ $UploadTheFile ='No'; } if ($UploadTheFile == 'Yes') { //Passed all the above validation - if (!file_exists($ReceiptFileDir)) { //Create the receipts directory if it doesn't already exist + if (!file_exists($ReceiptFileDir)) { //Create the receipts directory if it doesn't already exist mkdir($ReceiptFileDir, 0775, true); } $ReceiptFileExt = pathinfo($UploadOriginalName, PATHINFO_EXTENSION); //Grab the file extension of the uploaded file @@ -134,12 +134,12 @@ $ReceiptFileName = $SelectedIndex . '.' . $ReceiptFileExt; //Rename the uploaded file with the expenses index number $ReceiptFilePath = $ReceiptFileDir . '/' . $ReceiptFileName; $ReceiptExistingFiles = glob($ReceiptFileDir . '/' . $SelectedIndex . '.{' . implode(',', $ReceiptSupportedExt) . '}', GLOB_BRACE); //Find all existing receipt files for the expense, in case more than 1 file type is currently in the receipts directory - foreach($ReceiptExistingFiles as $ReceiptExistingFile) { // Overwrite existing files, and delete all other file types. + foreach($ReceiptExistingFiles as $ReceiptExistingFile) { // Overwrite existing files, and delete all other file types. unlink($ReceiptExistingFile); - }; + } move_uploaded_file($UploadTempName, $ReceiptFilePath); //Move the uploaded file from the temp directory to the receipts directory. } - } + } prnMsg($Msg, 'success'); } elseif ($InputError != 1) { // First check the type is not being duplicated @@ -232,7 +232,7 @@ $UploadTheFile ='No'; } if ($UploadTheFile == 'Yes') { //Passed all the above validation - if (!file_exists($ReceiptFileDir)) { //Create the receipts directory if it doesn't already exist + if (!file_exists($ReceiptFileDir)) { //Create the receipts directory if it doesn't already exist mkdir($ReceiptFileDir, 0775, true); } $ReceiptFileExt = pathinfo($UploadOriginalName, PATHINFO_EXTENSION); //Grab the file extension of the uploaded file @@ -239,12 +239,12 @@ $ReceiptFileName = $SelectedIndex . '.' . $ReceiptFileExt; //Rename the uploaded file with the expenses index number $ReceiptFilePath = $ReceiptFileDir . '/' . $ReceiptFileName; $ReceiptExistingFiles = glob($ReceiptFileDir . '/' . $SelectedIndex . '.{' . implode(',', $ReceiptSupportedExt) . '}', GLOB_BRACE); //Find all existing receipt files for the expense, in case more than 1 file type is currently in the receipts directory - foreach($ReceiptExistingFiles as $ReceiptExistingFile) { // Overwrite existing files, and delete all other file types. + foreach($ReceiptExistingFiles as $ReceiptExistingFile) { // Overwrite existing files, and delete all other file types. unlink($ReceiptExistingFile); - }; + } move_uploaded_file($UploadTempName, $ReceiptFilePath); //Move the uploaded file from the temp directory to the receipts directory. } - } + } prnMsg($Msg, 'success'); } if ($InputError != 1) { @@ -268,7 +268,7 @@ $ReceiptExistingFiles = glob($ReceiptFileDir . '/' . $SelectedIndex . '.{' . implode(',', $ReceiptSupportedExt) . '}', GLOB_BRACE); //Find all existing receipt files for the expense, in case more than 1 file type is currently in the receipts directory foreach($ReceiptExistingFiles as $ReceiptExistingFile) { unlink($ReceiptExistingFile); - }; + } unset($_GET['delete']); } //end of get delete if (!isset($SelectedTabs)) { @@ -333,7 +333,7 @@ <td>' . $SelectedTabs . '</td> </tr>'; echo '</table>'; - + //Limit expenses history to X days echo '<table class="selection"> <tr> @@ -392,19 +392,19 @@ WHERE codeexpense='" . $MyRow['codeexpense'] . "'"; $ResultDes = DB_query($SQLDes); $Description = DB_fetch_array($ResultDes); - + if (!isset($Description[0])) { $ExpenseCodeDes = 'ASSIGNCASH'; } else { $ExpenseCodeDes = $MyRow['codeexpense'] . ' - ' . $Description[0]; } - + if ($MyRow['authorized'] == '0000-00-00') { $AuthorisedDate = _('Unauthorised'); } else { $AuthorisedDate = ConvertSQLDate($MyRow['authorized']); } - + //Generate download link for expense receipt, or show text if no receipt file is found. $ReceiptFilePathMatched = reset(glob($ReceiptFileDir . '/' . $MyRow['counterindex'] . '.{' . implode(',', $ReceiptSupportedExt) . '}', GLOB_BRACE)); //Find the relevant receipt file for the expense. There should only be one (file type), but limit to one result just in case. if (!empty($ReceiptFilePathMatched)) { //If no receipt file for the expenses is found @@ -414,7 +414,7 @@ } else { $ReceiptText = _('No attachment'); } - + $TagSQL = "SELECT tagdescription FROM tags WHERE tagref='" . $MyRow['tag'] . "'"; $TagResult = DB_query($TagSQL); $TagRow = DB_fetch_array($TagResult); @@ -427,7 +427,7 @@ } else { $TagDescription = $TagTo . ' - ' . $TagRow['tagdescription']; } - + $TaxesDescription = ''; $TaxesTaxAmount = ''; $TaxSQL = "SELECT counterindex, @@ -630,7 +630,7 @@ ++$i; } } - + //Select the tag echo '<tr> <td>', _('Tag'), ':</td> @@ -655,7 +655,7 @@ </td> </tr>'; // End select tag - + //For the accept attribute of the file element, prefix dots to the front of each supported file extension. $ReceiptSupportedExtDotPrefix = array_map(function($ReceiptSupportedExt) { return '.' . $ReceiptSupportedExt; @@ -667,7 +667,7 @@ <input type="file" name="Receipt" id="Receipt" accept="' . implode(',', $ReceiptSupportedExtDotPrefix) . '" title="', _('Accepted file types'), ': ', implode(', ', $ReceiptSupportedExt), '" /> </td> </tr>'; - + if (!isset($_POST['Notes'])) { $_POST['Notes'] = ''; } @@ -677,7 +677,7 @@ <input type="text" name="Notes" size="50" maxlength="49" value="', $_POST['Notes'], '" /> </td> </tr>'; - + echo '</table>'; // close main table echo '<input type="hidden" name="SelectedTabs" value="', $SelectedTabs, '" />'; echo '<input type="hidden" name="Days" value="', $Days, '" />'; Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2018-01-27 19:11:13 UTC (rev 7925) +++ trunk/PurchData.php 2018-01-27 22:59:18 UTC (rev 7926) @@ -392,7 +392,7 @@ </form>'; include ('includes/footer.php'); exit; - }; + } } if ($Edit == true) { Modified: trunk/SupplierPriceList.php =================================================================== --- trunk/SupplierPriceList.php 2018-01-27 19:11:13 UTC (rev 7925) +++ trunk/SupplierPriceList.php 2018-01-27 22:59:18 UTC (rev 7926) @@ -419,7 +419,7 @@ echo '</form>'; include ('includes/footer.php'); exit; - }; + } } if(isset($_POST['SearchSupplier'])) { Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2018-01-27 19:11:13 UTC (rev 7925) +++ trunk/SystemParameters.php 2018-01-27 22:59:18 UTC (rev 7926) @@ -1243,7 +1243,7 @@ } elseif ($_SESSION['QualityLogSamples'] == 1){ echo '<option select="selected" value="1">' . _('Yes') . '</option>'; echo '<option value="0">' . _('No') . '</option>'; - }; + } echo '</select> </td> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-27 19:11:13 UTC (rev 7925) +++ trunk/doc/Change.log 2018-01-27 22:59:18 UTC (rev 7926) @@ -1,6 +1,7 @@ webERP Change Log -27/1/17 PaulT: MiscFunctions.php, Z_ChangeStockCode.php, Z_ChangeGLAccountCode.php: Remove unused $db parameter from function ChangeFieldInTable(). +27/1/18 Paul Becker (PaulT commit): Remove stray ; appearing after if, else, and foreach blocks. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8064) +27/1/18 PaulT: MiscFunctions.php, Z_ChangeStockCode.php, Z_ChangeGLAccountCode.php: Remove unused $db parameter from function ChangeFieldInTable(). 26/1/18 Andrew Galuski/Tim (PaulT merge/commit): New picking list feature for regular and controlled/serialized stock. This feature improves (and replaces) the current pick list handling. (Reported in forums by HDeriauFF: http://www.weberp.org/forum/showthread.php?tid=7988) 26/1/18 Exson: Add single quotation escape and charset in htmlspecialchars() in session.inc 26/1/18 Exson: Use htmlspecialchars() to encode html special characters to html entity and set the cookie available only httponly in session.inc Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2018-01-27 19:11:13 UTC (rev 7925) +++ trunk/includes/MiscFunctions.php 2018-01-27 22:59:18 UTC (rev 7926) @@ -139,7 +139,7 @@ var $attributes; var $content; var $children; -}; +} function GetECBCurrencyRates () { /* See http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html Modified: trunk/includes/class.pdf.php =================================================================== --- trunk/includes/class.pdf.php 2018-01-27 19:11:13 UTC (rev 7925) +++ trunk/includes/class.pdf.php 2018-01-27 22:59:18 UTC (rev 7926) @@ -144,7 +144,7 @@ $ns=0; $cw = $this->GetStringWidth($s, '', '', 0, true); while($i<$nb) { - /*$c=$s{$i};*/ + $c=mb_substr($s, $i, 1, 'UTF-8'); if($c===' ' AND $i>0) { $sep=$i; Modified: trunk/javascripts/MiscFunctions.js =================================================================== --- trunk/javascripts/MiscFunctions.js 2018-01-27 19:11:13 UTC (rev 7925) +++ trunk/javascripts/MiscFunctions.js 2018-01-27 22:59:18 UTC (rev 7926) @@ -59,7 +59,7 @@ } else { this.setCustomValidity('The number format is wrong'); return false; - }; + } } function assignComboToInput(c, i) { |