Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$RootPath & $PathPrefix
03-20-2014, 05:40 PM,
#1
$RootPath & $PathPrefix
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?
Reply
03-20-2014, 07:45 PM,
#2
RE: $RootPath & $PathPrefix
(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
Reply
03-21-2014, 01:55 AM,
#3
RE: $RootPath & $PathPrefix
(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?

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

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...
Reply
03-21-2014, 12:53 PM,
#4
RE: $RootPath & $PathPrefix
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.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)