]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2898: Using an XML namespace instead of version attribute on plugin manifests.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 12 Feb 2011 19:57:39 +0000 (19:57 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 12 Feb 2011 19:57:39 +0000 (19:57 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8170 36083f99-b078-4883-b0ff-0f9b5a30f544

32 files changed:
engine/classes/ElggPluginManifest.php
mod/blog/manifest.xml
mod/bookmarks/manifest.xml
mod/categories/manifest.xml
mod/defaultwidgets/manifest.xml
mod/developers/manifest.xml
mod/diagnostics/manifest.xml
mod/embed/manifest.xml
mod/file/manifest.xml
mod/garbagecollector/manifest.xml
mod/groups/manifest.xml
mod/htmlawed/manifest.xml
mod/invitefriends/manifest.xml
mod/logbrowser/manifest.xml
mod/logrotate/manifest.xml
mod/messageboard/manifest.xml
mod/messages/manifest.xml
mod/minify/manifest.xml
mod/notifications/manifest.xml
mod/oauth_lib/manifest.xml
mod/pages/manifest.xml
mod/profile/manifest.xml
mod/reportedcontent/manifest.xml
mod/search/manifest.xml
mod/sitepages/manifest.xml
mod/tagcloud/manifest.xml
mod/thewire/manifest.xml
mod/tinymce/manifest.xml
mod/twitter/manifest.xml
mod/twitterservice/manifest.xml
mod/uservalidationbyemail/manifest.xml
mod/zaudio/manifest.xml

index fcd0094c487d47b335be63eb3da9445d32eaa2dd..e230cd3f2605597ce899880ff3dceb185cdaeee4 100644 (file)
@@ -8,8 +8,8 @@
  * as $this->parser.
  *
  * To add new parser versions, name them ElggPluginManifestParserXX
- * where XX is the version specified in the top-level <plugin-manifest>
- * tag.
+ * where XX is the version specified in the top-level <plugin_manifest>
+ * tag's XML namespace.
  *
  * @package    Elgg.Core
  * @subpackage Plugins
@@ -22,6 +22,12 @@ class ElggPluginManifest {
         */
        protected $parser;
 
+       /**
+        * The root for plugin manifest namespaces.
+        * This is in the format http://www.elgg.org/plugin_manifest/<version>
+        */
+       protected $namespace_root = 'http://www.elgg.org/plugin_manifest/';
+
        /**
         * The expected structure of a plugins requires element
         */
@@ -144,12 +150,15 @@ class ElggPluginManifest {
                }
 
                // set manifest api version
-               if (isset($manifest_obj->attributes['version'])) {
-                       $this->apiVersion = (float)$manifest_obj->attributes['version'];
+               if (isset($manifest_obj->attributes['xmlns'])) {
+                       $namespace = $manifest_obj->attributes['xmlns'];
+                       $version = str_replace($this->namespace_root, '', $namespace);
                } else {
-                       $this->apiVersion = 1.7;
+                       $version = 1.7;
                }
 
+               $this->apiVersion = $version;
+
                $parser_class_name = 'ElggPluginManifestParser' . str_replace('.', '', $this->apiVersion);
 
                // @todo currently the autoloader freaks out if a class doesn't exist.
index 2712b1ed9ec9d0f81ede0a6bebc65868a32839ec..4d84e25b2439300ee100d349e7556f3c6e563924 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Blog</name>
        <author>Curverider</author>
        <version>1.8</version>
index 76bb5e54b7419c904a2ee53c47fa9135f0800cff..82deaf5b43f89e8bd9f33281c70221fc5277a107 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Bookmarks</name>
        <author>Curverider</author>
        <version>1.7</version>
index 86ac985e70107fce1dd926aa6c1589f27468fd79..cc4e339ce511236dd005b5fc20c9a73b6b4863a3 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Site-wide Categories</name>
        <author>Curverider</author>
        <version>1.7</version>
index f5860882e273b42155ac5468b9a3393ddf9756d3..bb3e4332c017c7f0c577efe31ad552771aa23c4f 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Default Widgets</name>
        <author>Milan Magudia &amp; Curverider</author>
        <version>2.04</version>
index ed5aadd62f016c38c954779ee5d0ecc24e545a48..407c65bf1ae23402351bab3025883bc21ee18cb6 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Elgg Developer Tools</name>
        <author>Cash Costello</author>
        <version>1.0</version>
index 2a006adcf04db98a114c8c631191d41346600507..194306f7b1a6825c79491d86e8d43a8cfb8dd067 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Diagnostics</name>
        <author>Curverider Ltd</author>
        <version>1.5</version>
index 866516e252b3062022a4650e45ee3c69687a09d2..aeb85430a6f0de05e18ed3472ec707b1ad57a2a1 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Embed</name>
        <author>Curverider</author>
        <version>1.8</version>
index 3a10dbf6803cf7094912a1f014e8b46a4165274a..545e40905ad97ca36a1c5e3412c350789e4e9c54 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>File</name>
        <author>Curverider</author>
        <version>1.8</version>
index 6d6e370b4180e1117faf683a6c0c244186178e09..a9135321d2d4573d8ece0c377efc544c723c388f 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Garbage Collector</name>
        <author>Curverider ltd</author>
        <version>1.5</version>
index f5f43acf7468c48e7bb8ba2b7078fa766a8cd241..ce079b18fa534f2d78b73250f401e6f24be9a4c8 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Groups</name>
        <author>Curverider ltd</author>
        <version>1.8</version>
index 50f18f938d28e5db98829fbd614ff0846328a2bc..2168619fb0901adecac158d752606fc79448eeb7 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>HTMLawed</name>
        <author>Curverider Ltd</author>
        <version>1.5</version>
index 647caaf05c46c7c7be2130145c4525b3054eacac..adb8832e6f63761d601f09054b17bc17775b61ba 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Invite Friends</name>
        <author>Curverider</author>
        <version>1.7</version>
index d96f01579aa94941b93c3171c337e98bfa73b73f..7898092b57557a5c0b05b0f8c12d9848c2f1ff65 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Log Browser</name>
        <author>Curverider Ltd</author>
        <version>1.5</version>
index 0b974f77aa9c56744c74b3a8d420a9fcf92d4b1e..a54095149f6bf4dbc123d416218d860e4d3c92e5 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Log Rotate</name>
        <author>Curverider Ltd</author>
        <version>1.5</version>
index d3a5d649898451405170bb314cb5bfca13e76782..c29acbd4f1c21dcab6a454788eea143122897ba8 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Message Board</name>
        <author>Curverider</author>
        <version>1.7</version>
index 1e0eb4670810088583838a393658225e293cf4ad..35377cc5f3e540aec8ec81870ddb8c6961194c99 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Messages</name>
        <author>Curverider?</author>
        <version>1.8</version>
index 0ae6dde24aa4c5b47c09aefc4131c2b08dc449b1..bdf815b8b9cebfff86264a99fb2c5d3a94c11f06 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Minify</name>
        <author>Evan Winslow</author>
        <version>0.2</version>
@@ -10,4 +10,4 @@
                <type>elgg_release</type>
                <version>1.7</version>
        </requires>
-</plugin_manifest>
\ No newline at end of file
+</plugin_manifest>
index 6e1d8251705d65d86ebefeae1b21310d715f72f3..a7d197937ea3c7091a8ba57e89a94e468866a169 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Notifications</name>
        <author>Curverider</author>
        <version>1.7</version>
index 76b2bfeccff3a393c0e337bb100f9767bd3dce82..c91f5c1684bc37bdffed3850b3e8f600823bea97 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>OAuth Libraries</name>
        <author>Curverider</author>
        <version>1.8</version>
index 63c12d865b9dce9ccf7c849cea1216cb87352272..fdd9af2d696732ecb2013c0a92fe2e87fb287598 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Pages</name>
        <author>Curverider</author>
        <version>1.8</version>
index c9bbe703b0a58284e15d64408c98381a37cdc01c..ac0b5a44451ba76cb7e22a20d4bddd5b79b915a8 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Profile</name>
        <description>The default profile plugin.</description>
        <author>Elgg.org</author>
index 6eb994aa51156c8a8b85d033f1082c5871c1e7af..2f37c5bfe9969ab1b82326152532d51653e86c77 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Reported Content</name>
        <author>Curverider</author>
        <version>1.7</version>
index df1fe20101580e3dc396fb537eecee41d060b792..a9b50af1761e8e2091f1b7d4f5bf56b5a7af398c 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Search</name>
        <author>Curverider Ltd, The MITRE Corporation</author>
        <version>1.8</version>
index ae4c5d8dc429797451e2e065f1418244065ac4b4..86b6e92f719db5c0afb17db9e769ebaa0bdc1849 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Site Pages</name>
        <author>Curverider</author>
        <version>1.8</version>
index 3103a547768d0ee23e08ed0a68256bb2b86628ed..a49e8ff62eaac43c0a8f903c96ac1dde81d49f41 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Tag Cloud</name>
        <author>Cash Costello</author>
        <version>1.0</version>
index d62884ea0dd8c025360a11158284c164ca103547..563b28152e34b828acc81033b310f8daa8bcc7bc 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>The Wire</name>
        <author>Curverider</author>
        <version>1.8</version>
index b7fc2ae1ac8cd5400cffaec5460b0f46be1e4c57..0eeab71ebde2ac65b35dd1c36bf18392f2418103 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>TinyMCE</name>
        <author>Curverider</author>
        <version>1.8</version>
index 7c2102106364a97cfa8fd46caeda157dea081128..f6c4f3984e42196ea4fc8083a0288386b9fc0c00 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Twitter</name>
        <author>Curverider</author>
        <version>1.7</version>
index 737512ecf6c5521d5dc7f6a50befc216f1d454f4..993cef1d843cf61691210b270199a085da455f4f 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Twitter Services</name>
        <author>Curverider</author>
        <version>1.8</version>
index 164cab5476546124f0cf19a52c8fc3e44c01062e..d7fbdbe7e64bbbbd68ac5d4f0fad007d2dc61b79 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>User Validation by Email</name>
        <author>Curverider Ltd</author>
        <version>1.7</version>
index 78fc690575961fc3eacea4eb01402eca53e7ed69..80a703bf2ab27b652699cbfa1793394d2840945c 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest version="1.8">
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
        <name>Zaudio</name>
        <author>Curverider</author>
        <version>1.8</version>