diff options
-rw-r--r-- | phpBB/adm/style/acp_ranks.html | 11 | ||||
-rw-r--r-- | phpBB/composer.json | 28 | ||||
-rw-r--r-- | phpBB/composer.lock | 30 | ||||
-rw-r--r-- | phpBB/docs/events.md | 44 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_board.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_ranks.php | 46 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/cache/driver/file.php | 4 | ||||
-rw-r--r-- | phpBB/phpbb/cache/service.php | 12 | ||||
-rw-r--r-- | phpBB/phpbb/composer.json | 27 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/navbar_header.html | 8 | ||||
-rw-r--r-- | phpBB/styles/prosilver/theme/bidi.css | 11 | ||||
-rw-r--r-- | phpBB/styles/prosilver/theme/buttons.css | 10 | ||||
-rw-r--r-- | phpBB/styles/prosilver/theme/colours.css | 1 | ||||
-rw-r--r-- | phpBB/styles/prosilver/theme/common.css | 2 | ||||
-rw-r--r-- | phpBB/styles/prosilver/theme/links.css | 2 |
16 files changed, 187 insertions, 53 deletions
diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html index dd2d07a837..fa06513b98 100644 --- a/phpBB/adm/style/acp_ranks.html +++ b/phpBB/adm/style/acp_ranks.html @@ -24,6 +24,9 @@ <fieldset> <legend>{L_ACP_RANKS}</legend> + + <!-- EVENT acp_ranks_edit_before --> + <dl> <dt><label for="title">{L_RANK_TITLE}{L_COLON}</label></dt> <dd><input name="title" type="text" id="title" value="{RANK_TITLE}" maxlength="255" /></dd> @@ -38,13 +41,15 @@ <dd><label><input onclick="phpbb.toggleDisplay('posts', -1)" type="radio" class="radio" name="special_rank" value="1" id="special_rank"<!-- IF S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> <label><input onclick="phpbb.toggleDisplay('posts', 1)" type="radio" class="radio" name="special_rank" value="0"<!-- IF not S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd> </dl> - <!-- IF S_SPECIAL_RANK --><div id="posts" style="display: none;"><!-- ELSE --><div id="posts"><!-- ENDIF --> + <div id="posts"<!-- IF S_SPECIAL_RANK --> style="display: none;"<!-- ENDIF -->> <dl> <dt><label for="min_posts">{L_RANK_MINIMUM}{L_COLON}</label></dt> <dd><input name="min_posts" type="number" id="min_posts" maxlength="10" value="{MIN_POSTS}" /></dd> </dl> </div> + <!-- EVENT acp_ranks_edit_after --> + <p class="submit-buttons"> <input type="hidden" name="action" value="save" /> @@ -68,18 +73,22 @@ <table class="table1 zebra-table"> <thead> <tr> + <!-- EVENT acp_ranks_list_header_before --> <th>{L_RANK_IMAGE}</th> <th>{L_RANK_TITLE}</th> <th>{L_RANK_MINIMUM}</th> + <!-- EVENT acp_ranks_list_header_after --> <th>{L_ACTION}</th> </tr> </thead> <tbody> <!-- BEGIN ranks --> <tr> + <!-- EVENT acp_ranks_list_column_before --> <td style="text-align: center;"><!-- IF ranks.S_RANK_IMAGE --><img src="{ranks.RANK_IMAGE}" alt="{ranks.RANK_TITLE}" title="{ranks.RANK_TITLE}" /><!-- ELSE --> - <!-- ENDIF --></td> <td style="text-align: center;">{ranks.RANK_TITLE}</td> <td style="text-align: center;"><!-- IF ranks.S_SPECIAL_RANK --> - <!-- ELSE -->{ranks.MIN_POSTS}<!-- ENDIF --></td> + <!-- EVENT acp_ranks_list_column_after --> <td style="text-align: center;"><a href="{ranks.U_EDIT}">{ICON_EDIT}</a> <a href="{ranks.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a></td> </tr> <!-- END ranks --> diff --git a/phpBB/composer.json b/phpBB/composer.json index 9b473a3bb7..0ab30b0837 100644 --- a/phpBB/composer.json +++ b/phpBB/composer.json @@ -1,9 +1,31 @@ { - "_readme": [ - "You MUST update the clean-vendor-dir target in build/build.xml", - "accordingly when adding or upgrading dependencies." + "name": "phpbb/phpbb", + "description": "phpBB Forum Software application", + "type": "project", + "keywords": ["phpbb", "forum"], + "homepage": "https://www.phpbb.com", + "license": "GPL-2.0", + "authors": [ + { + "name": "phpBB Limited", + "email": "operations@phpbb.com", + "homepage": "https://www.phpbb.com/go/authors" + } ], + "support": { + "issues": "https://tracker.phpbb.com", + "forum": "https://www.phpbb.com/community/", + "wiki": "https://wiki.phpbb.com", + "irc": "irc://irc.freenode.org/phpbb" + }, + "scripts": { + "post-update-cmd": "echo 'You MUST manually modify the clean-vendor-dir target in build/build.xml when adding or upgrading dependencies.'" + }, + "replace": { + "phpbb/phpbb-core": "self.version" + }, "require": { + "php": ">=5.3.3", "lusitanian/oauth": "0.2.*", "symfony/config": "2.3.*", "symfony/console": "2.3.*", diff --git a/phpBB/composer.lock b/phpBB/composer.lock index 751cd0695f..3860a98b31 100644 --- a/phpBB/composer.lock +++ b/phpBB/composer.lock @@ -3,7 +3,7 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "dcd46c1373cfc4dacd2e1f8a79da0b91", + "hash": "6bc742a2b9feb426db9987d27085f915", "packages": [ { "name": "lusitanian/oauth", @@ -255,14 +255,12 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony Debug Component", @@ -2430,17 +2428,11 @@ "time": "2014-05-17 21:49:26" } ], - "aliases": [ - - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": [ - - ], - "platform": [ - - ], - "platform-dev": [ - - ] + "stability-flags": [], + "platform": { + "php": ">=5.3.3" + }, + "platform-dev": [] } diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index c537504d54..044596073c 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -85,6 +85,50 @@ acp_posting_buttons_before * Since: 3.1.0-b4 * Purpose: Add content before BBCode posting buttons in the ACP +acp_ranks_edit_after +=== +* Locations: + + adm/style/acp_ranks.html +* Since: 3.1.0-RC3 +* Purpose: Add content after the rank details when editing a rank in the ACP + +acp_ranks_edit_before +=== +* Locations: + + adm/style/acp_ranks.html +* Since: 3.1.0-RC3 +* Purpose: Add content before the rank details when editing a rank in the ACP + +acp_ranks_list_column_after +=== +* Locations: + + adm/style/acp_ranks.html +* Since: 3.1.0-RC3 +* Purpose: Add content before the first column in the ranks list in the ACP + +acp_ranks_list_column_before +=== +* Locations: + + adm/style/acp_ranks.html +* Since: 3.1.0-RC3 +* Purpose: Add content after the last column (but before the action column) +in the ranks list in the ACP + +acp_ranks_list_header_after +=== +* Locations: + + adm/style/acp_ranks.html +* Since: 3.1.0-RC3 +* Purpose: Add content before the first header-column in the ranks list in the ACP + +acp_ranks_list_header_before +=== +* Locations: + + adm/style/acp_ranks.html +* Since: 3.1.0-RC3 +* Purpose: Add content after the last header-column (but before the action column) +in the ranks list in the ACP + acp_simple_footer_after === * Location: adm/style/simple_footer.html diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 1811748c2f..f2707f15ca 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -925,7 +925,7 @@ class acp_board { $user->timezone = new DateTimeZone($config['board_timezone']); } - catch (Exception $e) + catch (\Exception $e) { // If the board timezone is invalid, we just use the users timezone. } diff --git a/phpBB/includes/acp/acp_ranks.php b/phpBB/includes/acp/acp_ranks.php index fdbd0e0a1d..5885de57ec 100644 --- a/phpBB/includes/acp/acp_ranks.php +++ b/phpBB/includes/acp/acp_ranks.php @@ -25,7 +25,7 @@ class acp_ranks function main($id, $mode) { - global $db, $user, $auth, $template, $cache, $request; + global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher; global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; $user->add_lang('acp/posting'); @@ -73,6 +73,17 @@ class acp_ranks 'rank_image' => htmlspecialchars_decode($rank_image) ); + /** + * Modify the SQL array when saving a rank + * + * @event core.acp_ranks_save_modify_sql_ary + * @var int rank_id The ID of the rank (if available) + * @var array sql_ary Array with the rank's data + * @since 3.1.0-RC3 + */ + $vars = array('rank_id', 'sql_ary'); + extract($phpbb_dispatcher->trigger_event('core.acp_ranks_save_modify_sql_ary', compact($vars))); + if ($rank_id) { $sql = 'UPDATE ' . RANKS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE rank_id = $rank_id"; @@ -202,7 +213,7 @@ class acp_ranks $filename_list = '<option value=""' . (($edit_img == '') ? ' selected="selected"' : '') . '>----------</option>' . $filename_list; unset($existing_imgs, $imglist); - $template->assign_vars(array( + $tpl_ary = array( 'S_EDIT' => true, 'U_BACK' => $this->u_action, 'RANKS_PATH' => $phpbb_root_path . $config['ranks_path'], @@ -212,9 +223,21 @@ class acp_ranks 'S_FILENAME_LIST' => $filename_list, 'RANK_IMAGE' => ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : htmlspecialchars($phpbb_admin_path) . 'images/spacer.gif', 'S_SPECIAL_RANK' => (isset($ranks['rank_special']) && $ranks['rank_special']) ? true : false, - 'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0) + 'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0, ); + /** + * Modify the template output array for editing/adding ranks + * + * @event core.acp_ranks_edit_modify_tpl_ary + * @var array ranks Array with the rank's data + * @var array tpl_ary Array with the rank's template data + * @since 3.1.0-RC3 + */ + $vars = array('ranks', 'tpl_ary'); + extract($phpbb_dispatcher->trigger_event('core.acp_ranks_edit_modify_tpl_ary', compact($vars))); + + $template->assign_vars($tpl_ary); return; break; @@ -231,7 +254,7 @@ class acp_ranks while ($row = $db->sql_fetchrow($result)) { - $template->assign_block_vars('ranks', array( + $rank_row = array( 'S_RANK_IMAGE' => ($row['rank_image']) ? true : false, 'S_SPECIAL_RANK' => ($row['rank_special']) ? true : false, @@ -240,8 +263,21 @@ class acp_ranks 'MIN_POSTS' => $row['rank_min'], 'U_EDIT' => $this->u_action . '&action=edit&id=' . $row['rank_id'], - 'U_DELETE' => $this->u_action . '&action=delete&id=' . $row['rank_id']) + 'U_DELETE' => $this->u_action . '&action=delete&id=' . $row['rank_id'], ); + + /** + * Modify the template output array for each listed rank + * + * @event core.acp_ranks_list_modify_rank_row + * @var array row Array with the rank's data + * @var array rank_row Array with the rank's template data + * @since 3.1.0-RC3 + */ + $vars = array('row', 'rank_row'); + extract($phpbb_dispatcher->trigger_event('core.acp_ranks_list_modify_rank_row', compact($vars))); + + $template->assign_block_vars('ranks', $rank_row); } $db->sql_freeresult($result); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index d7b1b56532..4318b20b97 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1031,7 +1031,7 @@ function phpbb_get_timezone_identifiers($selected_timezone) $validate_timezone = new DateTimeZone($selected_timezone); $timezones[] = $selected_timezone; } - catch (Exception $e) + catch (\Exception $e) { } } diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php index b32af32d25..2d538b739c 100644 --- a/phpBB/phpbb/cache/driver/file.php +++ b/phpBB/phpbb/cache/driver/file.php @@ -208,7 +208,7 @@ class file extends \phpbb\cache\driver\base { $iterator = new \DirectoryIterator($this->cache_dir); } - catch (Exception $e) + catch (\Exception $e) { return; } @@ -259,7 +259,7 @@ class file extends \phpbb\cache\driver\base { $iterator = new \DirectoryIterator($dir); } - catch (Exception $e) + catch (\Exception $e) { return; } diff --git a/phpBB/phpbb/cache/service.php b/phpBB/phpbb/cache/service.php index b890d90558..56727c2ad5 100644 --- a/phpBB/phpbb/cache/service.php +++ b/phpBB/phpbb/cache/service.php @@ -168,18 +168,12 @@ class service { if ($row['rank_special']) { - $ranks['special'][$row['rank_id']] = array( - 'rank_title' => $row['rank_title'], - 'rank_image' => $row['rank_image'] - ); + unset($row['rank_min']); + $ranks['special'][$row['rank_id']] = $row; } else { - $ranks['normal'][] = array( - 'rank_title' => $row['rank_title'], - 'rank_min' => $row['rank_min'], - 'rank_image' => $row['rank_image'] - ); + $ranks['normal'][$row['rank_id']] = $row; } } $this->db->sql_freeresult($result); diff --git a/phpBB/phpbb/composer.json b/phpBB/phpbb/composer.json new file mode 100644 index 0000000000..513d7e4559 --- /dev/null +++ b/phpBB/phpbb/composer.json @@ -0,0 +1,27 @@ +{ + "name": "phpbb/phpbb-core", + "description": "Collection of core phpBB libraries", + "type": "library", + "keywords": ["phpbb", "forum"], + "homepage": "https://www.phpbb.com", + "license": "GPL-2.0", + "authors": [ + { + "name": "phpBB Limited", + "email": "operations@phpbb.com", + "homepage": "https://www.phpbb.com/go/authors" + } + ], + "support": { + "issues": "https://tracker.phpbb.com", + "forum": "https://www.phpbb.com/community/", + "wiki": "https://wiki.phpbb.com", + "irc": "irc://irc.freenode.org/phpbb" + }, + "autoload": { + "classmap": [""] + }, + "require": { + "php": ">=5.3.3" + } +} diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html index b40be089d2..68759c3c4c 100644 --- a/phpBB/styles/prosilver/template/navbar_header.html +++ b/phpBB/styles/prosilver/template/navbar_header.html @@ -23,6 +23,14 @@ <!-- ENDIF --> <li class="small-icon icon-search-unanswered"><a href="{U_SEARCH_UNANSWERED}" role="menuitem">{L_SEARCH_UNANSWERED}</a></li> <li class="small-icon icon-search-active"><a href="{U_SEARCH_ACTIVE_TOPICS}" role="menuitem">{L_SEARCH_ACTIVE_TOPICS}</a></li> + <li class="separator"></li> + <li class="small-icon icon-search"><a href="{U_SEARCH}" role="menuitem">{L_SEARCH}</a></li> + <!-- ENDIF --> + + <!-- IF not S_IS_BOT and (S_DISPLAY_MEMBERLIST or U_TEAM) --> + <li class="separator"></li> + <!-- IF S_DISPLAY_MEMBERLIST --><li class="small-icon icon-members"><a href="{U_MEMBERLIST}" role="menuitem">{L_MEMBERLIST}</a></li><!-- ENDIF --> + <!-- IF U_TEAM --><li class="small-icon icon-team"><a href="{U_TEAM}" role="menuitem">{L_THE_TEAM}</a></li><!-- ENDIF --> <!-- ENDIF --> <li class="separator"></li> diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index bc9e4b3965..d3594cc5bd 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -114,7 +114,7 @@ .rtl .dropdown li li { padding-left: 0; - padding-right: 10px; + padding-right: 18px; } .rtl .dropdown-extended .header { @@ -315,7 +315,7 @@ unicode-bidi: embed; } -ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { +li.breadcrumbs span:first-child > a { padding-left: 0; padding-right: 19px; } @@ -628,12 +628,11 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { ---------------------------------------- */ .rtl .small-icon { background-position: 100% 50%; - padding-left: 0; - padding-right: 19px; } -.rtl ul.linklist li.small-icon { - padding-right: 0; +.rtl .small-icon > a { + padding-left: 0; + padding-right: 19px; } /* Post control buttons diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index 18c71d251e..b45aae5672 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -105,17 +105,21 @@ background-position: 0 50%; background-repeat: no-repeat; background-image: none; - padding: 0 0 0 17px; } -ul.linklist li.small-icon { - padding-left: 0; +.small-icon > a { + display: inline-block; + padding: 0 0 0 18px; } ul.linklist.bulletin > li.small-icon:before { display: none; } +.dropdown .small-icon > a { + display: block; +} + /* Poster contact icons ----------------------------------------*/ .contact-icons.dropdown-contents { diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index fce66f7efb..82542c8d86 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -654,7 +654,6 @@ Colours and backgrounds for buttons.css .icon-pm { background-image: url("./images/icon_pm.gif"); } .icon-print { background-image: url("./images/icon_print.gif"); } .icon-profile { background-image: url("./images/icon_profile.gif"); } -.icon-quick-links { background-image: url("./images/icon_quick_links.gif"); } .icon-register { background-image: url("./images/icon_register.gif"); } .icon-search, .responsive-search a { background-image: url("./images/icon_search.gif"); } .icon-search-active { background-image: url("./images/subforum_read.gif"); } diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index e33bf99965..54d81406e8 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -625,7 +625,7 @@ ul.linklist.bulletin > li.no-bulletin:before { .dropdown li li { border-top: 1px dotted transparent; - padding-left: 10px; + padding-left: 18px; } .wrap .dropdown li, .dropdown.wrap li, .dropdown-extended li { diff --git a/phpBB/styles/prosilver/theme/links.css b/phpBB/styles/prosilver/theme/links.css index 890f854baa..9b5c00d9b6 100644 --- a/phpBB/styles/prosilver/theme/links.css +++ b/phpBB/styles/prosilver/theme/links.css @@ -27,7 +27,7 @@ a:hover { text-decoration: underline; } } /* Navigation bar links */ -ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { +li.breadcrumbs span:first-child > a { display: inline-block; padding-left: 17px; } |