webERP Forum
Stray/Extra Line Terminators? - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (http://www.weberp.org/forum/forumdisplay.php?fid=8)
+--- Thread: Stray/Extra Line Terminators? (/showthread.php?tid=8064)



Stray/Extra Line Terminators? - VortecCPI - 01-28-2018

While working on MRPPlannedPurchaseOrders.php and MRPPlannedWorkOrders.php I noticed a few cases where we have terminators (";") after closing brackets ("}") for if-then statements.

I did a search and there are other places where we have the same.

Should we tidy this up to be consistent?


RE: Stray/Extra Line Terminators? - TurboPT - 01-28-2018

Yes, I'll look for those right now.

There are some places where the ; may remain after the }

I show occurrences in about 11 files, not including the 3rd-party areas that I won't touch at the moment.


RE: Stray/Extra Line Terminators? - TurboPT - 01-28-2018

Changes committed to SVN.


RE: Stray/Extra Line Terminators? - VortecCPI - 01-28-2018

Wow! That was quick! Thank you so much!

Now for another nit-picky thing I just found...

Most scripts (304) use <a href=" (double-quote) but a few (5) use <a href=' (single quote). I just noticed it now when comparing the two MRP planning scrips.

Not too sure what our coding standard says about this but it seems it should be the same...


RE: Stray/Extra Line Terminators? - TurboPT - 01-28-2018

I believe that some of the single quote ones could be missing a double quote?

For example, in file MRPPlannedPurchaseOrders.php, line 17, this link:
PHP Code:
'<a href='.$RootPath .'/MRP.php>' 

...should look like this with the double quotes applied to complete the href as expected:
PHP Code:
'<a href="'.$RootPath .'/MRP.php">' 

So, in all, it may depend on what quote the string starts with as well as how the concatenation is applied, if any.

But yes, as you have found, there are inconsistencies.


RE: Stray/Extra Line Terminators? - VortecCPI - 01-28-2018

Thank you Paul. Bothers me and my OCD...

I have another feature you may want to have a look at here: http://www.weberp.org/forum/showthread.php?tid=8061


RE: Stray/Extra Line Terminators? - TurboPT - 01-28-2018

Yes, I saw that feature, I was first considering another that you posted first now that the pick list is committed:

http://www.weberp.org/forum/showthread.php?tid=8048




RE: Stray/Extra Line Terminators? - VortecCPI - 01-28-2018

(01-28-2018, 12:03 PM)TurboPT Wrote: Yes, I saw that feature, I was first considering another that you posted first now that the pick list is committed:

http://www.weberp.org/forum/showthread.php?tid=8048

Thank you Paul. It is very helpful to me and I figured others could also benefit.

PLEASE check my work as PHP is NOT my native coding environment!