Skip to content
Open
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
8 changes: 4 additions & 4 deletions acp/upload_info.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class upload_info
function module()
{
return array(
'filename' => 'boardtools\upload\acp\upload_module',
'title' => 'ACP_UPLOAD_EXT_TITLE',
'version' => '1.0.0',
'modes' => array(
'filename' => 'boardtools\upload\acp\upload_module',
'title' => 'ACP_UPLOAD_EXT_TITLE',
'version' => '1.0.0',
'modes' => array(
'main' => array(
'title' => 'ACP_UPLOAD_EXT_CONFIG_TITLE',
'auth' => 'ext_boardtools/upload && acl_a_extensions',
Expand Down
114 changes: 57 additions & 57 deletions acp/upload_module.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
*
* @package Upload Extensions
* @package Upload Extensions
* @copyright (c) 2014 - 2019 Igor Lavrov (https://github.com/LavIgor) and John Peskens (http://ForumHulp.com)
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

Expand Down Expand Up @@ -59,20 +59,20 @@ function main($id, $mode)
$phpbb_link_template = '#^(https://)www.phpbb.com/customise/db/download/([0-9]*?)(/composer|/manual)?/?(\?sid\=[a-zA-Z0-9]*?)?$#i';

// Work with objects class instead of $this.
objects::$cache = &$cache;
objects::$config = &$config;
objects::$log = &$phpbb_log;
objects::$cache = $cache;
objects::$config = $config;
objects::$log = $phpbb_log;
objects::$phpEx = $phpEx;
objects::$phpbb_container = &$phpbb_container;
objects::$phpbb_extension_manager = &$phpbb_extension_manager;
objects::$phpbb_container = $phpbb_container;
objects::$phpbb_extension_manager = $phpbb_extension_manager;
objects::$phpbb_link_template = $phpbb_link_template;
objects::$phpbb_root_path = $phpbb_root_path;
objects::$request = &$request;
objects::$template = &$template;
objects::$tpl_name = &$this->tpl_name;
objects::$request = $request;
objects::$template = $template;
objects::$tpl_name = $this->tpl_name;
objects::$u_action = $this->u_action;
objects::$user = &$user;
objects::$zip_dir = &$this->zip_dir;
objects::$user = $user;
objects::$zip_dir = $this->zip_dir;

// Add support for different phpBB branches.
objects::set_compatibility_class();
Expand All @@ -85,7 +85,7 @@ function main($id, $mode)
{
$template->assign_vars(array(
'HAS_AJAX' => true,
'IS_AJAX' => true,
'IS_AJAX' => true,
));
objects::$is_ajax = true;

Expand Down Expand Up @@ -137,7 +137,7 @@ function main($id, $mode)
else
{
$template->assign_vars(array(
'S_LOAD_ACTION' => $action,
'S_LOAD_ACTION' => $action,
'U_MAIN_PAGE_URL' => build_url(
array('action', 'ajax', 'ajax_time', 'archive', 'ext_name', 'ext_show', 'lang', 'local_upload', 'result')
),
Expand Down Expand Up @@ -200,19 +200,19 @@ function main($id, $mode)
{
$md_manager = objects::$compatibility->create_metadata_manager($ext_name);
load::ajax_confirm_box(false, $user->lang('EXTENSION_DELETE_DATA_CONFIRM', $md_manager->get_metadata('display-name')), build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'action' => $action,
'i' => $id,
'mode' => $mode,
'action' => $action,
'ext_name' => $ext_name,
)));
}
else
{
$md_manager = objects::$compatibility->create_metadata_manager($ext_name);
confirm_box(false, $user->lang('EXTENSION_DELETE_DATA_CONFIRM', $md_manager->get_metadata('display-name')), build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'action' => $action,
'i' => $id,
'mode' => $mode,
'action' => $action,
'ext_name' => $ext_name,
)));
}
Expand Down Expand Up @@ -268,7 +268,7 @@ function main($id, $mode)
$extension = new extension();
$extension->upload($action);
$template->assign_vars(array(
'U_UPLOAD' => $this->main_link . '&amp;action=upload',
'U_UPLOAD' => $this->main_link . '&amp;action=upload',
'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
));
break;
Expand All @@ -280,7 +280,7 @@ function main($id, $mode)
}
load::zip_files();
$template->assign_vars(array(
'S_ZIP_PACKAGES' => true,
'S_ZIP_PACKAGES' => true,
'U_DELETE_ACTION' => objects::$u_action . "&amp;action=delete_zip",
));
break;
Expand All @@ -292,7 +292,7 @@ function main($id, $mode)
}
extensions::list_uninstalled_exts();
$template->assign_vars(array(
'S_UNINSTALLED' => true,
'S_UNINSTALLED' => true,
'U_DELETE_ACTION' => objects::$u_action . "&amp;action=delete_ext",
));
break;
Expand Down Expand Up @@ -353,9 +353,9 @@ function main($id, $mode)
if ($force_unstable)
{
$s_hidden_fields = build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'action' => $action,
'i' => $id,
'mode' => $mode,
'action' => $action,
'force_unstable' => $force_unstable,
));

Expand Down Expand Up @@ -391,11 +391,11 @@ function main($id, $mode)
extensions::list_all_exts();

objects::$template->assign_vars(array(
'S_EXT_LIST' => true,
'S_EXT_LIST' => true,
'U_VERSIONCHECK_FORCE' => objects::$u_action . '&amp;action=list&amp;versioncheck_force=1',
'FORCE_UNSTABLE' => $config['extension_force_unstable'],
'SET_FORCE_UNSTABLE' => objects::$request->variable('set_force_unstable', false),
'U_ACTION_LIST' => objects::$u_action . '&amp;action=list',
'FORCE_UNSTABLE' => $config['extension_force_unstable'],
'SET_FORCE_UNSTABLE' => objects::$request->variable('set_force_unstable', false),
'U_ACTION_LIST' => objects::$u_action . '&amp;action=list',
));

add_form_key('version_check_settings');
Expand Down Expand Up @@ -459,10 +459,10 @@ function main($id, $mode)
{
$confirm_text = (sizeof($marked) > 1) ? $user->lang('EXTENSIONS_DELETE_CONFIRM', sizeof($marked)) : $user->lang('EXTENSION_DELETE_CONFIRM', $marked[0]);
confirm_box(false, $confirm_text, build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'action' => $action,
'mark' => $marked,
'i' => $id,
'mode' => $mode,
'action' => $action,
'mark' => $marked,
'delmarked' => $deletemark,
)));
}
Expand Down Expand Up @@ -499,10 +499,10 @@ function main($id, $mode)
{
$confirm_text = (sizeof($marked) > 1) ? $user->lang('EXTENSIONS_ZIP_DELETE_CONFIRM', sizeof($marked)) : $user->lang('EXTENSION_ZIP_DELETE_CONFIRM', $marked[0]);
confirm_box(false, $confirm_text, build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'action' => $action,
'mark' => $marked,
'i' => $id,
'mode' => $mode,
'action' => $action,
'mark' => $marked,
'delmarked' => $deletemark,
)));
}
Expand Down Expand Up @@ -546,10 +546,10 @@ function main($id, $mode)
$json_response = new \phpbb\json_response;
$json_response->send(array(
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
'MESSAGE_TEXT' => $result_text,
'REFRESH_DATA' => array(
'MESSAGE_TEXT' => $result_text,
'REFRESH_DATA' => array(
'time' => 3,
'url' => redirect(objects::$u_action . '&amp;action=details&amp;ext_show=languages&amp;ajax=1', true)
'url' => redirect(objects::$u_action . '&amp;action=details&amp;ext_show=languages&amp;ajax=1', true)
)
));
}
Expand All @@ -572,11 +572,11 @@ function main($id, $mode)
{
$confirm_text = (sizeof($marked) > 1) ? $user->lang('EXT_LANGUAGES_DELETE_CONFIRM', sizeof($marked)) : $user->lang('EXT_LANGUAGE_DELETE_CONFIRM', $marked[0]);
confirm_box(false, $confirm_text, build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'action' => $action,
'ext_name' => $ext_name,
'mark' => $marked,
'i' => $id,
'mode' => $mode,
'action' => $action,
'ext_name' => $ext_name,
'mark' => $marked,
'delmarked' => $deletemark,
)));
}
Expand All @@ -595,7 +595,7 @@ function main($id, $mode)
case 'main':
default:
$template->assign_vars(array(
'U_UPLOAD' => $this->main_link . '&amp;action=upload',
'U_UPLOAD' => $this->main_link . '&amp;action=upload',
'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
));
break;
Expand Down Expand Up @@ -643,17 +643,17 @@ public function get_valid_extensions()
$require_php = (isset($latest_release['require']['php'])) ? $latest_release['require']['php'] : '';

objects::$template->assign_block_vars("phpbb_cdb", array(
'EXT_NAME' => $display_name,
'EXT_VERSION' => key($value),
'EXT_DOWNLOAD' => $download_link,
'EXT_NAME' => $display_name,
'EXT_VERSION' => key($value),
'EXT_DOWNLOAD' => $download_link,
'EXT_DOWNLOAD_ENCODED' => urlencode($download_link),
'EXT_DESCRIPTION' => $description,
'EXT_HOMEPAGE' => $homepage_link,
'EXT_CHECKSUM' => $shasum,
'REQUIRE_PHPBB' => $require_phpbb,
'EXT_DESCRIPTION' => $description,
'EXT_HOMEPAGE' => $homepage_link,
'EXT_CHECKSUM' => $shasum,
'REQUIRE_PHPBB' => $require_phpbb,
'REQUIRE_PHPBB_STATUS' => !empty($require_phpbb),
'REQUIRE_PHP' => $require_php,
'REQUIRE_PHP_STATUS' => !empty($require_php),
'REQUIRE_PHP' => $require_php,
'REQUIRE_PHP_STATUS' => !empty($require_php),
));
}
}
Expand All @@ -675,7 +675,7 @@ protected function catch_errors()
else
{
objects::$template->assign_vars(array(
'S_EXT_ERROR' => true,
'S_EXT_ERROR' => true,
'S_LOAD_ACTION' => 'error',
));
}
Expand Down
32 changes: 16 additions & 16 deletions adm/style/acp_ext_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,23 @@ <h1><i class="fa fa-exclamation-circle"></i> {L_ACP_UPLOAD_EXT_NO_CHECKSUM_TITLE
<div class="ext_details_markdown" id="ext_details_readme">{EXT_DETAILS_README}</div>
<div class="ext_details_markdown" id="ext_details_changelog">{EXT_DETAILS_CHANGELOG}</div>
<!-- ENDIF -->
<!-- IF SHOW_DETAILS_TAB == 'faq' || HAS_AJAX || S_EXT_DETAILS_SHOW_LANGUAGES -->
<div id="ext_details_faq" data-ext-show-faq="{S_EXT_DETAILS_SHOW_FAQ}"<!-- IF not HAS_AJAX && not S_EXT_DETAILS_SHOW_LANGUAGES --> style="display:block;"<!-- ENDIF-->>
<!-- IF SHOW_DETAILS_TAB == 'faq' || HAS_AJAX || S_EXT_DETAILS_SHOW_LANGUAGES -->
<div id="ext_details_faq" data-ext-show-faq="{S_EXT_DETAILS_SHOW_FAQ}"<!-- IF not HAS_AJAX && not S_EXT_DETAILS_SHOW_LANGUAGES --> style="display:block;"<!-- ENDIF-->>
<h1>{L_ACP_UPLOAD_EXT_HELP}</h1>
<!-- BEGIN upload_ext_faq_block -->
<div id="upload_ext_faq_item_{upload_ext_faq_block.SECTION_NUMBER}">
<span class="upload_ext_faq_title">{upload_ext_faq_block.BLOCK_TITLE}</span>
<!-- BEGIN faq_row -->
<div class="upload_ext_faq">
<span class="upload_ext_faq_question">{upload_ext_faq_block.faq_row.FAQ_QUESTION}</span>
<div class="upload_ext_faq_answer">{upload_ext_faq_block.faq_row.FAQ_ANSWER}</div>
</div>
<!-- END faq_row -->
</div>
<!-- IF not upload_ext_faq_block.S_LAST_ROW --><hr class="dashed" /><!-- ENDIF -->
<!-- END upload_ext_faq_block -->
</div>
<!-- ENDIF -->
<!-- BEGIN upload_ext_faq_block -->
<div id="upload_ext_faq_item_{upload_ext_faq_block.SECTION_NUMBER}">
<span class="upload_ext_faq_title">{upload_ext_faq_block.BLOCK_TITLE}</span>
<!-- BEGIN faq_row -->
<div class="upload_ext_faq">
<span class="upload_ext_faq_question">{upload_ext_faq_block.faq_row.FAQ_QUESTION}</span>
<div class="upload_ext_faq_answer">{upload_ext_faq_block.faq_row.FAQ_ANSWER}</div>
</div>
<!-- END faq_row -->
</div>
<!-- IF not upload_ext_faq_block.S_LAST_ROW --><hr class="dashed" /><!-- ENDIF -->
<!-- END upload_ext_faq_block -->
</div>
<!-- ENDIF -->
<!-- IF EXT_DETAILS_LANGUAGES || HAS_AJAX -->
<div id="ext_languages" data-ext-show-languages="{S_EXT_DETAILS_SHOW_LANGUAGES}"<!-- IF not HAS_AJAX --> style="display:block;"<!-- ENDIF-->>
<!-- IF .ext_languages -->
Expand Down
2 changes: 1 addition & 1 deletion adm/style/acp_upload_pagination.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<span>{PAGE_NUMBER}</span> &bull;
<span>{PAGE_NUMBER}</span> &bull;
<ul>
<!-- BEGIN pagination -->
<!-- IF pagination.S_IS_PREV --><li><a href="{pagination.PAGE_URL}">{L_PREVIOUS}</a></li>
Expand Down
2 changes: 1 addition & 1 deletion adm/style/js/jquery.form.min.js

Large diffs are not rendered by default.

Loading