Re: Global assign

From: Date: Thu, 17 May 2001 16:28:38 +0000
Subject: Re: Global assign
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-771@lists.php.net to get a copy of this message
Hi Bicou, this has been already done in 1.4.0. Check it out. At 18:32 17.5. 2001 +0200, Bicou wrote:
I've made a modification to the constructor in Smarty.class.php, line 171 : The block : $this->assign($var_name, $GLOBALS[$var_name]); replaced with : if (is_array($GLOBALS[$var_name])) {
        $this->assign($GLOBALS[$var_name]);
} else {
        $this->assign($var_name, $GLOBALS[$var_name]);
}
                                                                        }
So I can write : var $global_assign = array('HTTP_POST_VARS', 'HTTP_SERVER_VARS' => array( 'SCRIPT_NAME' )); and all http_post_vars are assigned with key correspondance, instead of doing this by hand. --- You are currently subscribed to smarty as: cynic@mail.cz To unsubscribe send a blank email to $subst('Email.Unsub') Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/
cynic@mail.cz ------------- And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files.
    - Book of Installation chapt 3 sec 7 


« previous php.smarty.general (#771) next »