Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$RootPath & $PathPrefix
03-20-2014, 05:40 PM
Post: #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?
Find all posts by this user
Quote this message in a reply
03-20-2014, 07:45 PM
Post: #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
Quote this message in a reply
03-21-2014, 01:55 AM
Post: #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...
Find all posts by this user
Quote this message in a reply
03-21-2014, 12:53 PM
Post: #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
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)