Merge branch '1.0.x' into schema-x

Conflicts:
	plugins/OStatus/classes/Ostatus_profile.php
This commit is contained in:
Brion Vibber
2010-10-06 17:16:13 -07:00
1413 changed files with 159244 additions and 49968 deletions

View File

@@ -0,0 +1,119 @@
<?php
/**
* StatusNet - the distributed open-source microblogging tool
* Copyright (C) 2009, StatusNet, Inc.
*
* Logs cache access
*
* PHP version 5
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category Cache
* @package StatusNet
* @author Evan Prodromou <evan@status.net>
* @copyright 2009 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
if (!defined('STATUSNET')) {
// This check helps protect against security problems;
// your code file can't be executed directly from the web.
exit(1);
}
/**
* Log cache access
*
* Note that since most caching plugins return false for StartCache*
* methods, you should add this plugin before them, i.e.
*
* addPlugin('CacheLog');
* addPlugin('XCache');
*
* @category Cache
* @package StatusNet
* @author Evan Prodromou <evan@status.net>
* @copyright 2009 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
class CacheLogPlugin extends Plugin
{
function onStartCacheGet(&$key, &$value)
{
$this->log(LOG_INFO, "Fetching key '$key'");
return true;
}
function onEndCacheGet($key, &$value)
{
if ($value === false) {
$this->log(LOG_INFO, "Cache MISS for key '$key'");
} else {
$this->log(LOG_INFO, "Cache HIT for key '$key'");
}
return true;
}
function onStartCacheSet(&$key, &$value, &$flag, &$expiry, &$success)
{
if (empty($value)) {
if (is_array($value)) {
$this->log(LOG_INFO, "Setting empty array for key '$key'");
} else if (is_null($value)) {
$this->log(LOG_INFO, "Setting null value for key '$key'");
} else if (is_string($value)) {
$this->log(LOG_INFO, "Setting empty string for key '$key'");
} else if (is_integer($value)) {
$this->log(LOG_INFO, "Setting integer 0 for key '$key'");
} else {
$this->log(LOG_INFO, "Setting empty value '$value' for key '$key'");
}
} else {
$this->log(LOG_INFO, "Setting non-empty value for key '$key'");
}
return true;
}
function onEndCacheSet($key, $value, $flag, $expiry)
{
$this->log(LOG_INFO, "Done setting cache value for key '$key'");
return true;
}
function onStartCacheDelete(&$key, &$success)
{
$this->log(LOG_INFO, "Deleting cache value for key '$key'");
return true;
}
function onEndCacheDelete($key)
{
$this->log(LOG_INFO, "Done deleting cache value for key '$key'");
return true;
}
function onPluginVersion(&$versions)
{
$versions[] = array('name' => 'CacheLog',
'version' => STATUSNET_VERSION,
'author' => 'Evan Prodromou',
'homepage' => 'http://status.net/wiki/Plugin:CacheLog',
'description' =>
_m('Log reads and writes to the cache.'));
return true;
}
}

View File

@@ -0,0 +1,21 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-03 19:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: CacheLogPlugin.php:116
msgid "Log reads and writes to the cache."
msgstr ""

View File

@@ -0,0 +1,26 @@
# Translation of StatusNet - CacheLog to Spanish (Español)
# Expored from translatewiki.net
#
# Author: Translationista
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - CacheLog\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-03 19:53+0000\n"
"PO-Revision-Date: 2010-10-03 19:56:28+0000\n"
"Language-Team: Spanish <http://translatewiki.net/wiki/Portal:es>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-09-27 23:18:16+0000\n"
"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: es\n"
"X-Message-Group: #out-statusnet-plugin-cachelog\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: CacheLogPlugin.php:116
msgid "Log reads and writes to the cache."
msgstr "Registra lecturas y escrituras en el caché"

View File

@@ -0,0 +1,26 @@
# Translation of StatusNet - CacheLog to French (Français)
# Expored from translatewiki.net
#
# Author: Verdy p
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - CacheLog\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-03 19:53+0000\n"
"PO-Revision-Date: 2010-10-03 19:56:28+0000\n"
"Language-Team: French <http://translatewiki.net/wiki/Portal:fr>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-09-27 23:18:16+0000\n"
"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: fr\n"
"X-Message-Group: #out-statusnet-plugin-cachelog\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: CacheLogPlugin.php:116
msgid "Log reads and writes to the cache."
msgstr "Lectures et écritures de journal en cache."

View File

@@ -0,0 +1,26 @@
# Translation of StatusNet - CacheLog to Interlingua (Interlingua)
# Expored from translatewiki.net
#
# Author: McDutchie
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - CacheLog\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-03 19:53+0000\n"
"PO-Revision-Date: 2010-10-03 19:56:28+0000\n"
"Language-Team: Interlingua <http://translatewiki.net/wiki/Portal:ia>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-09-27 23:18:16+0000\n"
"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: ia\n"
"X-Message-Group: #out-statusnet-plugin-cachelog\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: CacheLogPlugin.php:116
msgid "Log reads and writes to the cache."
msgstr "Registrar le lectura e scriptura al cache."

View File

@@ -0,0 +1,26 @@
# Translation of StatusNet - CacheLog to Macedonian (Македонски)
# Expored from translatewiki.net
#
# Author: Bjankuloski06
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - CacheLog\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-03 19:53+0000\n"
"PO-Revision-Date: 2010-10-03 19:56:28+0000\n"
"Language-Team: Macedonian <http://translatewiki.net/wiki/Portal:mk>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-09-27 23:18:16+0000\n"
"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: mk\n"
"X-Message-Group: #out-statusnet-plugin-cachelog\n"
"Plural-Forms: nplurals=2; plural=(n == 1 || n%10 == 1) ? 0 : 1;\n"
#: CacheLogPlugin.php:116
msgid "Log reads and writes to the cache."
msgstr "Евидентирај читања на и записи во кешот."

View File

@@ -0,0 +1,26 @@
# Translation of StatusNet - CacheLog to Dutch (Nederlands)
# Expored from translatewiki.net
#
# Author: Siebrand
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - CacheLog\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-03 19:53+0000\n"
"PO-Revision-Date: 2010-10-03 19:56:28+0000\n"
"Language-Team: Dutch <http://translatewiki.net/wiki/Portal:nl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-09-27 23:18:16+0000\n"
"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: nl\n"
"X-Message-Group: #out-statusnet-plugin-cachelog\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: CacheLogPlugin.php:116
msgid "Log reads and writes to the cache."
msgstr "Lezen en schrijven naar de cache in het logboek opnemen."

View File

@@ -0,0 +1,26 @@
# Translation of StatusNet - CacheLog to Portuguese (Português)
# Expored from translatewiki.net
#
# Author: Waldir
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - CacheLog\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-03 19:53+0000\n"
"PO-Revision-Date: 2010-10-03 19:56:28+0000\n"
"Language-Team: Portuguese <http://translatewiki.net/wiki/Portal:pt>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-09-27 23:18:16+0000\n"
"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: pt\n"
"X-Message-Group: #out-statusnet-plugin-cachelog\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: CacheLogPlugin.php:116
msgid "Log reads and writes to the cache."
msgstr "Regista leituras e escritas na cache."

View File

@@ -0,0 +1,27 @@
# Translation of StatusNet - CacheLog to Russian (Русский)
# Expored from translatewiki.net
#
# Author: Александр Сигачёв
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - CacheLog\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-03 19:53+0000\n"
"PO-Revision-Date: 2010-10-03 19:56:28+0000\n"
"Language-Team: Russian <http://translatewiki.net/wiki/Portal:ru>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-09-27 23:18:16+0000\n"
"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: ru\n"
"X-Message-Group: #out-statusnet-plugin-cachelog\n"
"Plural-Forms: nplurals=3; plural=(n%10 == 1 && n%100 != 11) ? 0 : ( (n%10 >= "
"2 && n%10 <= 4 && (n%100 < 10 || n%100 >= 20)) ? 1 : 2 );\n"
#: CacheLogPlugin.php:116
msgid "Log reads and writes to the cache."
msgstr "Журнал читает и пишет в кеш."

View File

@@ -0,0 +1,26 @@
# Translation of StatusNet - CacheLog to Tagalog (Tagalog)
# Expored from translatewiki.net
#
# Author: AnakngAraw
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - CacheLog\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-03 19:53+0000\n"
"PO-Revision-Date: 2010-10-03 19:56:28+0000\n"
"Language-Team: Tagalog <http://translatewiki.net/wiki/Portal:tl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-09-27 23:18:16+0000\n"
"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: tl\n"
"X-Message-Group: #out-statusnet-plugin-cachelog\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: CacheLogPlugin.php:116
msgid "Log reads and writes to the cache."
msgstr "Ang tala ay nagbabasa at nagsusulat sa taguan."

View File

@@ -0,0 +1,27 @@
# Translation of StatusNet - CacheLog to Ukrainian (Українська)
# Expored from translatewiki.net
#
# Author: Boogie
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - CacheLog\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-03 19:53+0000\n"
"PO-Revision-Date: 2010-10-03 19:56:28+0000\n"
"Language-Team: Ukrainian <http://translatewiki.net/wiki/Portal:uk>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-09-27 23:18:16+0000\n"
"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: uk\n"
"X-Message-Group: #out-statusnet-plugin-cachelog\n"
"Plural-Forms: nplurals=3; plural=(n%10 == 1 && n%100 != 11) ? 0 : ( (n%10 >= "
"2 && n%10 <= 4 && (n%100 < 10 || n%100 >= 20)) ? 1 : 2 );\n"
#: CacheLogPlugin.php:116
msgid "Log reads and writes to the cache."
msgstr "Лоґ переглядів та записів у кеші."

View File

@@ -0,0 +1,27 @@
# Translation of StatusNet - CacheLog to Simplified Chinese (‪中文(简体))
# Expored from translatewiki.net
#
# Author: ZhengYiFeng
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - CacheLog\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-03 19:53+0000\n"
"PO-Revision-Date: 2010-10-03 19:56:28+0000\n"
"Language-Team: Simplified Chinese <http://translatewiki.net/wiki/Portal:zh-"
"hans>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-09-27 23:18:16+0000\n"
"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: zh-hans\n"
"X-Message-Group: #out-statusnet-plugin-cachelog\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: CacheLogPlugin.php:116
msgid "Log reads and writes to the cache."
msgstr "将读写日志到缓存。"