$RootPath & $PathPrefix - 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: $RootPath & $PathPrefix (/showthread.php?tid=2170) |
$RootPath & $PathPrefix - serakfalcon - 03-20-2014 While digging through different code I noticed that $RootPath and $PathPrefix are being used for basically the same thing in different places. $RootPath seems a bit more robust... is there any reason for the difference? RE: $RootPath & $PathPrefix - weberp1 - 03-20-2014 (03-20-2014, 05:40 PM)serakfalcon Wrote: While digging through different code I noticed that $RootPath and $PathPrefix are being used for basically the same thing in different places. $RootPath seems a bit more robust... is there any reason for the difference? As I remember $RootPath was supposed to be the absolute path to the document root, and $PathPrefix is the prefix from the document root to the webERP instance. Thanks Tim RE: $RootPath & $PathPrefix - serakfalcon - 03-21-2014 (03-20-2014, 07:45 PM)weberp1 Wrote:(03-20-2014, 05:40 PM)serakfalcon Wrote: While digging through different code I noticed that $RootPath and $PathPrefix are being used for basically the same thing in different places. $RootPath seems a bit more robust... is there any reason for the difference? OK well, basically the two function identically, since $RootPath is an absolute reference to the weberp folder, and $PathPrefix is relative to the same place (and is basically almost always an empty string?)... I would support phasing out $PathPrefix and just using $RootPath... RE: $RootPath & $PathPrefix - phil - 03-21-2014 Well $PathPrefix is used in the report writer and other scripts which are below the top level normally with a ../.. syntax to get to the folder above or above the folder above etc. I think $RootPath could not be used because it is dependent on the called script and $PathPrefix gives the script the orientation of where the top level scripts are. |