diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2004-08-04 19:10:15 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2004-08-04 19:10:15 +0000 |
commit | 5dcc0a85f845a214712d015199b11ebddff14437 (patch) | |
tree | 100c725b1fd60687ccfa277a8582b6df27e360cd /phpBB/includes/functions_admin.php | |
parent | 427cc1bf36f6a4a988b7ed53668266964a96746a (diff) | |
download | forums-5dcc0a85f845a214712d015199b11ebddff14437.tar forums-5dcc0a85f845a214712d015199b11ebddff14437.tar.gz forums-5dcc0a85f845a214712d015199b11ebddff14437.tar.bz2 forums-5dcc0a85f845a214712d015199b11ebddff14437.tar.xz forums-5dcc0a85f845a214712d015199b11ebddff14437.zip |
- fixing some issues with the confirm screen - merging our (the devs) approaches (more fail-safe now)
- fixing some small issues...
git-svn-id: file:///svn/phpbb/trunk@4957 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r-- | phpBB/includes/functions_admin.php | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 0507d68c40..097a7769fc 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -1481,30 +1481,7 @@ function remove_comments(&$output) // remove_remarks will strip the sql comment lines out of an uploaded sql file function remove_remarks($sql) { - // NOTE: isn't this function actually doing -// return preg_replace('/(\n){2,}/', "\n", preg_replace('/^#.*/m', "\n", $sql)); - // ? - - $lines = explode("\n", $sql); - - // try to keep mem. use down - $sql = ''; - - $linecount = count($lines); - $output = ''; - - for ($i = 0; $i < $linecount; $i++) - { - if ($i != $linecount - 1 || strlen($lines[$i]) > 0) - { - $output .= ($lines[$i]{0} != '#') ? $lines[$i] . "\n" : "\n"; - // Trading a bit of speed for lower mem. use here. - $lines[$i] = ''; - } - } - - return $output; - + return preg_replace('/(\n){2,}/', "\n", preg_replace('/^#.*/m', "\n", $sql)); } // split_sql_file will split an uploaded sql file into single sql statements. @@ -2044,6 +2021,7 @@ if (class_exists('auth')) $this->acl_clear_prefetch(); } + // NOTE: this function is not in use atm // Add a new option to the list ... $options is a hash of form -> // $options = array( // 'local' => array('option1', 'option2', ...), @@ -2051,9 +2029,9 @@ if (class_exists('auth')) //); function acl_add_option($options) { - global $db; + global $db, $cache; - if (!is_array($new_options)) + if (!is_array($options)) { trigger_error('Incorrect parameter for acl_add_option', E_USER_ERROR); } @@ -2079,15 +2057,10 @@ if (class_exists('auth')) } $db->sql_freeresult($result); - if (!is_array($options)) - { - trigger_error('Incorrect parameter for acl_add_option', E_USER_ERROR); - } - // Here we need to insert new options ... this requires discovering whether // an options is global, local or both and whether we need to add an option // type flag (x_) - $new_options = array(); + $new_options = array('local' => array(), 'global' => array()); foreach ($options as $type => $option_ary) { $option_ary = array_unique($option_ary); |