-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Remove forbidden @author
tag from Magento_Captcha
and Magento_Cms
#36980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
fredden
wants to merge
10
commits into
magento:2.4-develop
Choose a base branch
from
fredden:no-author/captcha-cms
base: 2.4-develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
12d2bf5
Remove forbidden @author tag
fredden ce202ef
Merge remote-tracking branch 'upstream/2.4-develop' into no-author/ca…
fredden 9f829bf
Fix static test failures
fredden 521ce61
Fix static test failure
fredden bd0fb1b
Merge remote-tracking branch 'upstream/2.4-develop' into no-author/ca…
fredden 4faab30
Merge branch '2.4-develop' into no-author/captcha-cms
engcom-Dash 20b7a31
36980: fix static failure
engcom-Dash 7ddc807
36980: fix static failure in remaining file
engcom-Dash fa9c4ac
36980: add a new line after copyright tag
engcom-Dash 8d3b154
Restore try/catch blocks with empty catch
fredden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,22 +4,17 @@ | |
* See COPYING.txt for license details. | ||
*/ | ||
|
||
/** | ||
* Captcha block | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
namespace Magento\Captcha\Block; | ||
|
||
/** | ||
* Captcha block | ||
* | ||
* @api | ||
* @since 100.0.2 | ||
*/ | ||
class Captcha extends \Magento\Framework\View\Element\Template | ||
{ | ||
/** | ||
* Captcha data | ||
* | ||
* @var \Magento\Captcha\Helper\Data | ||
*/ | ||
protected $_captchaData = null; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
|
||
/** | ||
* Captcha helper for adminhtml area | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
namespace Magento\Captcha\Helper\Adminhtml; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,16 +6,12 @@ | |
|
||
/** | ||
* Captcha image model | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
namespace Magento\Captcha\Model\Config; | ||
|
||
class Font implements \Magento\Framework\Option\ArrayInterface | ||
{ | ||
/** | ||
* Captcha data | ||
* | ||
* @var \Magento\Captcha\Helper\Data | ||
*/ | ||
protected $_captchaData = null; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
|
||
/** | ||
* Data source to fill "Forms" field | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
namespace Magento\Captcha\Model\Config\Form; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
|
||
/** | ||
* Captcha image model | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
namespace Magento\Captcha\Model\Config\Form; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
|
||
/** | ||
* Captcha image model | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
namespace Magento\Captcha\Model\Config\Form; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
|
||
/** | ||
* Captcha image model | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
namespace Magento\Captcha\Model\Config; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,24 +7,20 @@ | |
|
||
/** | ||
* Log Attempts resource | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
class Log extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb | ||
{ | ||
/** | ||
* Remote Address log type | ||
*/ | ||
const TYPE_REMOTE_ADDRESS = 1; | ||
public const TYPE_REMOTE_ADDRESS = 1; | ||
|
||
/** | ||
* Type User Login Name | ||
*/ | ||
const TYPE_LOGIN = 2; | ||
public const TYPE_LOGIN = 2; | ||
|
||
/** | ||
* Core Date | ||
* | ||
* @var \Magento\Framework\Stdlib\DateTime\DateTime | ||
*/ | ||
protected $_coreDate; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,6 @@ | |
|
||
/** | ||
* CMS page chooser for Wysiwyg CMS widget | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
class Chooser extends \Magento\Backend\Block\Widget\Grid\Extended | ||
{ | ||
|
@@ -65,7 +63,7 @@ public function __construct( | |
protected function _construct() | ||
{ | ||
parent::_construct(); | ||
//$this->setDefaultSort('name'); | ||
|
||
$this->setUseAjax(true); | ||
$this->setDefaultFilter(['chooser_is_active' => '1']); | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,6 @@ | |
|
||
/** | ||
* New directory block for Wysiwyg Images | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
class Newfolder extends \Magento\Backend\Block\Template | ||
{ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,6 @@ | |
|
||
/** | ||
* Cms Static Block Widget | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
class Block extends \Magento\Framework\View\Element\Template implements BlockInterface, IdentityInterface | ||
{ | ||
|
@@ -33,8 +31,6 @@ class Block extends \Magento\Framework\View\Element\Template implements BlockInt | |
protected static $_widgetUsageMap = []; | ||
|
||
/** | ||
* Block factory | ||
* | ||
* @var \Magento\Cms\Model\BlockFactory | ||
*/ | ||
protected $_blockFactory; | ||
|
@@ -77,19 +73,18 @@ protected function _beforeToHtml() | |
if (isset(self::$_widgetUsageMap[$blockHash])) { | ||
return $this; | ||
} | ||
|
||
self::$_widgetUsageMap[$blockHash] = true; | ||
|
||
$block = $this->getBlock(); | ||
|
||
if ($block && $block->isActive()) { | ||
try { | ||
$storeId = $this->getData('store_id') ?? $this->_storeManager->getStore()->getId(); | ||
$this->setText( | ||
$this->_filterProvider->getBlockFilter()->setStoreId($storeId)->filter($block->getContent()) | ||
); | ||
} catch (NoSuchEntityException $e) { | ||
} | ||
$storeId = $this->getData('store_id') ?? $this->_storeManager->getStore()->getId(); | ||
$this->setText( | ||
$this->_filterProvider->getBlockFilter()->setStoreId($storeId)->filter($block->getContent()) | ||
); | ||
} | ||
|
||
unset(self::$_widgetUsageMap[$blockHash]); | ||
return $this; | ||
} | ||
|
@@ -124,16 +119,13 @@ private function getBlock(): ?CmsBlock | |
$blockId = $this->getData('block_id'); | ||
|
||
if ($blockId) { | ||
try { | ||
$storeId = $this->_storeManager->getStore()->getId(); | ||
/** @var \Magento\Cms\Model\Block $block */ | ||
$block = $this->_blockFactory->create(); | ||
$block->setStoreId($storeId)->load($blockId); | ||
$this->block = $block; | ||
|
||
return $block; | ||
} catch (NoSuchEntityException $e) { | ||
} | ||
$storeId = $this->_storeManager->getStore()->getId(); | ||
/** @var \Magento\Cms\Model\Block $block */ | ||
$block = $this->_blockFactory->create(); | ||
$block->setStoreId($storeId)->load($blockId); | ||
$this->block = $block; | ||
|
||
return $block; | ||
} | ||
|
||
return null; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,6 @@ | |
|
||
/** | ||
* Images manage controller for Cms WYSIWYG editor | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
abstract class Images extends \Magento\Backend\App\Action | ||
{ | ||
|
@@ -17,11 +15,9 @@ abstract class Images extends \Magento\Backend\App\Action | |
* | ||
* @see _isAllowed() | ||
*/ | ||
const ADMIN_RESOURCE = 'Magento_Cms::media_gallery'; | ||
public const ADMIN_RESOURCE = 'Magento_Cms::media_gallery'; | ||
|
||
/** | ||
* Core registry | ||
* | ||
* @var \Magento\Framework\Registry | ||
*/ | ||
protected $_coreRegistry = null; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fredden I think this change could have influence on current implementation. Or you are sure that NoSuchEntityException never is thrown? If you are i'll approve it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have restored the existing code here to ensure that this pull request does not inadvertently change behaviour. I initially removed it because the linter detected the empty
catch
block and complained. I didn't see a good reason at the time to keep the block. I agree that removing it is a behaviour change which is out of scope for this particular pull request. I'll let others fix the code when they are ready to do so. Thanks for highlighting this out-of-scope change.