MDL-42148 new overview of 3rd party libraries
authorPetr Škoda <commits@skodak.org>
Tue, 15 Oct 2013 20:28:34 +0000 (22:28 +0200)
committerDan Poltawski <dan@moodle.com>
Wed, 16 Oct 2013 06:48:29 +0000 (14:48 +0800)
Includes:
* each plugin has own thirdpartylibs.xml file
* added missing libraries
* fixed existing library infos
* new Site administration / Development / Third party libraries page

17 files changed:
admin/settings/development.php
admin/thirdpartylibs.php [new file with mode: 0644]
auth/cas/thirdpartylibs.xml [new file with mode: 0644]
auth/fc/thirdpartylibs.xml [new file with mode: 0644]
filter/tex/thirdpartylibs.xml [new file with mode: 0644]
lang/en/admin.php
lib/editor/tinymce/plugins/pdw/readme_moodle.txt
lib/editor/tinymce/plugins/pdw/thirdpartylibs.xml [new file with mode: 0644]
lib/editor/tinymce/plugins/spellchecker/thirdpartylibs.xml [new file with mode: 0644]
lib/editor/tinymce/readme_moodle.txt
lib/editor/tinymce/thirdpartylibs.xml [new file with mode: 0644]
lib/thirdpartylibs.xml
lib/upgrade.txt
mod/assign/feedback/editpdf/thirdpartylibs.xml [new file with mode: 0644]
repository/s3/thirdpartylibs.xml [new file with mode: 0644]
theme/bootstrapbase/readme_moodle.txt
theme/bootstrapbase/thirdpartylibs.xml [new file with mode: 0644]

index 6be22df..b99d519 100644 (file)
@@ -93,4 +93,6 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
     }
 
     $ADMIN->add('development', new admin_externalpage('purgecaches', new lang_string('purgecaches','admin'), "$CFG->wwwroot/$CFG->admin/purgecaches.php"));
+
+    $ADMIN->add('development', new admin_externalpage('thirdpartylibs', new lang_string('thirdpartylibs','admin'), "$CFG->wwwroot/$CFG->admin/thirdpartylibs.php"));
 } // end of speedup
diff --git a/admin/thirdpartylibs.php b/admin/thirdpartylibs.php
new file mode 100644 (file)
index 0000000..0259d17
--- /dev/null
@@ -0,0 +1,76 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * List of 3rd party libs used in moodle and all plugins.
+ *
+ * @package   admin
+ * @copyright 2013 Petr Skoda {@link http://skodak.org}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+require_once('../config.php');
+require_once($CFG->libdir.'/adminlib.php');
+require_once($CFG->libdir.'/tablelib.php');
+
+admin_externalpage_setup('thirdpartylibs');
+
+echo $OUTPUT->header();
+echo $OUTPUT->heading(get_string('thirdpartylibs', 'core_admin'));
+
+$files = array('core' => "$CFG->libdir/thirdpartylibs.xml");
+
+$plugintypes = core_component::get_plugin_types();
+foreach ($plugintypes as $type => $ignored) {
+    $plugins = core_component::get_plugin_list_with_file($type, 'thirdpartylibs.xml', false);
+    foreach ($plugins as $plugin => $path) {
+        $files[$type.'_'.$plugin] = $path;
+    }
+}
+
+$table = new html_table();
+$table->head = array(
+    get_string('thirdpartylibrary', 'core_admin'), get_string('version'),
+    get_string('thirdpartylibrarylocation', 'core_admin'), get_string('license'));
+$table->align = array('left', 'left', 'left', 'left');
+$table->id = 'thirdpartylibs';
+$table->attributes['class'] = 'admintable generaltable';
+$table->data  = array();
+
+foreach ($files as $component => $xmlpath) {
+    $xml = simplexml_load_file($xmlpath);
+    foreach ($xml as $lib) {
+        $base = realpath(dirname($xmlpath));
+        $location = substr($base, strlen($CFG->dirroot)).'/'.$lib->location;
+        if (is_dir($CFG->dirroot.$location)) {
+            $location .= '/';
+        }
+        $version = '';
+        if (!empty($lib->version)) {
+            $version = $lib->version;
+        }
+        $license = $lib->license;
+        if (!empty($lib->licenseversion)) {
+            $license .= ' '.$lib->licenseversion;
+        }
+
+        $table->data[] = new html_table_row(array($lib->name, $version, $location, $license));
+    }
+}
+
+echo html_writer::table($table);
+
+echo $OUTPUT->footer();
diff --git a/auth/cas/thirdpartylibs.xml b/auth/cas/thirdpartylibs.xml
new file mode 100644 (file)
index 0000000..0465b0d
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<libraries>
+  <library>
+    <location>CAS</location>
+    <name>CAS</name>
+    <license>BSD</license>
+    <version>1.1.3</version>
+    <licenseversion></licenseversion>
+  </library>
+</libraries>
diff --git a/auth/fc/thirdpartylibs.xml b/auth/fc/thirdpartylibs.xml
new file mode 100644 (file)
index 0000000..191a281
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<libraries>
+  <library>
+    <location>fcFPP.php</location>
+    <name>fcFPP</name>
+    <license>GPL</license>
+    <version></version>
+    <licenseversion>2.0+</licenseversion>
+  </library>
+</libraries>
diff --git a/filter/tex/thirdpartylibs.xml b/filter/tex/thirdpartylibs.xml
new file mode 100644 (file)
index 0000000..6381565
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<libraries>
+  <library>
+    <location>mimetex.*</location>
+    <name>mimeTeX</name>
+    <license>GPL</license>
+    <version>1.74</version>
+    <licenseversion>3.0+</licenseversion>
+  </library>
+</libraries>
index e7d0504..1d06ba4 100644 (file)
@@ -1026,6 +1026,9 @@ $string['themeselect'] = 'Change theme';
 $string['themeselector'] = 'Theme selector';
 $string['themesettings'] = 'Theme settings';
 $string['therewereerrors'] = 'There were errors in your data';
+$string['thirdpartylibrary'] = 'Library';
+$string['thirdpartylibrarylocation'] = 'Location';
+$string['thirdpartylibs'] = 'Third party libraries';
 $string['timezone'] = 'Default timezone';
 $string['timezoneforced'] = 'This is forced by the site administrator';
 $string['timezoneisforcedto'] = 'Force all users to use';
index 10550cf..cf2fcb0 100644 (file)
@@ -10,7 +10,7 @@ Moodle maintainer: Jason Fowler (phalacee)
 Upgrade procedure:
 1/ extract standard PDW package into lib/editor/tinymce/plugins/pdw/tinymce/
 2/ bump up version.php
-3/ update lib/thirdpartylibs.xml
+3/ update ./thirdpartylibs.xml
 4/ reimplement patch in MDL-23646
 5/ reimplement patch in MDL-40668
 6/ add in "DOM.setStyle(ifr, 'width',DOM.getSize(ifrcon).w); // Resize iframe" (without quotes)
diff --git a/lib/editor/tinymce/plugins/pdw/thirdpartylibs.xml b/lib/editor/tinymce/plugins/pdw/thirdpartylibs.xml
new file mode 100644 (file)
index 0000000..d40afcd
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<libraries>
+  <library>
+    <location>tinymce</location>
+    <name>PDW Toolbar Toggle</name>
+    <license>MIT</license>
+    <version>1.2</version>
+    <licenseversion></licenseversion>
+  </library>
+</libraries>
diff --git a/lib/editor/tinymce/plugins/spellchecker/thirdpartylibs.xml b/lib/editor/tinymce/plugins/spellchecker/thirdpartylibs.xml
new file mode 100644 (file)
index 0000000..a7a1725
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<libraries>
+  <library>
+    <location>rpc.php</location>
+    <name>TinyMCE spellchecker</name>
+    <license>LGPL</license>
+    <version>2.0.6.1</version>
+    <licenseversion>2.1+</licenseversion>
+  </library>
+</libraries>
index 3f792c0..da3828d 100644 (file)
@@ -12,7 +12,7 @@ Upgrade procedure:
 1/ extract standard TinyMCE package into lib/editor/tinymce/tiny_mce/x.y.z/
 2/ bump up editor version in lib.php to match the directory name x.y.z
 3/ bump up main version.php
-4/ update lib/thirdpartylibs.xml
+4/ update ./thirdpartylibs.xml
 5/ execute cli/update_lang_files.php and review changes in lang/en/editor_tinymce.php
 6/ use search/replace to fix oversized zIndexes
 
diff --git a/lib/editor/tinymce/thirdpartylibs.xml b/lib/editor/tinymce/thirdpartylibs.xml
new file mode 100644 (file)
index 0000000..f90cf43
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<libraries>
+  <library>
+    <location>tiny_mce</location>
+    <name>TinyMCE</name>
+    <license>LGPL</license>
+    <version>3.5.8</version>
+    <licenseversion>2.1+</licenseversion>
+  </library>
+</libraries>
index c7a8764..6163d94 100644 (file)
@@ -3,7 +3,7 @@
   <library>
     <location>adodb</location>
     <name>AdoDB</name>
-    <license>GPL/BSD</license>
+    <license>BSD/GPL</license>
     <version>5.18</version>
     <licenseversion>2.1+</licenseversion>
   </library>
     <name>DragMath</name>
     <license>GPL</license>
     <version>0.7.8.2</version>
-    <licenseversion></licenseversion>
-  </library>
-  <library>
-    <location>editor/tinymce/tiny_mce</location>
-    <name>TinyMCE</name>
-    <license>LGPL</license>
-    <version>3.5.8</version>
-    <licenseversion>2.1+</licenseversion>
+    <licenseversion>3.0+</licenseversion>
   </library>
   <library>
     <location>evalmath</location>
     <licenseversion>2.1+</licenseversion>
   </library>
   <library>
-      <location>gallery</location>
-      <name>Gallery Lightbox</name>
-      <license>BSD</license>
-      <version>2010.04.21-21-51</version>
-      <licenseversion></licenseversion>
-  </library>
-  <library>
-    <location>PEAR_GeoIP</location>
+    <location>pear/Net</location>
     <name>GeoIP</name>
     <license>LGPL</license>
     <version>1.0.0</version>
     <name>Flowplayer</name>
     <license>GPL</license>
     <version>3.2.16</version>
-    <licenseversion>3</licenseversion>
+    <licenseversion>3.0+</licenseversion>
+  </library>
+  <library>
+    <location>password_compat</location>
+    <name>Compatible password hashing</name>
+    <license>MIT</license>
+    <version></version>
+    <licenseversion></licenseversion>
   </library>
   <library>
     <location>pear/Auth/RADIUS.php</location>
     <name>Pear_Auth_Radius</name>
-    <license>?</license>
+    <license>BSD</license>
     <version>1.1</version>
     <licenseversion></licenseversion>
   </library>
     <licenseversion></licenseversion>
   </library>
   <library>
-    <location>pear/OLE</location>
+    <location>pear/OLE.php</location>
     <name>Pear_OLE</name>
     <license>PHP</license>
     <version>1.0.0</version>
     <version>1.4.5</version>
     <licenseversion>3.0</licenseversion>
   </library>
-  <library>
-    <location>pear/Spreadsheet/Excel</location>
-    <name>Pear_Spreadsheet_Excel</name>
-    <license>LGPL</license>
-    <version>0.9.1</version>
-    <licenseversion>2.1+</licenseversion>
-  </library>
   <library>
     <location>pear/XML/Parser</location>
     <name>Pear_XML_Parser</name>
   <library>
     <location>zend</location>
     <name>Zend Framework</name>
-    <license>new BSD</license>
+    <license>BSD</license>
     <version>1.10.6</version>
     <licenseversion></licenseversion>
   </library>
   <library>
     <location>recaptchalib.php</location>
     <name>ReCAPTCHA</name>
-    <license>Open Source</license>
+    <license>MIT</license>
     <version>1.10</version>
     <licenseversion></licenseversion>
   </library>
     <version>1.0</version>
     <licenseversion>3.0+</licenseversion>
   </library>
-  <library>
-    <location>theme/bootstrapbase/less/bootstrap</location>
-    <name>Twitter Bootstrap</name>
-    <license>Apache</license>
-    <version>2.3.0</version>
-    <licenseversion>2.0</licenseversion>
-  </library>
-  <library>
-    <location>theme/bootstrapbase/javascript/html5shiv.js</location>
-    <name>Html5Shiv</name>
-    <license>Apache</license>
-    <version>3.6.2</version>
-    <licenseversion>2.0</licenseversion>
-  </library>
-  <library>
-    <location>theme/bootstrapbase/yui/src/bootstrap/js/bootstrapcollapse.js</location>
-    <name>Gallery Bootstrap Collapse</name>
-    <license>BSD</license>
-    <version>2012.08.22-20-00</version>
-    <licenseversion></licenseversion>
-  </library>
-  <library>
-    <location>theme/bootstrapbase/yui/src/bootstrap/js/bootstrapdropdown.js</location>
-    <name>Gallery Bootstrap Dropdown</name>
-    <license>BSD</license>
-    <version>2012.08.22-20-00</version>
-    <licenseversion></licenseversion>
-  </library>
-  <library>
-    <location>theme/bootstrapbase/yui/src/bootstrap/js/bootstrapengine.js</location>
-    <name>Gallery Bootstrap Engine</name>
-    <license>BSD</license>
-    <version>2012.08.22-20-00</version>
-    <licenseversion></licenseversion>
-  </library>
-  <library>
-    <location>lib/editor/tinymce/plugins/pdw/tinymce</location>
-    <name>PDW Toolbar Toggle</name>
-    <license>MIT</license>
-    <version>1.2</version>
-    <licenseversion></licenseversion>
-  </library>
-  <library>
-    <location>mod/assign/feedback/editpdf/fpdi</location>
-    <name>FPDI</name>
-    <license>Apache</license>
-    <version>1.4.4</version>
-    <licenseversion>2.0</licenseversion>
-  </library>
 </libraries>
index b46b5f3..794f14b 100644 (file)
@@ -48,6 +48,7 @@ information provided here is intended especially for developers.
 * New optional parameter to stored_file::get_content_file_handle to open file handle with 'gzopen' instead
   of 'fopen' to read gzip-compressed files if required.
 * update_internal_user_password() and setnew_password_and_mail() now trigger user_updated event.
+* Add thirdpartylibs.xml file to plugins that bundle any 3rd party libraries.
 
 DEPRECATIONS:
 Various previously deprecated functions have now been altered to throw DEBUG_DEVELOPER debugging notices
diff --git a/mod/assign/feedback/editpdf/thirdpartylibs.xml b/mod/assign/feedback/editpdf/thirdpartylibs.xml
new file mode 100644 (file)
index 0000000..fafb71c
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<libraries>
+  <library>
+    <location>fpdi</location>
+    <name>FPDI</name>
+    <license>Apache</license>
+    <version>1.4.4</version>
+    <licenseversion>2.0</licenseversion>
+  </library>
+</libraries>
diff --git a/repository/s3/thirdpartylibs.xml b/repository/s3/thirdpartylibs.xml
new file mode 100644 (file)
index 0000000..c063276
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<libraries>
+  <library>
+    <location>S3.php</location>
+    <name>S3</name>
+    <license>BSD</license>
+    <version>0.5.0-dev</version>
+    <licenseversion></licenseversion>
+  </library>
+</libraries>
index a9168a1..049e694 100644 (file)
@@ -12,7 +12,7 @@ To update to the latest release of twitter bootstrap:
 * download the new less files and store them in less/bootstrap
 * regenerate files using recess: recess --compile --compress moodle.less > ../style/moodle.css **
 * regenerate files using recess: recess --compile --compress editor.less > ../style/editor.css **
-* update lib/thirdpartylibs.xml
+* update ./thirdpartylibs.xml
 
 ** If you want to make changes to the .css generated from these .less files then you
 need to install recess (https://github.com/twitter/recess) to compile the .less files,
@@ -28,7 +28,7 @@ https://github.com/aFarkas/html5shiv/blob/master/src/html5shiv.js
 
 To update to the latest release of html5shiv:
 * download and replace: javascript/html5shiv.js
-* update lib/thirdpartylibs.xml
+* update ./thirdpartylibs.xml
 
 bootstrapcollapse.js, bootstrapdropdown.js, bootstrapengine.js
 --------------------------------------------------------------
diff --git a/theme/bootstrapbase/thirdpartylibs.xml b/theme/bootstrapbase/thirdpartylibs.xml
new file mode 100644 (file)
index 0000000..8be3ae0
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<libraries>
+  <library>
+    <location>less/bootstrap</location>
+    <name>Twitter Bootstrap</name>
+    <license>Apache</license>
+    <version>2.3.0</version>
+    <licenseversion>2.0</licenseversion>
+  </library>
+  <library>
+    <location>javascript/html5shiv.js</location>
+    <name>Html5Shiv</name>
+    <license>Apache</license>
+    <version>3.6.2</version>
+    <licenseversion>2.0</licenseversion>
+  </library>
+  <library>
+    <location>yui/src/bootstrap/js/bootstrapcollapse.js</location>
+    <name>Gallery Bootstrap Collapse</name>
+    <license>BSD</license>
+    <version>2012.08.22-20-00</version>
+    <licenseversion></licenseversion>
+  </library>
+  <library>
+    <location>yui/src/bootstrap/js/bootstrapdropdown.js</location>
+    <name>Gallery Bootstrap Dropdown</name>
+    <license>BSD</license>
+    <version>2012.08.22-20-00</version>
+    <licenseversion></licenseversion>
+  </library>
+  <library>
+    <location>yui/src/bootstrap/js/bootstrapengine.js</location>
+    <name>Gallery Bootstrap Engine</name>
+    <license>BSD</license>
+    <version>2012.08.22-20-00</version>
+    <licenseversion></licenseversion>
+  </library>
+</libraries>