Last active
August 29, 2015 13:59
-
-
Save shvind/10475150 to your computer and use it in GitHub Desktop.
Regenerate urls on modx revolution
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 | |
include 'config.core.php'; | |
include MODX_CORE_PATH . 'model/modx/modx.class.php'; | |
$modx = new modX(); | |
$modx->setLogTarget(XPDO_CLI_MODE ? 'ECHO' : 'HTML'); | |
$modx->initialize('mgr'); | |
$modx->setLogLevel(modX::LOG_LEVEL_INFO); | |
$modx->exec("UPDATE {$modx->getTableName('modResource')} SET uri = '' WHERE uri_override = 0"); | |
$modx->call('modResource', 'refreshURIs', array(&$modx)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment