Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Stupid suggestion for use_sub_dirs ;-)

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
jausions
Smarty Rookie


Joined: 06 Nov 2003
Posts: 10

PostPosted: Wed May 12, 2004 10:12 pm    Post subject: Stupid suggestion for use_sub_dirs ;-) Reply with quote

Hi,

With the latest release of Smarty (2.6.2) the default behavior of $use_sub_dirs changed due to people complaining with safe mode...

Now, why not make the default $use_sub_dirs dependent upon whether safe mode is in use. If safe mode is ON, the default for $use_sub_dirs would be FALSE, and if not, default would be TRUE...

-Philippe
Back to top
View user's profile Send private message Visit poster's website
Justin
Smarty Regular


Joined: 07 May 2003
Posts: 38
Location: Vilnius, Lithuania

PostPosted: Thu May 13, 2004 4:07 am    Post subject: Reply with quote

But there are no problems to do it yourself Smile You can even extend Smarty with your own handler and check, if safe mode is enabled or not.
Back to top
View user's profile Send private message Visit poster's website
jausions
Smarty Rookie


Joined: 06 Nov 2003
Posts: 10

PostPosted: Thu May 13, 2004 12:57 pm    Post subject: Doing that already... Reply with quote

I am doing that already... It would be smarter for Smarty to do it by default...

Code:

class mySmarty extends Smarty {
...
   mySmarty() {
       $this->use_sub_dirs = (boolean) !ini_get('safe_mode');
   }
...
}
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP