User/Misc
* don't run querys if not strictly required (e.g. query for chars from ajax context) * prepare user globals and favorites so errors can be handled and don't destroy the template this also allows for profiling of the affected queries * add keys to items table to speed up querying for recipes in general and user completions in particular
This commit is contained in:
parent
9020e36db6
commit
16c5b73cd3
6 changed files with 78 additions and 55 deletions
|
|
@ -22,10 +22,10 @@ endif;
|
|||
</script>
|
||||
<?=$this->renderArray('js', 4); ?>
|
||||
<script type="text/javascript">
|
||||
var g_user = <?=$this->json($this->user::getUserGlobal()); ?>;
|
||||
var g_user = <?=$this->gUser; ?>;
|
||||
<?php
|
||||
if ($fav = $this->user::getFavorites()):
|
||||
echo " g_favorites = ".$this->json($fav).";\n";
|
||||
if ($this->gFavorites):
|
||||
echo " g_favorites = ".$this->gFavorites.";\n";
|
||||
endif;
|
||||
?>
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue