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
<?php | |
/** | |
* Usage: | |
* concrete/bin/concrete5 c5:exec bulk_change_page_template.php old_page_template_handle /parent-page-path new_page_template_handle | |
*/ | |
$filterPageTemplateHandle = $args[0]; | |
$filterPagePath = $args[1]; | |
$changePageTemplateHandle = $args[2]; |
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
# Set the bucket name and date limit that you want to scan for... | |
# | |
# For example, if you deleted everything at 9'ish, set the DATE_LIMIT for a | |
# few minutes before to ensure you find only the stuff you deleted by error | |
# | |
BUCKET_NAME="..." | |
DATE_LIMIT="0000-00-00T00:00:00.000Z" | |
aws s3api list-object-versions --bucket "${BUCKET_NAME}" > objects.json | |
cat objects.json | jq --arg DATE_LIMIT "${DATE_LIMIT}" '[ .DeleteMarkers[] | select(.LastModified > $DATE_LIMIT and .IsLatest) | { file: .Key, version: .VersionId } ]' > markers-to-delete.json |
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
<?php | |
// application/src/Console/Command/StatusCodeCheck.php | |
namespace Application\Console\Command; | |
use Concrete\Core\Console\Command; | |
use Concrete\Core\Database\Connection\Connection; | |
use Concrete\Core\Http\Client\Client; | |
use Concrete\Core\Page\Page; | |
use Concrete\Core\Support\Facade\Application; | |
use Concrete\Core\Url\Url; |
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
<?php | |
// application/src/Console/Command/StatusCodeCheck.php | |
namespace Application\Console\Command; | |
use Concrete\Core\Console\Command; | |
use Concrete\Core\Database\Connection\Connection; | |
use Concrete\Core\Http\Client\Client; | |
use Concrete\Core\Page\Page; | |
use Concrete\Core\Support\Facade\Application; | |
use Concrete\Core\Url\Url; |
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
<?php | |
// application/src/Concrete/Console/Command/GenerateTestContents.php | |
namespace Application\Concrete\Console\Command; | |
use Concrete\Core\Block\BlockType\BlockType; | |
use Concrete\Core\Cache\CacheClearer; | |
use Concrete\Core\Console\Command; | |
use Concrete\Core\File\Importer; | |
use Concrete\Core\Page\Page; |
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
<?php | |
namespace Application\Block\ExpressEntryList; | |
use Concrete\Core\Express\Entry\Search\Result\Result; | |
use Concrete\Core\Express\EntryList; | |
class Controller extends \Concrete\Block\ExpressEntryList\Controller | |
{ | |
public function view() |
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
<?php | |
// application/bootstrap/app.php | |
/** @var \Concrete\Core\Validator\ValidatorManagerInterface $passwordValidator */ | |
$passwordValidator = Core::make('validator/password'); | |
/** @var \Concrete\Core\Validator\String\RegexValidator $regexValidator */ | |
$regexValidator = Core::make( | |
\Concrete\Core\Validator\String\RegexValidator::class, | |
['/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'] | |
); |
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
<?php | |
namespace Application\Job; | |
use Concrete\Core\File\Importer; | |
use Concrete\Core\Job\QueueableJob; | |
use ZendQueue\Message as ZendQueueMessage; | |
use ZendQueue\Queue as ZendQueue; | |
class ImportFiles extends QueueableJob | |
{ |
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
<?php | |
class ScanDuplicateFileName extends QueueableJob | |
{ | |
public $jNotUninstallable=0; | |
public $jSupportsQueue = true; | |
public function getJobName() | |
{ | |
return t('Scan Duplicate File Name'); |
NewerOlder