diff options
Diffstat (limited to 'phpBB/includes/avatar/driver')
-rw-r--r-- | phpBB/includes/avatar/driver/gravatar.php | 12 | ||||
-rw-r--r-- | phpBB/includes/avatar/driver/local.php | 30 | ||||
-rw-r--r-- | phpBB/includes/avatar/driver/remote.php | 12 | ||||
-rw-r--r-- | phpBB/includes/avatar/driver/upload.php | 8 |
4 files changed, 31 insertions, 31 deletions
diff --git a/phpBB/includes/avatar/driver/gravatar.php b/phpBB/includes/avatar/driver/gravatar.php index 58ac535e6b..d873f7ba41 100644 --- a/phpBB/includes/avatar/driver/gravatar.php +++ b/phpBB/includes/avatar/driver/gravatar.php @@ -69,9 +69,9 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver public function prepare_form($template, $row, &$error) { $template->assign_vars(array( - 'AV_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $this->request->variable('av_gravatar_width', 0), - 'AV_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $this->request->variable('av_gravatar_width', 0), - 'AV_GRAVATAR_EMAIL' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar']) ? $row['avatar'] : '', + 'AVATAR_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $this->request->variable('avatar_gravatar_width', 0), + 'AVATAR_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $this->request->variable('avatar_gravatar_width', 0), + 'AVATAR_GRAVATAR_EMAIL' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar']) ? $row['avatar'] : '', )); return true; @@ -92,9 +92,9 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver */ public function process_form($template, $row, &$error) { - $row['avatar'] = $this->request->variable('av_gravatar_email', ''); - $row['avatar_width'] = $this->request->variable('av_gravatar_width', 0); - $row['avatar_height'] = $this->request->variable('av_gravatar_height', 0); + $row['avatar'] = $this->request->variable('avatar_gravatar_email', ''); + $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); diff --git a/phpBB/includes/avatar/driver/local.php b/phpBB/includes/avatar/driver/local.php index 8ac511f909..c231206d8e 100644 --- a/phpBB/includes/avatar/driver/local.php +++ b/phpBB/includes/avatar/driver/local.php @@ -50,13 +50,13 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver public function prepare_form($template, $row, &$error) { $avatar_list = $this->get_avatar_list(); - $category = $this->request->variable('av_local_cat', ''); + $category = $this->request->variable('avatar_local_cat', ''); foreach ($avatar_list as $cat => $null) { if (!empty($avatar_list[$cat])) { - $template->assign_block_vars('av_local_cats', array( + $template->assign_block_vars('avatar_local_cats', array( 'NAME' => $cat, 'SELECTED' => ($cat == $category), )); @@ -71,16 +71,16 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver if (!empty($avatar_list[$category])) { $template->assign_vars(array( - 'AV_LOCAL_SHOW' => true, + 'AVATAR_LOCAL_SHOW' => true, )); - $table_cols = isset($row['av_gallery_cols']) ? $row['av_gallery_cols'] : 4; - $row_count = $col_count = $av_pos = 0; - $av_count = sizeof($avatar_list[$category]); + $table_cols = isset($row['avatar_gallery_cols']) ? $row['avatar_gallery_cols'] : 4; + $row_count = $col_count = $avatar_pos = 0; + $avatar_count = sizeof($avatar_list[$category]); reset($avatar_list[$category]); - while ($av_pos < $av_count) + while ($avatar_pos < $avatar_count) { $img = current($avatar_list[$category]); next($avatar_list[$category]); @@ -88,24 +88,24 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver if ($col_count == 0) { ++$row_count; - $template->assign_block_vars('av_local_row', array( + $template->assign_block_vars('avatar_local_row', array( )); } - $template->assign_block_vars('av_local_row.av_local_col', array( + $template->assign_block_vars('avatar_local_row.avatar_local_col', array( 'AVATAR_IMAGE' => $this->phpbb_root_path . $this->config['avatar_gallery_path'] . '/' . $img['file'], 'AVATAR_NAME' => $img['name'], 'AVATAR_FILE' => $img['filename'], )); - $template->assign_block_vars('av_local_row.av_local_option', array( + $template->assign_block_vars('avatar_local_row.avatar_local_option', array( 'AVATAR_FILE' => $img['filename'], 'S_OPTIONS_AVATAR' => $img['filename'] )); $col_count = ($col_count + 1) % $table_cols; - ++$av_pos; + ++$avatar_pos; } } @@ -129,9 +129,9 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver public function process_form($template, $row, &$error) { $avatar_list = $this->get_avatar_list(); - $category = $this->request->variable('av_local_cat', ''); + $category = $this->request->variable('avatar_local_cat', ''); - $file = $this->request->variable('av_local_file', ''); + $file = $this->request->variable('avatar_local_file', ''); if (!isset($avatar_list[$category][urldecode($file)])) { $error[] = 'AVATAR_URL_NOT_FOUND'; @@ -152,7 +152,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver */ protected function get_avatar_list() { - $avatar_list = ($this->cache == null) ? false : $this->cache->get('av_local_list'); + $avatar_list = ($this->cache == null) ? false : $this->cache->get('avatar_local_list'); if (!$avatar_list) { @@ -190,7 +190,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver if ($this->cache != null) { - $this->cache->put('av_local_list', $avatar_list); + $this->cache->put('avatar_local_list', $avatar_list); } } diff --git a/phpBB/includes/avatar/driver/remote.php b/phpBB/includes/avatar/driver/remote.php index 61ea0ebaf0..c2ae88cc02 100644 --- a/phpBB/includes/avatar/driver/remote.php +++ b/phpBB/includes/avatar/driver/remote.php @@ -50,9 +50,9 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver public function prepare_form($template, $row, &$error) { $template->assign_vars(array( - 'AV_REMOTE_WIDTH' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_width']) ? $row['avatar_width'] : $this->request->variable('av_remote_width', 0), - 'AV_REMOTE_HEIGHT' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_height']) ? $row['avatar_height'] : $this->request->variable('av_remote_width', 0), - 'AV_REMOTE_URL' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar']) ? $row['avatar'] : '', + 'AVATAR_REMOTE_WIDTH' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_width']) ? $row['avatar_width'] : $this->request->variable('avatar_remote_width', 0), + 'AVATAR_REMOTE_HEIGHT' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_height']) ? $row['avatar_height'] : $this->request->variable('avatar_remote_width', 0), + 'AVATAR_REMOTE_URL' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar']) ? $row['avatar'] : '', )); return true; @@ -73,9 +73,9 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver */ public function process_form($template, $row, &$error) { - $url = $this->request->variable('av_remote_url', ''); - $width = $this->request->variable('av_remote_width', 0); - $height = $this->request->variable('av_remote_height', 0); + $url = $this->request->variable('avatar_remote_url', ''); + $width = $this->request->variable('avatar_remote_width', 0); + $height = $this->request->variable('avatar_remote_height', 0); if (!preg_match('#^(http|https|ftp)://#i', $url)) { diff --git a/phpBB/includes/avatar/driver/upload.php b/phpBB/includes/avatar/driver/upload.php index 77cd81c8c9..9035b5364e 100644 --- a/phpBB/includes/avatar/driver/upload.php +++ b/phpBB/includes/avatar/driver/upload.php @@ -56,7 +56,7 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver $template->assign_vars(array( 'S_UPLOAD_AVATAR_URL' => ($this->config['allow_avatar_remote_upload']) ? true : false, - 'AV_UPLOAD_SIZE' => $this->config['avatar_filesize'], + 'AVATAR_UPLOAD_SIZE' => $this->config['avatar_filesize'], )); return true; @@ -76,12 +76,12 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver $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)); - $url = $this->request->variable('av_upload_url', ''); - $upload_file = $this->request->file('av_upload_file'); + $url = $this->request->variable('avatar_upload_url', ''); + $upload_file = $this->request->file('avatar_upload_file'); if (!empty($upload_file['name'])) { - $file = $upload->form_upload('av_upload_file'); + $file = $upload->form_upload('avatar_upload_file'); } else { |