-
-
Notifications
You must be signed in to change notification settings - Fork 447
Added robots configuration #1609
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
dbachmann
wants to merge
35
commits into
OpenMage:main
Choose a base branch
from
dbachmann:improved_robots_config
base: main
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 11 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
5f01ac9
Fixed conflicts
fballiano dc7fba6
Fixed license
fballiano 2a6c165
whitespace
fballiano b63d423
already defined
fballiano c9b2f87
Merge branch 'main' into improved_robots_config
fballiano 57d9d50
Merge main branch and fixed conflict
fballiano a3ec6cf
PHPCS
fballiano 713a9e4
PHPCS
fballiano eb03b46
phpstan
fballiano 9011ccd
short array syntax
fballiano 03a3572
Update app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design…
fballiano 9aa1a09
short array syntax
fballiano 1665469
whitespace
fballiano 1dfeeb7
whitespace
fballiano 67d5a18
Merge branch 'OpenMage:main' into improved_robots_config
dbachmann 4d86bfd
typo
fballiano 139484d
typo
fballiano 4938bb9
typo
fballiano ce4ccfa
typo
fballiano 08b582e
typo
fballiano b2946c6
typo
fballiano f999795
whitespace
fballiano f34ebd3
whitespace
fballiano da6fffc
typo
fballiano d13948d
typo
fballiano a54a0a5
typo
fballiano 4134b10
license text
fballiano 5b440e6
license
fballiano b5a41c1
license
fballiano 49e504f
typo
fballiano 057ef6e
typo
fballiano 4e7054a
typo
fballiano ff9f6cb
typo
fballiano 0d6bbd6
typo
fballiano 2af2ce1
Merge branch 'OpenMage:main' into improved_robots_config
dbachmann 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
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
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
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
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
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
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
69 changes: 69 additions & 0 deletions
69
app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Robots.php
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
/** | ||
* OpenMage | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available at https://opensource.org/license/osl-3-0-php | ||
* | ||
* @category Mage | ||
* @package Mage_Catalog | ||
* @copyright Copyright (c) 2023 The OpenMage Contributors (https://www.openmage.org) | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
/** | ||
* Catalog category robots attribute source | ||
* | ||
* @category Mage | ||
* @package Mage_Catalog | ||
*/ | ||
class Mage_Catalog_Model_Category_Attribute_Source_Robots extends Mage_Eav_Model_Entity_Attribute_Source_Abstract | ||
{ | ||
/** | ||
* @return array | ||
*/ | ||
public function getAllOptions() | ||
{ | ||
return [ | ||
Mage_Catalog_Model_Category::META_ROBOTS_INDEX_FOLLOW => [ | ||
'value' => Mage_Catalog_Model_Category::META_ROBOTS_INDEX_FOLLOW, | ||
'label' => Mage::helper('cms')->__('INDEX,FOLLOW') | ||
], | ||
Mage_Catalog_Model_Category::META_ROBOTS_INDEX_NOFOLLOW => [ | ||
'value' => Mage_Catalog_Model_Category::META_ROBOTS_INDEX_NOFOLLOW, | ||
'label' => Mage::helper('cms')->__('INDEX,NOFOLLOW') | ||
], | ||
Mage_Catalog_Model_Category::META_ROBOTS_NOINDEX_FOLLOW => [ | ||
'value' => Mage_Catalog_Model_Category::META_ROBOTS_NOINDEX_FOLLOW, | ||
'label' => Mage::helper('cms')->__('NOINDEX,FOLLOW') | ||
], | ||
Mage_Catalog_Model_Category::META_ROBOTS_NOINDEX_NOFOLLOW => [ | ||
'value' => Mage_Catalog_Model_Category::META_ROBOTS_NOINDEX_NOFOLLOW, | ||
'label' => Mage::helper('cms')->__('NOINDEX,NOFOLLOW') | ||
], | ||
Mage_Catalog_Model_Category::META_ROBOTS_INDEX_FOLLOW_NOARCHIVE => [ | ||
'value' => Mage_Catalog_Model_Category::META_ROBOTS_INDEX_FOLLOW_NOARCHIVE, | ||
'label' => Mage::helper('cms')->__('INDEX,FOLLOW,NOARCHIVE') | ||
], | ||
Mage_Catalog_Model_Category::META_ROBOTS_INDEX_NOFOLLOW_NOARCHIVE => [ | ||
'value' => Mage_Catalog_Model_Category::META_ROBOTS_INDEX_NOFOLLOW_NOARCHIVE, | ||
'label' => Mage::helper('cms')->__('INDEX,NOFOLLOW,NOARCHIVE') | ||
], | ||
Mage_Catalog_Model_Category::META_ROBOTS_NOINDEX_NOFOLLOW_NOARCHIVE => [ | ||
'value' => Mage_Catalog_Model_Category::META_ROBOTS_NOINDEX_NOFOLLOW_NOARCHIVE, | ||
'label' => Mage::helper('cms')->__('NOINDEX,NOFOLLOW,NOARCHIVE') | ||
] | ||
]; | ||
} | ||
|
||
/** | ||
* @param int $key | ||
* @return string | ||
*/ | ||
public function getOptionLabel($key) | ||
{ | ||
$options = $this->getAllOptions(); | ||
return $options[$key]['label']; | ||
} | ||
} |
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
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
77 changes: 77 additions & 0 deletions
77
app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Robots.php
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?php | ||
/** | ||
* OpenMage | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available at https://opensource.org/license/osl-3-0-php | ||
* | ||
* @category Mage | ||
* @package Mage_Catalog | ||
* @copyright Copyright (c) 2023 The OpenMage Contributors (https://www.openmage.org) | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
/** | ||
* Catalog product robots attribute source | ||
* | ||
* @category Mage | ||
* @package Mage_Catalog | ||
*/ | ||
class Mage_Catalog_Model_Product_Attribute_Source_Robots extends Mage_Eav_Model_Entity_Attribute_Source_Abstract | ||
{ | ||
/** | ||
* @return array | ||
*/ | ||
public function getAllOptions() | ||
{ | ||
return array( | ||
Mage_Catalog_Model_Product::META_ROBOTS_INDEX_FOLLOW => | ||
array( | ||
'value' => Mage_Catalog_Model_Product::META_ROBOTS_INDEX_FOLLOW, | ||
'label' => Mage::helper('cms')->__('INDEX,FOLLOW') | ||
), | ||
Mage_Catalog_Model_Product::META_ROBOTS_INDEX_NOFOLLOW => | ||
array( | ||
'value' => Mage_Catalog_Model_Product::META_ROBOTS_INDEX_NOFOLLOW, | ||
'label' => Mage::helper('cms')->__('INDEX,NOFOLLOW') | ||
), | ||
Mage_Catalog_Model_Product::META_ROBOTS_NOINDEX_FOLLOW => | ||
array( | ||
'value' => Mage_Catalog_Model_Product::META_ROBOTS_NOINDEX_FOLLOW, | ||
'label' => Mage::helper('cms')->__('NOINDEX,FOLLOW') | ||
), | ||
Mage_Catalog_Model_Product::META_ROBOTS_NOINDEX_NOFOLLOW => | ||
array( | ||
'value' => Mage_Catalog_Model_Product::META_ROBOTS_NOINDEX_NOFOLLOW, | ||
'label' => Mage::helper('cms')->__('NOINDEX,NOFOLLOW') | ||
), | ||
Mage_Catalog_Model_Product::META_ROBOTS_INDEX_FOLLOW_NOARCHIVE => | ||
array( | ||
'value' => Mage_Catalog_Model_Product::META_ROBOTS_INDEX_FOLLOW_NOARCHIVE, | ||
'label' => Mage::helper('cms')->__('INDEX,FOLLOW,NOARCHIVE') | ||
), | ||
Mage_Catalog_Model_Product::META_ROBOTS_INDEX_NOFOLLOW_NOARCHIVE => | ||
array( | ||
'value' => Mage_Catalog_Model_Product::META_ROBOTS_INDEX_NOFOLLOW_NOARCHIVE, | ||
'label' => Mage::helper('cms')->__('INDEX,NOFOLLOW,NOARCHIVE') | ||
), | ||
Mage_Catalog_Model_Product::META_ROBOTS_NOINDEX_NOFOLLOW_NOARCHIVE => | ||
array( | ||
'value' => Mage_Catalog_Model_Product::META_ROBOTS_NOINDEX_NOFOLLOW_NOARCHIVE, | ||
'label' => Mage::helper('cms')->__('NOINDEX,NOFOLLOW,NOARCHIVE') | ||
), | ||
); | ||
} | ||
|
||
/** | ||
* @param int $key | ||
* @return string | ||
*/ | ||
public function getOptionLabel($key) | ||
{ | ||
$options = $this->getAllOptions(); | ||
|
||
return $options[$key]['label']; | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.
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.