Commit eaf67a35 authored by Francois Marier's avatar Francois Marier
Browse files

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



The "External feeds" tab looked a bit empty with just the External
Feeds block. We now have enough blocks to make it worthwhile to
have a tab for them: externalvideo, externalfeed and googleapps.

Change-Id: I193240f6a16c0081625d2180599047ea5fcee00a
Signed-off-by: default avatarFrancois Marier <francois@catalyst.net.nz>
parent 42ad7937
......@@ -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