Index: trunk/extensions/YouTubeAuthSub/YouTubeAuthSub_body.php |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | |
75 | 75 | if ($wgYTAS_UseClientLogin) { |
76 | 76 | |
77 | | - $key = wfMemcKey('youtube', 'authsub', $wgYTAS_User); |
| 77 | + $key = wfMemcKey('youtube', 'authsub', 'token', $wgYTAS_User); |
78 | 78 | $token = $wgMemc->get( $key ); |
79 | 79 | // regenerate the token |
80 | 80 | if (!$token) { |
— | — | @@ -96,7 +96,7 @@ |
97 | 97 | $wgOut->addHTML(wfMsg('youtubeauthsub_tokenerror')); |
98 | 98 | return; |
99 | 99 | } |
100 | | - $wgMemc->set($key, $token, time() + 3600); |
| 100 | + $wgMemc->set($key, $token, 3600); |
101 | 101 | } |
102 | 102 | } |
103 | 103 | else { |
Index: trunk/extensions/YouTubeAuthSub/YouTubeAuthSub.php |
— | — | @@ -82,8 +82,8 @@ |
83 | 83 | } |
84 | 84 | |
85 | 85 | function wfSpecialYouTubeGetCategories() { |
86 | | - global $wgMemc, $wgYTAS_User; |
87 | | - $key = wfMemcKey('youtube', 'authsub', $wgYTAS_User); |
| 86 | + global $wgMemc; |
| 87 | + $key = wfMemcKey('youtube', 'authsub', 'cats'); |
88 | 88 | $cats = $wgMemc->get( $key ); |
89 | 89 | if (!$cats) { |
90 | 90 | $ch = curl_init(); |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | for ($i = 0; $i < sizeof ($matches[1]) && $i < sizeof($matches[2]); $i++) { |
104 | 104 | $cats .= "<OPTION VALUE='{$matches[1][$i]}'>{$matches[2][$i]}</OPTION>"; |
105 | 105 | } |
106 | | - $wgMemc->set($key, $cats, time() + 3600 * 24); |
| 106 | + $wgMemc->set($key, $cats, 3600 * 24); |
107 | 107 | } |
108 | 108 | return $cats; |
109 | 109 | } |