From 113b813b5a5ec8b93ee72d4f259d8e38f9a9c5e4 Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 25 Apr 2011 18:12:10 +0000 Subject: Fixes #2899, #2870. Added README.txt, CHANGES.txt, COPYRIGHT.txt, LICENSE.txt, and INSTALL.txt as markdown files for plugins. Added page handler to parse and serve them. Added links in plugin admin. Refs #3236. Problems with displaying parsed markdown because of missing parts of the admin theme's CSS. git-svn-id: http://code.elgg.org/elgg/trunk@9022 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/classes/ElggPluginPackage.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'engine/classes/ElggPluginPackage.php') diff --git a/engine/classes/ElggPluginPackage.php b/engine/classes/ElggPluginPackage.php index b2ec20549..4daab381e 100644 --- a/engine/classes/ElggPluginPackage.php +++ b/engine/classes/ElggPluginPackage.php @@ -27,6 +27,15 @@ class ElggPluginPackage { 'start.php', 'manifest.xml' ); + /** + * The optional files that can be read and served through the markdown page handler + * @var array + */ + private $textFiles = array( + 'README.txt', 'CHANGES.txt', + 'INSTALL.txt', 'COPYRIGHT.txt', 'LICENSE.txt' + ); + /** * Valid types for provides. * @@ -286,6 +295,16 @@ class ElggPluginPackage { return false; } + /**************** + * Readme Files * + ***************/ + + /** + * Returns an array of present and readable text files + */ + public function getTextFilenames() { + return $this->textFiles; + } /*********************** * Dependencies system * -- cgit v1.2.3