Permalink
Browse files

MDL-30740 skydrive: convert muc to defined cache

  • Loading branch information...
danpoltawski committed Jul 15, 2013
1 parent 562525d commit c893448b17538fede72280f1139f6e2eb22ff692
@@ -0,0 +1,31 @@
<?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/>.
/**
* Cache definitions.
*
* @package repository_skydrive
* @copyright 2013 Dan Poltawski <dan@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$definitions = array(
'foldername' => array(
'mode' => cache_store::MODE_SESSION,
)
);
@@ -22,6 +22,7 @@
* @author Dan Poltawski <dan.poltawski@luns.net.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['cachedef_foldername'] = 'Folder name cache';
$string['clientid'] = 'Client ID';
$string['configplugin'] = 'Configure Microsoft Skydrive';
$string['oauthinfo'] = '<p>To use this plugin, you must register your site <a href="https://manage.dev.live.com/Applications/Index">with Microsoft</a>.<p>As part of the registration process, you will need to enter the following URL as \'Redirect domain\':</p><p>{$a->callbackurl}</p>Once registered, you will be provided with a client ID and secret which can be entered here.</p>';
@@ -57,7 +57,7 @@ class microsoft_skydrive extends oauth2_client {
public function __construct($clientid, $clientsecret, $returnurl) {
parent::__construct($clientid, $clientsecret, $returnurl, self::SCOPE);
// Make a session cache
$this->foldernamecache = cache::make_from_params(cache_store::MODE_SESSION, 'repository_skydrive', 'foldernamelist');
$this->foldernamecache = cache::make('repository_skydrive', 'foldername');
}
/**
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2013070300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2013071500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2012120300; // Requires this Moodle version.
$plugin->component = 'repository_skydrive'; // Full name of the plugin (used for diagnostics).

0 comments on commit c893448

Please sign in to comment.