aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/avatar/driver/driver.php60
-rw-r--r--phpBB/includes/avatar/driver/gravatar.php2
-rw-r--r--phpBB/includes/avatar/driver/remote.php4
-rw-r--r--phpBB/includes/avatar/driver/upload.php4
4 files changed, 34 insertions, 36 deletions
diff --git a/phpBB/includes/avatar/driver/driver.php b/phpBB/includes/avatar/driver/driver.php
index 710d3dfe20..c6b864bc9f 100644
--- a/phpBB/includes/avatar/driver/driver.php
+++ b/phpBB/includes/avatar/driver/driver.php
@@ -24,34 +24,14 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
protected $name;
/**
- * Returns the name of the driver.
- *
- * @return string Name of wrapped driver.
- */
- public function get_name()
- {
- return $this->name;
- }
-
- /**
- * Sets the name of the driver.
- *
- * @param string $name The driver name
- */
- public function set_name($name)
- {
- $this->name = $name;
- }
-
- /**
* Current board configuration
* @type phpbb_config
*/
protected $config;
/**
- * Current board configuration
- * @type phpbb_config
+ * Request object
+ * @type phpbb_request
*/
protected $request;
@@ -62,10 +42,10 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
protected $phpbb_root_path;
/**
- * Current $phpEx
+ * Current $php_ext
* @type string
*/
- protected $phpEx;
+ protected $php_ext;
/**
* A cache driver
@@ -83,18 +63,18 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
/**
* Construct a driver object
*
- * @param $config The phpBB configuration
- * @param $request The request object
- * @param $phpbb_root_path The path to the phpBB root
- * @param $phpEx The php file extension
- * @param $cache A cache driver
+ * @param phpbb_config $config The phpBB configuration
+ * @param phpbb_request $request The request object
+ * @param string $phpbb_root_path The path to the phpBB root
+ * @param string $php_ext The php file extension
+ * @param phpbb_cache_driver_interface $cache A cache driver
*/
- public function __construct(phpbb_config $config, phpbb_request $request, $phpbb_root_path, $phpEx, phpbb_cache_driver_interface $cache = null)
+ public function __construct(phpbb_config $config, phpbb_request $request, $phpbb_root_path, $php_ext, phpbb_cache_driver_interface $cache = null)
{
$this->config = $config;
$this->request = $request;
$this->phpbb_root_path = $phpbb_root_path;
- $this->phpEx = $phpEx;
+ $this->php_ext = $php_ext;
$this->cache = $cache;
}
@@ -170,4 +150,22 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
return $template;
}
+
+ /**
+ * @inheritdoc
+ */
+ public function get_name()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Sets the name of the driver.
+ *
+ * @param string $name The driver name
+ */
+ public function set_name($name)
+ {
+ $this->name = $name;
+ }
}
diff --git a/phpBB/includes/avatar/driver/gravatar.php b/phpBB/includes/avatar/driver/gravatar.php
index cca7289275..e21743242f 100644
--- a/phpBB/includes/avatar/driver/gravatar.php
+++ b/phpBB/includes/avatar/driver/gravatar.php
@@ -95,7 +95,7 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
$row['avatar_width'] = $this->request->variable('avatar_gravatar_width', 0);
$row['avatar_height'] = $this->request->variable('avatar_gravatar_height', 0);
- require_once($this->phpbb_root_path . 'includes/functions_user' . $this->phpEx);
+ require_once($this->phpbb_root_path . 'includes/functions_user' . $this->php_ext);
$error = array_merge($error, validate_data(array(
'email' => $row['avatar'],
diff --git a/phpBB/includes/avatar/driver/remote.php b/phpBB/includes/avatar/driver/remote.php
index f47b0d33f4..134bf070e5 100644
--- a/phpBB/includes/avatar/driver/remote.php
+++ b/phpBB/includes/avatar/driver/remote.php
@@ -82,7 +82,7 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver
$url = 'http://' . $url;
}
- require_once($this->phpbb_root_path . 'includes/functions_user' . $this->phpEx);
+ require_once($this->phpbb_root_path . 'includes/functions_user' . $this->php_ext);
$error = array_merge($error, validate_data(array(
'url' => $url,
@@ -128,7 +128,7 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver
return false;
}
- include_once($this->phpbb_root_path . 'includes/functions_upload' . $this->phpEx);
+ include_once($this->phpbb_root_path . 'includes/functions_upload' . $this->php_ext);
$types = fileupload::image_types();
$extension = strtolower(filespec::get_extension($url));
diff --git a/phpBB/includes/avatar/driver/upload.php b/phpBB/includes/avatar/driver/upload.php
index 9035b5364e..91de47e66d 100644
--- a/phpBB/includes/avatar/driver/upload.php
+++ b/phpBB/includes/avatar/driver/upload.php
@@ -29,7 +29,7 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
if ($ignore_config || $this->config['allow_avatar_upload'])
{
return array(
- 'src' => $this->phpbb_root_path . 'download/file' . $this->phpEx . '?avatar=' . $row['avatar'],
+ 'src' => $this->phpbb_root_path . 'download/file' . $this->php_ext . '?avatar=' . $row['avatar'],
'width' => $row['avatar_width'],
'height' => $row['avatar_height'],
);
@@ -72,7 +72,7 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
return false;
}
- include_once($this->phpbb_root_path . 'includes/functions_upload' . $this->phpEx);
+ include_once($this->phpbb_root_path . 'includes/functions_upload' . $this->php_ext);
$upload = new fileupload('AVATAR_', array('jpg', 'jpeg', 'gif', 'png'), $this->config['avatar_filesize'], $this->config['avatar_min_width'], $this->config['avatar_min_height'], $this->config['avatar_max_width'], $this->config['avatar_max_height'], (isset($this->config['mime_triggers']) ? explode('|', $this->config['mime_triggers']) : false));