From 380c48662673d64214e64766f38014c6057d3142 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Thu, 6 Aug 2009 15:19:33 -0400 Subject: I had my user info hardcoded... oops. --- plugins/Autocomplete/AutocompletePlugin.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/plugins/Autocomplete/AutocompletePlugin.php b/plugins/Autocomplete/AutocompletePlugin.php index ddb0dea32..58b6a84ca 100644 --- a/plugins/Autocomplete/AutocompletePlugin.php +++ b/plugins/Autocomplete/AutocompletePlugin.php @@ -39,19 +39,24 @@ class AutocompletePlugin extends Plugin } function onEndShowScripts($action){ - $js_string = << -var current_user = { screen_name: 'CANDREWS', id: '1' }; +var current_user = { id: '$current_user->id' }; EOT; - $action->raw($js_string); - $action->script('plugins/Autocomplete/jquery-autocomplete/jquery.autocomplete.pack.js'); - $action->script('plugins/Autocomplete/Autocomplete.js'); + $action->raw($js_string); + $action->script('plugins/Autocomplete/jquery-autocomplete/jquery.autocomplete.pack.js'); + $action->script('plugins/Autocomplete/Autocomplete.js'); + } } function onEndShowLaconicaStyles($action) { - $action->cssLink('plugins/Autocomplete/jquery-autocomplete/jquery.autocomplete.css'); + if (common_logged_in()) { + $action->cssLink('plugins/Autocomplete/jquery-autocomplete/jquery.autocomplete.css'); + } } } -- cgit v1.2.3-54-g00ecf