mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 19:54:12 +02:00
[feature/avatars] Create setting for enabling avatar in manager
PHPBB3-10018
This commit is contained in:
@@ -75,18 +75,6 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
$this->cache = $cache;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_data($row)
|
||||
{
|
||||
return array(
|
||||
'src' => '',
|
||||
'width' => 0,
|
||||
'height' => 0,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
@@ -95,14 +83,6 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function prepare_form($template, $row, &$error)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
@@ -111,14 +91,6 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function process_form($template, $row, &$error)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
@@ -63,16 +63,6 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function prepare_form_acp()
|
||||
{
|
||||
return array(
|
||||
'allow_avatar_gravatar' => array('lang' => 'ALLOW_GRAVATAR', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
@@ -107,7 +107,6 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
|
||||
public function prepare_form_acp()
|
||||
{
|
||||
return array(
|
||||
'allow_avatar_local' => array('lang' => 'ALLOW_LOCAL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'avatar_gallery_path' => array('lang' => 'AVATAR_GALLERY_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
|
||||
);
|
||||
}
|
||||
|
@@ -47,16 +47,6 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function prepare_form_acp()
|
||||
{
|
||||
return array(
|
||||
'allow_avatar_remote' => array('lang' => 'ALLOW_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
@@ -26,22 +26,11 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
|
||||
*/
|
||||
public function get_data($row, $ignore_config = false)
|
||||
{
|
||||
if ($ignore_config || $this->config['allow_avatar_upload'])
|
||||
{
|
||||
return array(
|
||||
'src' => $this->phpbb_root_path . 'download/file' . $this->php_ext . '?avatar=' . $row['avatar'],
|
||||
'width' => $row['avatar_width'],
|
||||
'height' => $row['avatar_height'],
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return array(
|
||||
'src' => '',
|
||||
'width' => 0,
|
||||
'height' => 0,
|
||||
);
|
||||
}
|
||||
return array(
|
||||
'src' => $this->phpbb_root_path . 'download/file' . $this->php_ext . '?avatar=' . $row['avatar'],
|
||||
'width' => $row['avatar_width'],
|
||||
'height' => $row['avatar_height'],
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,7 +122,6 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
|
||||
global $user;
|
||||
|
||||
return array(
|
||||
'allow_avatar_upload' => array('lang' => 'ALLOW_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'allow_avatar_remote_upload'=> array('lang' => 'ALLOW_REMOTE_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'validate' => 'int:0', 'type' => 'text:4:10', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
|
||||
'avatar_path' => array('lang' => 'AVATAR_STORAGE_PATH', 'validate' => 'rwpath', 'type' => 'text:20:255', 'explain' => true),
|
||||
|
Reference in New Issue
Block a user