aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/avatar/driver/upload.php30
-rw-r--r--phpBB/phpbb/console/command/config/increment.php2
-rw-r--r--phpBB/phpbb/console/command/extension/enable.php4
-rw-r--r--phpBB/phpbb/log/log.php4
-rw-r--r--phpBB/phpbb/profilefields/type/type_googleplus.php8
5 files changed, 41 insertions, 7 deletions
diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php
index c43004f340..edc5941602 100644
--- a/phpBB/phpbb/avatar/driver/upload.php
+++ b/phpBB/phpbb/avatar/driver/upload.php
@@ -19,6 +19,32 @@ namespace phpbb\avatar\driver;
class upload extends \phpbb\avatar\driver\driver
{
/**
+ * @var \phpbb\mimetype\guesser
+ */
+ protected $mimetype_guesser;
+
+ /**
+ * Construct a driver object
+ *
+ * @param \phpbb\config\config $config phpBB configuration
+ * @param \phpbb\request\request $request Request object
+ * @param string $phpbb_root_path Path to the phpBB root
+ * @param string $php_ext PHP file extension
+ * @param \phpbb_path_helper $path_helper phpBB path helper
+ * @param \phpbb\mimetype\guesser $mimetype_guesser Mimetype guesser
+ * @param \phpbb\cache\driver\driver_interface $cache Cache driver
+ */
+ public function __construct(\phpbb\config\config $config, $phpbb_root_path, $php_ext, \phpbb\path_helper $path_helper, \phpbb\mimetype\guesser $mimetype_guesser, \phpbb\cache\driver\driver_interface $cache = null)
+ {
+ $this->config = $config;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $this->path_helper = $path_helper;
+ $this->mimetype_guesser = $mimetype_guesser;
+ $this->cache = $cache;
+ }
+
+ /**
* {@inheritdoc}
*/
public function get_data($row, $ignore_config = false)
@@ -70,7 +96,7 @@ class upload extends \phpbb\avatar\driver\driver
if (!empty($upload_file['name']))
{
- $file = $upload->form_upload('avatar_upload_file');
+ $file = $upload->form_upload('avatar_upload_file', $this->mimetype_guesser);
}
else if (!empty($this->config['allow_avatar_remote_upload']) && !empty($url))
{
@@ -100,7 +126,7 @@ class upload extends \phpbb\avatar\driver\driver
return false;
}
- $file = $upload->remote_upload($url);
+ $file = $upload->remote_upload($url, $this->mimetype_guesser);
}
else
{
diff --git a/phpBB/phpbb/console/command/config/increment.php b/phpBB/phpbb/console/command/config/increment.php
index 0c25075ce8..b4d7438b66 100644
--- a/phpBB/phpbb/console/command/config/increment.php
+++ b/phpBB/phpbb/console/command/config/increment.php
@@ -41,7 +41,7 @@ class increment extends command
'dynamic',
'd',
InputOption::VALUE_NONE,
- $this->user-lang('CLI_CONFIG_CANNOT_CACHED')
+ $this->user->lang('CLI_CONFIG_CANNOT_CACHED')
)
;
}
diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php
index cca4975aa6..59ff11e9b7 100644
--- a/phpBB/phpbb/console/command/extension/enable.php
+++ b/phpBB/phpbb/console/command/extension/enable.php
@@ -40,12 +40,12 @@ class enable extends command
if ($this->manager->is_enabled($name))
{
$this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_ENABLE', time(), array($name));
- $output->writeln('<error>' . $this->user->lang('CLI_EXTENSION_ENABLE_FAILURE', $name) . '</error>');
+ $output->writeln('<info>' . $this->user->lang('CLI_EXTENSION_ENABLE_SUCCESS', $name) . '</info>');
return 0;
}
else
{
- $output->writeln('<info>' . $this->user->lang('CLI_EXTENSION_ENABLE_SUCCESS', $name) . '</info>');
+ $output->writeln('<error>' . $this->user->lang('CLI_EXTENSION_ENABLE_FAILURE', $name) . '</error>');
return 1;
}
}
diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php
index c522c3273f..2af8b50b54 100644
--- a/phpBB/phpbb/log/log.php
+++ b/phpBB/phpbb/log/log.php
@@ -245,9 +245,9 @@ class log implements \phpbb\log\log_interface
break;
case 'mod':
- $forum_id = (int) $additional_data['forum_id'];
+ $forum_id = isset($additional_data['forum_id']) ? (int) $additional_data['forum_id'] : 0;
unset($additional_data['forum_id']);
- $topic_id = (int) $additional_data['topic_id'];
+ $topic_id = isset($additional_data['topic_id']) ? (int) $additional_data['topic_id'] : 0;
unset($additional_data['topic_id']);
$sql_ary += array(
'log_type' => LOG_MOD,
diff --git a/phpBB/phpbb/profilefields/type/type_googleplus.php b/phpBB/phpbb/profilefields/type/type_googleplus.php
index df1bcc7f4b..887baa3de1 100644
--- a/phpBB/phpbb/profilefields/type/type_googleplus.php
+++ b/phpBB/phpbb/profilefields/type/type_googleplus.php
@@ -18,6 +18,14 @@ class type_googleplus extends type_string
/**
* {@inheritDoc}
*/
+ public function get_name()
+ {
+ return $this->user->lang('FIELD_GOOGLEPLUS');
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public function get_service_name()
{
return 'profilefields.type.googleplus';