in locations like forums etc.
Backups done too, Eloy. :-)
fwrite ($bf,full_tag("DESCRIPTION",4,false,$group->description));
fwrite ($bf,full_tag("LANG",4,false,$group->lang));
fwrite ($bf,full_tag("PICTURE",4,false,$group->picture));
+ fwrite ($bf,full_tag("HIDEPICTURE",4,false,$group->hidepicture));
fwrite ($bf,full_tag("TIMECREATED",4,false,$group->timecreated));
fwrite ($bf,full_tag("TIMEMODIFIED",4,false,$group->timemodified));
$gro->description = backup_todb($info['GROUP']['#']['DESCRIPTION']['0']['#']);
$gro->lang = backup_todb($info['GROUP']['#']['LANG']['0']['#']);
$gro->picture = backup_todb($info['GROUP']['#']['PICTURE']['0']['#']);
+ $gro->hidepicture = backup_todb($info['GROUP']['#']['HIDEPICTURE']['0']['#']);
$gro->timecreated = backup_todb($info['GROUP']['#']['TIMECREATED']['0']['#']);
$gro->timemodified = backup_todb($info['GROUP']['#']['TIMEMODIFIED']['0']['#']);
) TYPE=MyISAM COMMENT='For keeping information about cached data';");
}
+ if ($oldversion < 2004021500) {
+ table_column("groups", "", "hidepicture", "integer", "2", "unsigned", "0", "", "picture");
+ }
return $result;
`description` text NOT NULL,
`lang` varchar(10) NOT NULL default 'en',
`picture` int(10) unsigned NOT NULL default '0',
+ `hidepicture` int(2) unsigned NOT NULL default '0',
`timecreated` int(10) unsigned NOT NULL default '0',
`timemodified` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
modify_database("", "CREATE INDEX prefix_cache_text_md5key_idx ON prefix_cache_text (md5key);");
}
+ if ($oldversion < 2004021500) {
+ table_column("groups", "", "hidepicture", "integer", "2", "unsigned", "0", "", "picture");
+ }
+
return $result;
}
description text,
lang varchar(10) NOT NULL default '',
picture integer NOT NULL default '0',
+ hidepicture integer NOT NULL default '0',
timecreated integer NOT NULL default '0',
timemodified integer NOT NULL default '0'
);
function print_group_picture($group, $courseid, $large=false, $returnstring=false, $link=true) {
global $CFG;
- $output = '';
+ if ($group->hidepicture) {
+ return '';
+ }
- if ($group->showpicture) {
- if ($link) {
- $output = "<a href=\"$CFG->wwwroot/course/groupphp?id=$courseid&group=$group->id\">";
- }
- if ($large) {
- $file = "f1";
- $size = 100;
+ if ($link) {
+ $output = "<a href=\"$CFG->wwwroot/course/groupphp?id=$courseid&group=$group->id\">";
+ } else {
+ $output = '';
+ }
+ if ($large) {
+ $file = "f1";
+ $size = 100;
+ } else {
+ $file = "f2";
+ $size = 35;
+ }
+ if ($group->picture) { // Print custom group picture
+ if ($CFG->slasharguments) { // Use this method if possible for better caching
+ $output .= "<img align=\"absmiddle\" src=\"$CFG->wwwroot/user/pixgroup.php/$group->id/$file.jpg\"".
+ " border=\"0\" width=\"$size\" height=\"$size\" alt=\"\" />";
} else {
- $file = "f2";
- $size = 35;
- }
- if ($group->picture) { // Print custom group picture
- if ($CFG->slasharguments) { // Use this method if possible for better caching
- $output .= "<img align=\"absmiddle\" src=\"$CFG->wwwroot/user/pixgroup.php/$group->id/$file.jpg\"".
- " border=\"0\" width=\"$size\" height=\"$size\" alt=\"\" />";
- } else {
- $output .= "<img align=\"absmiddle\" src=\"$CFG->wwwroot/user/pixgroup.php?file=/$group->id/$file.jpg\"".
- " border=\"0\" width=\"$size\" height=\"$size\" alt=\"\" />";
- }
- }
- if ($link) {
- $output .= "</a>";
+ $output .= "<img align=\"absmiddle\" src=\"$CFG->wwwroot/user/pixgroup.php?file=/$group->id/$file.jpg\"".
+ " border=\"0\" width=\"$size\" height=\"$size\" alt=\"\" />";
}
}
+ if ($link) {
+ $output .= "</a>";
+ }
if ($returnstring) {
return $output;
// database to determine whether upgrades should
// be performed (see lib/db/*.php)
-$version = 2004021400; // The current version is a date (YYYYMMDDXX)
+$version = 2004021500; // The current version is a date (YYYYMMDDXX)
$release = "1.2 development"; // User-friendly version number