From 17c28c8161e8c551ce4e4a1345e525cbb785fb59 Mon Sep 17 00:00:00 2001 From: Sem Date: Sun, 8 Jul 2012 09:48:50 +0200 Subject: Fixes #3646. Added suport for Repository, Bugtracker and Donations in manifest. --- views/default/object/plugin/full.php | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'views/default/object/plugin') diff --git a/views/default/object/plugin/full.php b/views/default/object/plugin/full.php index db0a52416..a96acd4ec 100644 --- a/views/default/object/plugin/full.php +++ b/views/default/object/plugin/full.php @@ -172,6 +172,26 @@ $website = elgg_view('output/url', array( 'is_trusted' => true, )); +$resources = array( + 'repository' => $plugin->getManifest()->getRepository(), + 'bugtracker' => $plugin->getManifest()->getBugTracker(), + 'donate' => $plugin->getManifest()->getDonationsPage(), +); + +$resources_html = ""; + $copyright = elgg_view('output/text', array('value' => $plugin->getManifest()->getCopyright())); $license = elgg_view('output/text', array('value' => $plugin->getManifest()->getLicense())); @@ -242,7 +262,11 @@ if (elgg_view_exists($settings_view_old) || elgg_view_exists($settings_view_new)

- + +
- \ No newline at end of file + -- cgit v1.2.3 From b7edff977107e928660256f37bbf4bc35fdea0a9 Mon Sep 17 00:00:00 2001 From: Sem Date: Fri, 13 Jul 2012 00:58:12 +0200 Subject: Refs #3646. "getRepositoryURL" is more descriptive than "getRepository". --- engine/classes/ElggPluginManifest.php | 10 +++++----- engine/tests/api/plugins.php | 4 ++-- views/default/object/plugin/full.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'views/default/object/plugin') diff --git a/engine/classes/ElggPluginManifest.php b/engine/classes/ElggPluginManifest.php index 5eb248c2c..5706d1e42 100644 --- a/engine/classes/ElggPluginManifest.php +++ b/engine/classes/ElggPluginManifest.php @@ -264,7 +264,7 @@ class ElggPluginManifest { /** * Returns the license * - * @return sting + * @return string */ public function getLicense() { // license vs licence. Use license. @@ -279,16 +279,16 @@ class ElggPluginManifest { /** * Returns the repository url * - * @return sting + * @return string */ - public function getRepository() { + public function getRepositoryURL() { return $this->parser->getAttribute('repository'); } /** * Returns the bug tracker page * - * @return sting + * @return string */ public function getBugTracker() { return $this->parser->getAttribute('bugtracker'); @@ -297,7 +297,7 @@ class ElggPluginManifest { /** * Returns the donations page * - * @return sting + * @return string */ public function getDonationsPage() { return $this->parser->getAttribute('donations'); diff --git a/engine/tests/api/plugins.php b/engine/tests/api/plugins.php index 66297266c..3b650f1b0 100644 --- a/engine/tests/api/plugins.php +++ b/engine/tests/api/plugins.php @@ -169,8 +169,8 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { } public function testElggPluginManifestGetRepository() { - $this->assertEqual($this->manifest18->getRepository(), 'https://github.com/Elgg/Elgg'); - $this->assertEqual($this->manifest17->getRepository(), ''); + $this->assertEqual($this->manifest18->getRepositoryURL(), 'https://github.com/Elgg/Elgg'); + $this->assertEqual($this->manifest17->getRepositoryURL(), ''); } public function testElggPluginManifestGetBugtracker() { diff --git a/views/default/object/plugin/full.php b/views/default/object/plugin/full.php index a96acd4ec..76e1136f2 100644 --- a/views/default/object/plugin/full.php +++ b/views/default/object/plugin/full.php @@ -173,7 +173,7 @@ $website = elgg_view('output/url', array( )); $resources = array( - 'repository' => $plugin->getManifest()->getRepository(), + 'repository' => $plugin->getManifest()->getRepositoryURL(), 'bugtracker' => $plugin->getManifest()->getBugTracker(), 'donate' => $plugin->getManifest()->getDonationsPage(), ); -- cgit v1.2.3 From 1080fecabc592c9c319c1aa816f61eb922cf3285 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Mon, 16 Jul 2012 20:05:39 -0400 Subject: added URL to the other new method names --- engine/classes/ElggPluginManifest.php | 4 ++-- engine/tests/api/plugins.php | 8 ++++---- views/default/object/plugin/full.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'views/default/object/plugin') diff --git a/engine/classes/ElggPluginManifest.php b/engine/classes/ElggPluginManifest.php index 5706d1e42..a1fe66856 100644 --- a/engine/classes/ElggPluginManifest.php +++ b/engine/classes/ElggPluginManifest.php @@ -290,7 +290,7 @@ class ElggPluginManifest { * * @return string */ - public function getBugTracker() { + public function getBugTrackerURL() { return $this->parser->getAttribute('bugtracker'); } @@ -299,7 +299,7 @@ class ElggPluginManifest { * * @return string */ - public function getDonationsPage() { + public function getDonationsPageURL() { return $this->parser->getAttribute('donations'); } diff --git a/engine/tests/api/plugins.php b/engine/tests/api/plugins.php index 3b650f1b0..114f3991b 100644 --- a/engine/tests/api/plugins.php +++ b/engine/tests/api/plugins.php @@ -174,13 +174,13 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { } public function testElggPluginManifestGetBugtracker() { - $this->assertEqual($this->manifest18->getBugTracker(), 'http://trac.elgg.org'); - $this->assertEqual($this->manifest17->getBugTracker(), ''); + $this->assertEqual($this->manifest18->getBugTrackerURL(), 'http://trac.elgg.org'); + $this->assertEqual($this->manifest17->getBugTrackerURL(), ''); } public function testElggPluginManifestGetDonationsPage() { - $this->assertEqual($this->manifest18->getDonationsPage(), 'http://elgg.org/supporter.php'); - $this->assertEqual($this->manifest17->getDonationsPage(), ''); + $this->assertEqual($this->manifest18->getDonationsPageURL(), 'http://elgg.org/supporter.php'); + $this->assertEqual($this->manifest17->getDonationsPageURL(), ''); } public function testElggPluginManifestGetCopyright() { diff --git a/views/default/object/plugin/full.php b/views/default/object/plugin/full.php index 76e1136f2..2de65b555 100644 --- a/views/default/object/plugin/full.php +++ b/views/default/object/plugin/full.php @@ -174,8 +174,8 @@ $website = elgg_view('output/url', array( $resources = array( 'repository' => $plugin->getManifest()->getRepositoryURL(), - 'bugtracker' => $plugin->getManifest()->getBugTracker(), - 'donate' => $plugin->getManifest()->getDonationsPage(), + 'bugtracker' => $plugin->getManifest()->getBugTrackerURL(), + 'donate' => $plugin->getManifest()->getDonationsPageURL(), ); $resources_html = "
    "; -- cgit v1.2.3