Skip to content

Commit

Permalink
[#29677] robots.txt in updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dextercowley authored and Michael Babker committed Mar 17, 2013
1 parent 163c944 commit 1f37e4c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/build.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"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,
);
Expand Down Expand Up @@ -143,7 +143,7 @@

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');
Expand Down
1 change: 1 addition & 0 deletions installation/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions installation/controller/removefolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ public function execute()
}
}

// 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
Expand All @@ -96,6 +108,13 @@ public function execute()
*/
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();
}

Expand Down
File renamed without changes.

0 comments on commit 1f37e4c

Please sign in to comment.