summaryrefslogtreecommitdiff
path: root/plugins/Sample
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Sample')
-rw-r--r--plugins/Sample/User_greeting_count.php19
-rw-r--r--plugins/Sample/locale/Sample.pot (renamed from plugins/Sample/locale/Sample.po)38
2 files changed, 31 insertions, 26 deletions
diff --git a/plugins/Sample/User_greeting_count.php b/plugins/Sample/User_greeting_count.php
index d9a59770d..fc0cbd28f 100644
--- a/plugins/Sample/User_greeting_count.php
+++ b/plugins/Sample/User_greeting_count.php
@@ -94,29 +94,34 @@ class User_greeting_count extends Memcached_DataObject
/**
* return key definitions for DB_DataObject
*
- * DB_DataObject needs to know about keys that the table has; this function
- * defines them.
+ * DB_DataObject needs to know about keys that the table has, since it
+ * won't appear in StatusNet's own keys list. In most cases, this will
+ * simply reference your keyTypes() function.
*
- * @return array key definitions
+ * @return array list of key field names
*/
function keys()
{
- return array('user_id' => 'K');
+ return array_keys($this->keyTypes());
}
/**
* return key definitions for Memcached_DataObject
*
* Our caching system uses the same key definitions, but uses a different
- * method to get them.
+ * method to get them. This key information is used to store and clear
+ * cached data, so be sure to list any key that will be used for static
+ * lookups.
*
- * @return array key definitions
+ * @return array associative array of key definitions, field name to type:
+ * 'K' for primary key: for compound keys, add an entry for each component;
+ * 'U' for unique keys: compound keys are not well supported here.
*/
function keyTypes()
{
- return $this->keys();
+ return array('user_id' => 'K');
}
/**
diff --git a/plugins/Sample/locale/Sample.po b/plugins/Sample/locale/Sample.pot
index a52c4ec01..bd21dd3c4 100644
--- a/plugins/Sample/locale/Sample.po
+++ b/plugins/Sample/locale/Sample.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-03-01 14:58-0800\n"
+"POT-Creation-Date: 2010-04-29 23:39+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"
@@ -17,26 +17,20 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-#: hello.php:115 SamplePlugin.php:266
-msgid "Hello"
+#: User_greeting_count.php:163
+#, php-format
+msgid "Could not save new greeting count for %d"
msgstr ""
-#: hello.php:117 hello.php:141
+#: User_greeting_count.php:176
#, php-format
-msgid "Hello, %s"
+msgid "Could not increment greeting count for %d"
msgstr ""
-#: hello.php:138
-msgid "Hello, stranger!"
+#: SamplePlugin.php:266 hello.php:115
+msgid "Hello"
msgstr ""
-#: hello.php:143
-#, php-format
-msgid "I have greeted you %d time."
-msgid_plural "I have greeted you %d times."
-msgstr[0] ""
-msgstr[1] ""
-
#: SamplePlugin.php:266
msgid "A warm greeting"
msgstr ""
@@ -45,12 +39,18 @@ msgstr ""
msgid "A sample plugin to show basics of development for new hackers."
msgstr ""
-#: User_greeting_count.php:163
+#: hello.php:117 hello.php:141
#, php-format
-msgid "Could not save new greeting count for %d"
+msgid "Hello, %s"
msgstr ""
-#: User_greeting_count.php:176
-#, php-format
-msgid "Could not increment greeting count for %d"
+#: hello.php:138
+msgid "Hello, stranger!"
msgstr ""
+
+#: hello.php:143
+#, php-format
+msgid "I have greeted you %d time."
+msgid_plural "I have greeted you %d times."
+msgstr[0] ""
+msgstr[1] ""