merge r3716-3717 from trunk to branch 2.0

Allow to add description.txt file in language directory for plugin description.
Add multilingual descriptions for plugins.

git-svn-id: http://piwigo.org/svn/branches/2.0@3824 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
patdenice
2009-09-05 11:35:20 +00:00
parent d39ce214bc
commit 203a8a33cf
23 changed files with 201 additions and 5 deletions

View File

@@ -213,7 +213,11 @@ DELETE FROM ' . PLUGINS_TABLE . ' WHERE id="' . $plugin_id . '"';
{
$plugin['uri'] = trim($val[1]);
}
if ( preg_match("|Description: (.*)|", $plg_data, $val) )
if ($desc = load_language('description.txt', $path.'/', array('return' => true)))
{
$plugin['description'] = trim($desc);
}
elseif ( preg_match("|Description: (.*)|", $plg_data, $val) )
{
$plugin['description'] = trim($val[1]);
}