Commit 9b4dd6ca authored by Richard Mansfield's avatar Richard Mansfield Committed by Gerrit Code Review
Browse files

Merge "view editor: rename "external feed" tab to "external content""

parents 664f39cb eaf67a35
......@@ -40,7 +40,7 @@ class PluginBlocktypeExternalfeed extends SystemBlocktype {
}
public static function get_categories() {
return array('feeds');
return array('external');
}
public static function postinst($prevversion) {
......
......@@ -52,7 +52,7 @@ class PluginBlocktypeExternalvideo extends SystemBlocktype {
}
public static function get_categories() {
return array('fileimagevideo');
return array('external');
}
public static function render_instance(BlockInstance $instance, $editing=false) {
......
......@@ -40,7 +40,7 @@ class PluginBlocktypeGoogleApps extends SystemBlocktype {
}
public static function get_categories() {
return array('fileimagevideo');
return array('external');
}
public static function render_instance(BlockInstance $instance, $editing=false) {
......
......@@ -255,7 +255,7 @@ $string['noviewlayouts'] = 'There are no layouts for a %s column page';
$string['cantaddcolumn'] = 'You cannot add any more columns to this page';
$string['cantremovecolumn'] = 'You cannot remove the last column from this page';
$string['blocktypecategory.feeds'] = 'External feeds';
$string['blocktypecategory.external'] = 'External content';
$string['blocktypecategory.fileimagevideo'] = 'Files, images and video';
$string['blocktypecategory.general'] = 'General';
......
......@@ -2274,5 +2274,18 @@ function xmldb_core_upgrade($oldversion=0) {
delete_records('config','field','wwwroot');
}
if ($oldversion < 2011051700) {
// Create new "external" category
insert_record('blocktype_category', (object) array('name' => 'external'));
// Migrate existing blocktypes to the new category
set_field('blocktype_installed_category', 'category', 'external', 'category', 'feeds');
set_field('blocktype_installed_category', 'category', 'external', 'blocktype', 'externalvideo');
set_field('blocktype_installed_category', 'category', 'external', 'blocktype', 'googleapps');
// Delete old "feeds" category
delete_records('blocktype_category', 'name', 'feeds');
}
return $status;
}
......@@ -955,7 +955,7 @@ function sort_upgrades($k1, $k2) {
/** blocktype categories the system exports (including artefact categories)
*/
function get_blocktype_categories() {
return array('general', 'internal', 'blog', 'resume', 'fileimagevideo', 'feeds');
return array('general', 'internal', 'blog', 'resume', 'fileimagevideo', 'external');
}
function install_blocktype_categories_for_plugin($blocktype) {
......
......@@ -28,7 +28,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2011051300;
$config->version = 2011051700;
$config->release = '1.4.0alpha2dev';
$config->minupgradefrom = 2008040200;
$config->minupgraderelease = '1.0.0 (release tag 1.0.0_RELEASE)';
......
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