Commit e95875e5 authored by Nigel McNie's avatar Nigel McNie
Browse files

Add in an upgrade that adds the image column to blocktype_externalfeed_data.

This is kinda important if we want icons for rss feeds to work! :)

Conflicts:

	htdocs/blocktype/externalfeed/version.php
parent f6131bcc
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2008 Catalyst IT Ltd (http://www.catalyst.net.nz)
*
* This program 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.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage blocktype-externalfeed
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006-2008 Catalyst IT Ltd http://catalyst.net.nz
*
*/
defined('INTERNAL') || die();
function xmldb_blocktype_externalfeed_upgrade($oldversion=0) {
if ($oldversion < 2008042100) {
// Add the 'image' column so that information about a feed's image can
// be stored
$table = new XMLDBTable('blocktype_externalfeed_data');
$field = new XMLDBField('image');
$field->setAttributes(XMLDB_TYPE_TEXT);
add_field($table, $field);
}
return true;
}
?>
......@@ -68,7 +68,8 @@ class PluginBlocktypeExternalfeed extends SystemBlocktype {
$smarty->assign('title', $data->title);
$smarty->assign('description', $data->description);
$smarty->assign('url', $data->url);
$smarty->assign('full', $configdata['full']);
// 'full' won't be set for feeds created before 'full' support was added
$smarty->assign('full', isset($configdata['full']) ? $configdata['full'] : false);
$smarty->assign('link', $data->link);
$smarty->assign('entries', $data->content);
$smarty->assign('feedimage', self::make_feed_image_tag($data->image));
......
......@@ -27,7 +27,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2007110500;
$config->release = '0.9';
$config->version = 2008042100;
$config->release = '1.0.1';
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment