On Mon, Jun 20, 2011 at 3:02 PM, Tyron Madlener tyronx@gmail.com wrote:
On Fri, Jun 17, 2011 at 10:23 AM, Michal Čihař michal@cihar.com wrote:
Hi
Dne Fri, 17 Jun 2011 10:13:07 +0200 Tyron Madlener tyronx@gmail.com napsal(a):
For the chart export to work you'll need to define the a js variable in your php code like this:
<script type="text/javascript"> pma_token = '<?php echo $_SESSION[' PMA_token ']; ?>'; </script>
...or maybe we could put this into header.inc.php?
I think it should rather go to js/messages.php, though it's name does not suggest it. We anyway use it for almost all data needs to be passed to javascript and do not change during one session.
I would like to be able to add js vars dynamically. In the case of server_variables.php I need to know whether the current user is a superuser. Whereas in most other pages this information is not required. So instead of putting all possible vars there I'd rather prefer to have only 4-5 variables hardcoded and others addable dynamically through a function, lets call it PMA_AddJSVariable(). But having that in messages.php would means the browser cannot load the file once and use the cached version after. Also those variables might change in value, meaning the messages.php also needs to be refreshed by the browser each time.
It might be better to have that in header.inc.php.
With such solution I could also avoid some inline JSON Code places.
-- Michal Čihař | http://cihar.com | http://blog.cihar.com
EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel