Перенос с Эво на Рево
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
TRUNCATE `modx_site_content`; | |
INSERT INTO `modx_site_content` | |
(`id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `content`, `richtext`, `template`, `menuindex`, `searchable`, `cacheable`, `createdby`, `createdon`, `editedby`, `editedon`, `deleted`, `deletedon`, `deletedby`, `publishedon`, `publishedby`, `menutitle`, `donthit`, `privateweb`, `privatemgr`, `content_dispo`, `hidemenu` ) | |
select `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `content`, `richtext`, `template`, `menuindex`, `searchable`, `cacheable`, `createdby`, `createdon`, `editedby`, `editedon`, `deleted`, `deletedon`, `deletedby`, `publishedon`, `publishedby`, `menutitle`, `donthit`, `privateweb`, `privatemgr`, `content_dispo`, `hidemenu` | |
from `old`.`modx_site_content`; | |
update `modx_site_content` | |
set class_key = 'modWebLink' | |
where type = 'reference'; | |
TRUNCATE `modx_site_templates`; | |
INSERT INTO `modx_site_templates` | |
(`id`, `templatename`, `description`, `editor_type`, `icon`, `template_type`, `content`, `locked` ) | |
select | |
`id`, `templatename`, `description`, `editor_type`, `icon`, `template_type`, `content`, `locked` | |
from `old`.`modx_site_templates`; | |
TRUNCATE `modx_site_tmplvars`; | |
INSERT INTO `modx_site_tmplvars` | |
(`id`, `type`, `name`, `caption`, `description`, `editor_type`, `locked`, `elements`, `rank`, `display`, `default_text`) | |
select | |
`id`, `type`, `name`, `caption`, `description`, `editor_type`, `locked`, `elements`, `rank`, `display`, `default_text` | |
from `old`.`modx_site_tmplvars`; | |
TRUNCATE `modx_site_tmplvar_contentvalues`; | |
INSERT INTO `modx_site_tmplvar_contentvalues` | |
SELECT * | |
FROM `old`.`modx_site_tmplvar_contentvalues`; | |
TRUNCATE `modx_site_tmplvar_templates`; | |
INSERT INTO `modx_site_tmplvar_templates` | |
SELECT * | |
FROM `old`.`modx_site_tmplvar_templates`; |
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 | |
$urls = array ( | |
); | |
foreach($urls as $id => $uri){ | |
if($doc = $modx->getObject("modResource", $id)){ | |
$doc->fromArray(array( | |
"uri" => $uri, | |
"uri_override" => 1, | |
)); | |
$doc->save(); | |
} | |
// break; | |
} |
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
print '<pre>'; | |
// print_r($modx->documentMap); | |
// print $modx->makeUrl(1617); | |
$urls = array(); | |
foreach($modx->documentMap as $a){ | |
$id = current($a); | |
if($id == 1) continue; | |
$urls[$id] = preg_replace('/^\/+/', '', $modx->makeUrl($id)); | |
// break; | |
} | |
var_export($urls); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment