Update of /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_recententries
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9563/serendipity_plugin_recententries
Modified Files:
serendipity_plugin_recententries.php
Log Message:
Removed plugins setting the locale. This is done in
serendipity_config.inc.php depending on the included language and the
'recommended way'. :-)
Index: serendipity_plugin_recententries.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- serendipity_plugin_recententries.php 9 Feb 2004 15:14:39 -0000 1.2
+++ serendipity_plugin_recententries.php 27 Mar 2004 12:10:23 -0000 1.3
@@ -26,7 +26,7 @@
function introspect(&$propbag) {
$propbag->add('name', PLUGIN_RECENTENTRIES_TITLE);
$propbag->add('description', PLUGIN_RECENTENTRIES_BLAHBLAH);
- $propbag->add('configuration', array('number', 'language', 'dateformat'));
+ $propbag->add('configuration', array('number', 'dateformat'));
}
function introspect_config_item($name, &$propbag) {
@@ -37,12 +37,6 @@
$propbag->add('description', PLUGIN_RECENTENTRIES_NUMBER_BLAHBLAH);
break;
- case 'language':
- $propbag->add('type', 'string');
- $propbag->add('name', GENERAL_PLUGIN_LANGUAGE);
- $propbag->add('description', GENERAL_PLUGIN_LANGUAGE_BLAHBLAH);
- break;
-
case 'dateformat':
$propbag->add('type', 'string');
$propbag->add('name', GENERAL_PLUGIN_DATEFORMAT);
@@ -59,7 +53,6 @@
global $serendipity;
$number = $this->get_config('number');
- $lang = strtolower($this->get_config('language'));
$dateformat = $this->get_config('dateformat');
if (!$number || !is_numeric($number) || $number < 1) {
@@ -70,24 +63,8 @@
$dateformat = '%A, %B %e %Y';
}
- if ($lang != 'de' && $lang != 'en') {
- $lang = 'en';
- }
-
- switch($lang) {
- case 'de':
- $loc = setlocale(LC_ALL, 'de_DE');
- if (!$loc) $loc = setlocale(LC_ALL, 'de');
- break;
-
- case 'en':
- $loc = setlocale(LC_ALL, 'en_US');
- if (!$loc) $loc = setlocale(LC_ALL, 'en');
- break;
- }
-
$title = PLUGIN_RECENTENTRIES_TITLE;
-
+
$entries = serendipity_db_query("SELECT id,
title,
timestamp
|