Source for file newnames.php
Documentation is available at newnames.php
require_once $_SERVER["DOCUMENT_ROOT"]. "/admin/lib/controller/all.inc";
require_once $_SERVER["DOCUMENT_ROOT"]. "/admin/lib/view/alluser.inc";
$sites = $engine->getSites();
$articles = $i->getArticles();
foreach ($articles as $j){
print "Redirect permanent /". $ua->GetOldFileName(). " http://www.moioli.net". $ua->getFileName(). "\n";
$categories = $i->getCategories();
foreach ($categories as $j){
print "Redirect permanent /". $uc->GetOldFileName(). " http://www.moioli.net". $uc->getFileName(). "\n";
print "Redirect permanent /". $uh->GetOldFileName(). " http://www.moioli.net". $uh->getFileName(). "\n";
print "Redirect permanent /". $um->GetOldFileName(). " http://www.moioli.net". $um->getFileName(). "\n";
print "Redirect permanent /". $un->GetOldFileName(). " http://www.moioli.net". $un->getFileName(). "\n";
print "--------------------------------------\n";
$sites = $engine->getSites();
$articles = $i->getArticles();
foreach ($articles as $j){
print "sed \"s#". $ua->GetOldFileName(). "#". $ua->getFileName(). "#g\" <\$file >temp\nmv -f temp \$file\n";
$categories = $i->getCategories();
foreach ($categories as $j){
print "sed \"s#". $uc->GetOldFileName(). "#". $uc->getFileName(). "#g\" <\$file >temp\nmv -f temp \$file\n";
print "sed \"s#". $uh->GetOldFileName(). "#". $uh->getFileName(). "#g\" <\$file >temp\nmv -f temp \$file\n";
print "sed \"s#". $um->GetOldFileName(). "#". $um->getFileName(). "#g\" <\$file >temp\nmv -f temp \$file\n";
print "sed \"s#". $un->GetOldFileName(). "#". $un->getFileName(). "#g\" <\$file >temp\nmv -f temp \$file\n";
|