PATHS REFACTORING NEEDED!

Help
Lubos Dz
2011-04-09
2012-12-12
  • Lubos Dz

    Lubos Dz - 2011-04-09

    Hi guys,

    thanx for nice piece of software.

    I would like to point out, that your implementation and templating system is really badly architected. Apparently you never deplyoed phpsysinfo elsewhere than under public webserver root. However, in real world it is not possible due to security issues to deploy directly under public root all files, mostly only static files - images, css.

    The problem is that you always calculate with absolute path like so:

        $tpl = new Template("/templates/html/index_all.html");

    This is wrong, it should be something like:

        $tpl = new Template(APP_ROOT."/templates/html/index_all.html");

    That same applies to URL links pointing to templates - you always hard-code e.g.

    URL=index.php?disp=static

    instead of e.g.

    URL=URLBASE.'index.php?disp=static'

    Usability of your application is quite hardened with this hard-coded links issue…

    It would be nice to refactor into more flexible system.

    Simply try to deploy phpsysinfo out of public root (into private directory) with templates published into public directory - and you will see that it is really quite difficult to make it running… Or integrate into some framework like extension - it's almost impossible…

    Thank you - keep up nice work.

    Best regards
    Lubos

     
  • Mieczysław Nalewaj

    PhpSysInfo works as you want in any folder. Path is not  absolute, it is calculated in function fetch of class Template.

    Class Template from class.Template.inc.php line 83:
            include(APP_ROOT.$file);

    Regards

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks