From 82593cd2bc056da73caa1b1e981c5a9ead0f1bf2 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 27 Apr 2011 02:37:16 +0000 Subject: Refs #3362. Plugins don't check deps upon boot. Made package and manifest private properties of ElggPlugin and added ->getPackage() and ->getManifest(). git-svn-id: http://code.elgg.org/elgg/trunk@9030 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/object/plugin/advanced.php | 24 +++++++++++----------- .../object/plugin/elements/dependencies.php | 2 +- views/default/object/plugin/simple.php | 10 ++++----- 3 files changed, 18 insertions(+), 18 deletions(-) (limited to 'views/default/object') diff --git a/views/default/object/plugin/advanced.php b/views/default/object/plugin/advanced.php index a346d4ff1..4c8bc8c17 100644 --- a/views/default/object/plugin/advanced.php +++ b/views/default/object/plugin/advanced.php @@ -13,7 +13,7 @@ $plugin = $vars['entity']; $priority = $plugin->getPriority(); $active = $plugin->isActive(); -$name = $plugin->manifest->getName(); +$name = $plugin->getManifest()->getName(); $can_activate = $plugin->canActivate(); $max_priority = elgg_get_max_plugin_priority(); $actions_base = '/action/admin/plugins/'; @@ -123,7 +123,7 @@ if ($categories) { } $screenshots_html = ''; -$screenshots = $plugin->manifest->getScreenshots(); +$screenshots = $plugin->getManifest()->getScreenshots(); if ($screenshots) { $base_url = elgg_get_plugins_path() . $plugin->getID() . '/'; foreach ($screenshots as $screenshot) { @@ -138,17 +138,17 @@ if ($screenshots) { } // metadata -$description = elgg_view('output/longtext', array('value' => $plugin->manifest->getDescription())); +$description = elgg_view('output/longtext', array('value' => $plugin->getManifest()->getDescription())); $author = '' . elgg_echo('admin:plugins:label:author') . ': ' - . elgg_view('output/text', array('value' => $plugin->manifest->getAuthor())); -$version = htmlspecialchars($plugin->manifest->getVersion()); + . elgg_view('output/text', array('value' => $plugin->getManifest()->getAuthor())); +$version = htmlspecialchars($plugin->getManifest()->getVersion()); $website = elgg_view('output/url', array( - 'href' => $plugin->manifest->getWebsite(), - 'text' => $plugin->manifest->getWebsite() + 'href' => $plugin->getManifest()->getWebsite(), + 'text' => $plugin->getManifest()->getWebsite() )); -$copyright = elgg_view('output/text', array('value' => $plugin->manifest->getCopyright())); -$license = elgg_view('output/text', array('value' => $plugin->manifest->getLicense())); +$copyright = elgg_view('output/text', array('value' => $plugin->getManifest()->getCopyright())); +$license = elgg_view('output/text', array('value' => $plugin->getManifest()->getLicense())); // show links to text files $files = $plugin->getAvailableTextFiles(); @@ -189,11 +189,11 @@ if (elgg_view_exists($settings_view)) { } ?>
-

manifest->getName(). " $version $settings_link"; ?>

+

getManifest()->getName(). " $version $settings_link"; ?>

manifest->getApiVersion() < 1.8) { - $reqs = $plugin->manifest->getRequires(); + if ($plugin->getManifest()->getApiVersion() < 1.8) { + $reqs = $plugin->getManifest()->getRequires(); if (!$reqs) { $message = elgg_echo('admin:plugins:warning:elgg_version_unknown'); echo "

$message

"; diff --git a/views/default/object/plugin/elements/dependencies.php b/views/default/object/plugin/elements/dependencies.php index 11a441a4a..b5cdaf8b6 100644 --- a/views/default/object/plugin/elements/dependencies.php +++ b/views/default/object/plugin/elements/dependencies.php @@ -9,7 +9,7 @@ */ $plugin = elgg_extract('plugin', $vars, false); -$deps = $plugin->package->checkDependencies(true); +$deps = $plugin->getPackage()->checkDependencies(true); $columns = array('type', 'name', 'expected_value', 'local_value', 'comment'); diff --git a/views/default/object/plugin/simple.php b/views/default/object/plugin/simple.php index d57d81934..5f5b08f10 100644 --- a/views/default/object/plugin/simple.php +++ b/views/default/object/plugin/simple.php @@ -5,11 +5,11 @@ $plugin_guid = $plugin->guid; $plugin_id = $plugin->getID(); $active = $plugin->isActive(); $can_activate = $plugin->canActivate(); -$name = $plugin->manifest->getName(); -$author = $plugin->manifest->getAuthor(); -$version = $plugin->manifest->getVersion(); -$website = $plugin->manifest->getWebsite(); -$description = $plugin->manifest->getDescription(); +$name = $plugin->getManifest()->getName(); +$author = $plugin->getManifest()->getAuthor(); +$version = $plugin->getManifest()->getVersion(); +$website = $plugin->getManifest()->getWebsite(); +$description = $plugin->getManifest()->getDescription(); if ($active) { $active_class = 'elgg-state-active'; -- cgit v1.2.3