diff --git a/actions/qvitter.php b/actions/qvitter.php index 6462bc9..6a00124 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -107,14 +107,24 @@ class QvitterAction extends ApiAction } else { $attachmentroot = common_path('attachment/', StatusNet::isHTTPS()); } + $avatarconfig=common_config('avatar'); + if($avatarconfig['server']) { + if(StatusNet::isHTTPS() ){ + $avatarroot ='https://'.$avatarconfig['server'].$avatarconfig['path']; + } elseif(!StatusNet::isHTTPS()) { + $avatarroot ='http://'.$avatarconfig['server'].$avatarconfig['path']; + } + } else { + $attachmentroot = common_path('attachment/', StatusNet::isHTTPS()); + } $instanceurl = common_path('', StatusNet::isHTTPS()); - $favicon_path = QvitterPlugin::settings("favicon_path"); + $favicon_path = QvitterPlugin::settings("favicon_path"); - // user's browser's language setting - $user_browser_language = 'en'; // use english if we can't find the browser language - if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { - $user_browser_language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); - } + // user's browser's language setting + $user_browser_language = 'en'; // use english if we can't find the browser language + if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { + $user_browser_language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); + } common_set_returnto(''); // forget this @@ -379,15 +389,16 @@ class QvitterAction extends ApiAction window.customWelcomeText = ; window.urlShortenerAPIURL = ''; window.urlShortenerSignature = ''; - window.urlshortenerFormat = ''; + window.urlshortenerFormat = ''; window.commonSessionToken = ''; window.siteMaxThumbnailSize = ; window.siteAttachmentURLBase = ''; + window.siteAvatarURLBase = ''; window.siteEmail = ''; window.siteLicenseTitle = ''; window.siteLicenseURL = ''; window.customTermsOfUse = ; - window.siteLocalOnlyDefaultPath = ; + window.siteLocalOnlyDefaultPath = ;