]> git.mjollnir.org Git - moodle.git/commitdiff
portfolio - MDL-19356 - rename allows_multiple to allows_multiple_instances
authorPenelope Leach <penny@catalyst.net.nz>
Mon, 16 Nov 2009 12:57:59 +0000 (12:57 +0000)
committerPenelope Leach <penny@catalyst.net.nz>
Mon, 16 Nov 2009 12:57:59 +0000 (12:57 +0000)
this disambiguates, so we can have a function called allows_multiple_exports

lang/en_utf8/portfolio.php
lib/adminlib.php
lib/portfolio/plugin.php
portfolio/type/boxnet/lib.php
portfolio/type/download/lib.php
portfolio/type/flickr/lib.php

index 58f63de096e2eee38b4e20fea2850b2361375431..bff3bdc8b513582979ee0a6c061b58981ad841fc 100644 (file)
@@ -95,7 +95,7 @@ $string['moderatefilesizethreshold'] = 'Moderate transfer filesize';
 $string['moderatefilesizethresholddesc'] = 'Filesizes over this threshold will be considered to take a moderate amount of time to transfer';
 $string['moderatedbsizethreshold'] = 'Moderate transfer dbsize';
 $string['moderatedbsizethresholddesc'] = 'Number of db records over which will be considered to take a moderate amount of time to transfer';
-$string['multipledisallowed'] = 'Trying to create another instance of a plugin that has disallowed multiple instances ($a)';
+$string['multipleinstancesdisallowed'] = 'Trying to create another instance of a plugin that has disallowed multiple instances ($a)';
 $string['mustsetcallbackoptions'] = 'You must set the callback options either in the portfolio_add_button constructor or using the set_callback_options method';
 $string['noavailableplugins'] = 'Sorry, but there are no available portfolios for you to export to';
 $string['nocallbackfile'] = 'Something in the module you\'re trying to export from is broken - couldn\'t find a required file ($a)';
index 5e0562987f3dfa38ae8518b30edfa6c080450e2f..e9bb4a4167d7ae1beadd653ed43033b9b92674b7 100644 (file)
@@ -5142,7 +5142,7 @@ class admin_setting_manageportfolio extends admin_setting {
         $instancehtml = '<br /><br />' . get_string('addnewportfolio', 'portfolio') . ': <br /><br />';
         $addable = 0;
         foreach ($plugins as $p) {
-            if (!portfolio_static_function($p, 'allows_multiple') && in_array($p, $alreadyplugins)) {
+            if (!portfolio_static_function($p, 'allows_multiple_instances') && in_array($p, $alreadyplugins)) {
                 continue;
             }
             if (array_key_exists($p, $insane)) {
index 44c1cb50856802a042e273015f421b4c7528c70c..10679ea96a37f724448141f548f33ecde111c69f 100644 (file)
@@ -378,7 +378,7 @@ abstract class portfolio_plugin_base {
     *
     * @return boolean
     */
-    public static function allows_multiple() {
+    public static function allows_multiple_instances() {
         return true;
     }
 
@@ -436,10 +436,10 @@ abstract class portfolio_plugin_base {
             'plugin' => $plugin,
             'name'   => $name,
         );
-        if (!portfolio_static_function($plugin, 'allows_multiple')) {
+        if (!portfolio_static_function($plugin, 'allows_multiple_instances')) {
             // check we don't have one already
             if ($DB->record_exists('portfolio_instance', array('plugin' => $plugin))) {
-                throw new portfolio_exception('multipledisallowed', 'portfolio', '', $plugin);
+                throw new portfolio_exception('multipleinstancesdisallowed', 'portfolio', '', $plugin);
             }
         }
         $newid = $DB->insert_record('portfolio_instance', $new);
index 0763c9f525d4a75590154aa219c90520875d9737..f03278c4190da44c2d1bf2585e2cd79b545ec4d1 100644 (file)
@@ -240,7 +240,7 @@ class portfolio_plugin_boxnet extends portfolio_plugin_push_base {
     //@TODO see if we can verify the api key without actually getting an authentication token
     }
 
-    public static function allows_multiple() {
+    public static function allows_multiple_instances() {
         return false;
     }
 
index 10978f6e3896482860fe3ee3a3fb83239987a948..1f175c952bc5d5958a58c85c9f908f72f24e45b2 100644 (file)
@@ -10,7 +10,7 @@ class portfolio_plugin_download extends portfolio_plugin_pull_base {
         return get_string('pluginname', 'portfolio_download');
     }
 
-    public static function allows_multiple() {
+    public static function allows_multiple_instances() {
         return false;
     }
 
index dff7aaa08beae15ba5bbb56b8b9edabbe6db72df..2ce4df1817f633be9e448908069a307c536fd8c2 100755 (executable)
@@ -51,7 +51,7 @@ class portfolio_plugin_flickr extends portfolio_plugin_push_base {
         }
     }
 
-    public static function allows_multiple() {
+    public static function allows_multiple_instances() {
         return false;
     }