This file contains 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\Controller\SinglePage; | |
use Concrete\Core\Http\Request; | |
use Concrete\Core\Http\Response; | |
use Core; | |
class Login extends \Concrete\Controller\SinglePage\Login | |
{ | |
public function on_start() |
This file contains 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'); |
This file contains 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 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 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 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 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 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 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 |