1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-29 04:50:51 +02:00

Merge branch 'develop-olympus' into develop

* develop-olympus:
  [ticket/10349] Removed duplicated functions from schema loading in tests
  [ticket/10349] Update function comment
  [ticket/10349] Use new schema comment function in installer
  [ticket/10349] Unit tests: Consolidate schema comment removal functions
  [ticket/10349] Unit tests: Remove comments while loading schema files
This commit is contained in:
Oleg Pudeyev
2011-12-03 22:25:32 -05:00
4 changed files with 17 additions and 88 deletions

View File

@@ -2294,41 +2294,6 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
return;
}
/**
* remove_comments will strip the sql comment lines out of an uploaded sql file
* specifically for mssql and postgres type files in the install....
*/
function remove_comments(&$output)
{
$lines = explode("\n", $output);
$output = '';
// try to keep mem. use down
$linecount = sizeof($lines);
$in_comment = false;
for ($i = 0; $i < $linecount; $i++)
{
if (trim($lines[$i]) == '/*')
{
$in_comment = true;
}
if (!$in_comment)
{
$output .= $lines[$i] . "\n";
}
if (trim($lines[$i]) == '*/')
{
$in_comment = false;
}
}
unset($lines);
return $output;
}
/**
* Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username
* and group names must be carried through for the moderators table