mirror of
https://github.com/joomla/joomla-cms.git
synced 2024-06-20 19:15:27 +00:00
[#29677] robots.txt in updates
This commit is contained in:
parent
163c9449ee
commit
1f37e4c7ac
|
@ -93,7 +93,7 @@ $filesArray = array(
|
|||
"index.php\n" => true,
|
||||
"LICENSE.txt\n" => true,
|
||||
"README.txt\n" => true,
|
||||
"robots.txt\n" => true,
|
||||
"robots.txt.dist\n" => true,
|
||||
"web.config.txt\n" => true,
|
||||
"joomla.xml\n" => true,
|
||||
);
|
||||
|
@ -143,7 +143,7 @@ for($num=$release-1; $num >= 0; $num--) {
|
|||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$fromName = $num == 0 ? 'x' : $num;
|
||||
// Create the diff archive packages using the file name list.
|
||||
system('tar --create --bzip2 --no-recursion --directory '.$full.' --file packages'.$version.'/Joomla_'.$version.'.'.$fromName.'_to_'.$full.'-Stable-Patch_Package.tar.bz2 --files-from diffconvert/'.$version.'.'.$num . '> /dev/null');
|
||||
|
|
|
@ -30,6 +30,7 @@ $ -> Language fix or change
|
|||
^ [#30262] Add PostgreSQL schema for tags, sync with MySQL, update script additions
|
||||
+ [#30251] Add single tag feed view. Thanks Elin
|
||||
# [#30256] Error in field mapping for contact. Thanks Elin
|
||||
#+ [#29677] robots.txt in updates. Thanks Mark
|
||||
|
||||
17-Mar-2013 Jean-Marie Simonet
|
||||
# [#30121] Save as copy does not work in com_weblinks, com_contacts, com_newsfeeds. Thanks Lemings
|
||||
|
|
|
@ -85,6 +85,18 @@ class InstallationControllerRemovefolder extends JControllerBase
|
|||
}
|
||||
}
|
||||
|
||||
// Rename the robots.txt.dist file to robots.txt
|
||||
if ($return)
|
||||
{
|
||||
$robotsFile = JPath::clean($options->ftp_root . '/robots.txt');
|
||||
$distFile = JPath::clean($options->ftp_root . '/robots.txt.dist');
|
||||
|
||||
if (!file_exists($robotsFile) && file_exists($distFile))
|
||||
{
|
||||
$return = $ftp->rename($distFile, $robotsFile);
|
||||
}
|
||||
}
|
||||
|
||||
$ftp->quit();
|
||||
}
|
||||
else
|
||||
|
@ -96,6 +108,13 @@ class InstallationControllerRemovefolder extends JControllerBase
|
|||
*/
|
||||
ob_start();
|
||||
$return = JFolder::delete($path) && (!file_exists(JPATH_ROOT . '/joomla.xml') || JFile::delete(JPATH_ROOT . '/joomla.xml'));
|
||||
|
||||
// Rename the robots.txt.dist file if robots.txt doesn't exist
|
||||
if ($return && !file_exists(JPATH_ROOT . '/robots.txt') && file_exists(JPATH_ROOT . '/robots.txt.dist'))
|
||||
{
|
||||
$return = JFile::move(JPATH_ROOT . '/robots.txt.dist', JPATH_ROOT . '/robots.txt');
|
||||
}
|
||||
|
||||
ob_end_clean();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user