]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Renamed 'name' to 'plugin' for priority req. Updated unit tests and docs.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 4 Feb 2011 21:45:55 +0000 (21:45 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 4 Feb 2011 21:45:55 +0000 (21:45 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8019 36083f99-b078-4883-b0ff-0f9b5a30f544

documentation/examples/plugins/manifest.xml
engine/classes/ElggPluginManifest.php
engine/classes/ElggPluginPackage.php
engine/lib/plugins.php
engine/tests/api/plugins.php
engine/tests/test_files/plugin_18/manifest.xml

index 1c14a39900efe6796498e073b35cc69063ca90e2..a61106e6270e42ea7be98bfb4147860e4505a123 100644 (file)
@@ -75,7 +75,7 @@
        <requires>
                <type>priority</type>
                <priority>after</priority>
-               <name>blog</name>
+               <plugin>blog</plugin>
        </requires>
 
        <conflicts>
index 95f008f98145d6ebb5d848b99fe868617600c596..34af6cd215cbfeadf106d8df518928c5da2fbb28 100644 (file)
@@ -37,8 +37,8 @@ class ElggPluginManifest {
         */
        private $depsRequiresStructPriority = array(
                'type' => '',
-               'name' => '',
                'priority' => '',
+               'plugin' => ''
        );
 
        /*
index db62620a8700917ae4127799014d74d8830b1e61..84cb8c1dbc3517207d6ffe7ecf5cf13a7636340a 100644 (file)
@@ -411,7 +411,7 @@ class ElggPluginPackage {
                $this_priority = $this_plugin->getPriority();
 
                foreach ($plugins as $test_plugin) {
-                       if ($test_plugin->getID() == $dep['name']) {
+                       if ($test_plugin->getID() == $dep['plugin']) {
                                break;
                        }
                }
index 01cbf631a57253183c43d1227f1a12c3428f6079..cf0ac5af167824a95f0c858066920329bb6870fd 100644 (file)
@@ -715,8 +715,8 @@ function elgg_get_plugin_dependency_strings($dep) {
                        $expected_priority = ucwords($info['priority']);
                        $real_priority = ucwords($dep['value']);
                        $strings['name'] = elgg_echo('ElggPlugin:Dependencies:Priority');
-                       $strings['expected_value'] = elgg_echo("ElggPlugin:Dependencies:Priority:$expected_priority", array($info['name']));
-                       $strings['local_value'] =  elgg_echo("ElggPlugin:Dependencies:Priority:$real_priority", array($info['name']));
+                       $strings['expected_value'] = elgg_echo("ElggPlugin:Dependencies:Priority:$expected_priority", array($info['plugin']));
+                       $strings['local_value'] = elgg_echo("ElggPlugin:Dependencies:Priority:$real_priority", array($info['plugin']));
                        $strings['comment'] = '';
                        break;
        }
index 997d69fb7ace6ddad40c4c984c740cfcd1ee459c..ac1278410a802086c77958a81bb356b359769aa7 100644 (file)
@@ -80,6 +80,7 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest {
                                array('type' => 'plugin', 'name' => 'fake_plugin', 'version' => '1.0'),
                                array('type' => 'plugin', 'name' => 'profile', 'version' => '1.0'),
                                array('type' => 'plugin', 'name' => 'profile_api', 'version' => '1.3', 'comparison' => 'lt'),
+                               array('type' => 'priority', 'priority' => 'after', 'plugin' => 'profile'),
                        ),
 
                        'screenshot' => array(
@@ -183,6 +184,7 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest {
                        array('type' => 'plugin', 'name' => 'fake_plugin', 'version' => '1.0', 'comparison' => 'ge'),
                        array('type' => 'plugin', 'name' => 'profile', 'version' => '1.0', 'comparison' => 'ge'),
                        array('type' => 'plugin', 'name' => 'profile_api', 'version' => '1.3', 'comparison' => 'lt'),
+                       array('type' => 'priority', 'priority' => 'after', 'plugin' => 'profile'),
                );
 
                $this->assertEqual($this->package18->getManifest()->getRequires(), $requires);
index 69166c89c0fcce3906f4bd23f4df3563a6a1b3f5..2a4d72c6578282d5f3f07fc3dfa67b19a27e4543 100644 (file)
                <comparison>lt</comparison>
        </requires>
 
+       <requires>
+               <type>priority</type>
+               <priority>after</priority>
+               <plugin>profile</plugin>
+       </requires>
+
        <conflicts>
                <type>plugin</type>
                <name>profile_api</name>