Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion attachment/plupload.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function configure_ext(\phpbb\titania\config\config $ext_config, \phpbb\t
*/
public function generate_filter_string_ext($ext_config, $object_type)
{
if (!isset($ext_config->upload_allowed_extensions[$object_type]))
if ($ext_config->upload_allowed_extensions[$object_type] === null)
{
return '';
}
Expand Down
21 changes: 8 additions & 13 deletions attachment/uploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function get_uploaded_attachment()
/**
* Uploads a file to server
*
* @return array filedata
* @return false|array filedata
*/
public function upload_file()
{
Expand All @@ -240,7 +240,7 @@ public function upload_file()
return false;
}

if (!isset($this->ext_config->upload_allowed_extensions[$this->object_type]))
if ($this->ext_config->upload_allowed_extensions[$this->object_type] === null)
{
$this->filedata['error'][] = $this->user->lang['NO_UPLOAD_FORM_FOUND'];

Expand Down Expand Up @@ -269,7 +269,7 @@ public function upload_file()
$file->clean_filename('unique', $this->user->data['user_id'] . '_');

// Move files into their own directory depending on the extension group assigned. Should keep at least some of it organized.
if (!isset($this->ext_config->upload_directory[$this->object_type]))
if ($this->ext_config->upload_directory[$this->object_type] === null)
{
$this->filedata['error'][] = $this->user->lang('NO_UPLOAD_FORM_FOUND');

Expand Down Expand Up @@ -332,12 +332,9 @@ public function upload_file()
public function parse_uploader($tpl_file = 'posting/attachments/default.html', $custom_sort = false)
{
// If the upload max filesize is less than 0, do not show the uploader (0 = unlimited)
if (!$this->access->is_team())
if (!$this->access->is_team() && $this->ext_config->upload_max_filesize[$this->object_type] !== null && $this->ext_config->upload_max_filesize[$this->object_type] < 0)
{
if (isset($this->ext_config->upload_max_filesize[$this->object_type]) && $this->ext_config->upload_max_filesize[$this->object_type] < 0)
{
return '';
}
return '';
}

$this->template->assign_vars(array(
Expand Down Expand Up @@ -614,14 +611,12 @@ protected function handle_upload()
*/
protected function get_max_filesize()
{
if (isset($this->ext_config->upload_max_filesize[$this->object_type]))
if ($this->ext_config->upload_max_filesize[$this->object_type] !== null)
{
return $this->ext_config->upload_max_filesize[$this->object_type];
}
else
{
return $this->config['max_filesize'];
}

return $this->config['max_filesize'];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion controller/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ protected function set_branch($branch)
{
$_branch = (int) str_replace('.', '', $branch);

if ($branch != '' && !isset($this->ext_config->phpbb_versions[$_branch]))
if ($branch != '' && $this->ext_config->phpbb_versions[$_branch] === null)
{
throw new http_exception(404, 'NO_PAGE_FOUND');
}
Expand Down
2 changes: 1 addition & 1 deletion includes/objects/revision.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public function submit()
$row = array('phpbb_version_branch' => (int) $row);
}

if (!isset($row['phpbb_version_branch']) || !isset(titania::$config->phpbb_versions[$row['phpbb_version_branch']]))
if (!isset($row['phpbb_version_branch']) || titania::$config->phpbb_versions[$row['phpbb_version_branch']] === null)
{
continue;
}
Expand Down