| @@ 1943-1951 (lines=9) @@ | ||
| 1940 | ||
| 1941 | $themeData[] = array(0, 1, $variable, $value); |
|
| 1942 | } |
|
| 1943 | if (!empty($themeData)) |
|
| 1944 | { |
|
| 1945 | $smcFunc['db_insert']('ignore', |
|
| 1946 | $db_prefix . 'themes', |
|
| 1947 | array('id_member' => 'int', 'id_theme' => 'int', 'variable' => 'string', 'value' => 'string'), |
|
| 1948 | $themeData, |
|
| 1949 | array('id_member', 'id_theme', 'variable') |
|
| 1950 | ); |
|
| 1951 | } |
|
| 1952 | } |
|
| 1953 | ||
| 1954 | // This function only works with MySQL but that's fine as it is only used for v1.0. |
|
| @@ 223-231 (lines=9) @@ | ||
| 220 | cache_put_data('theme_settings-' . $id, null, 90); |
|
| 221 | } |
|
| 222 | ||
| 223 | if (!empty($setValues)) |
|
| 224 | { |
|
| 225 | $smcFunc['db_insert']('replace', |
|
| 226 | '{db_prefix}themes', |
|
| 227 | array('id_theme' => 'int', 'id_member' => 'int', 'variable' => 'string-255', 'value' => 'string-65534'), |
|
| 228 | $setValues, |
|
| 229 | array('id_theme', 'variable', 'id_member') |
|
| 230 | ); |
|
| 231 | } |
|
| 232 | ||
| 233 | redirectexit('action=admin;area=theme;sa=list;' . $context['session_var'] . '=' . $context['session_id']); |
|
| 234 | } |
|
| @@ 729-737 (lines=9) @@ | ||
| 726 | foreach ($_POST['default_options'] as $opt => $val) |
|
| 727 | $inserts[] = array(0, 1, $opt, is_array($val) ? implode(',', $val) : $val); |
|
| 728 | // If we're actually inserting something.. |
|
| 729 | if (!empty($inserts)) |
|
| 730 | { |
|
| 731 | $smcFunc['db_insert']('replace', |
|
| 732 | '{db_prefix}themes', |
|
| 733 | array('id_member' => 'int', 'id_theme' => 'int', 'variable' => 'string-255', 'value' => 'string-65534'), |
|
| 734 | $inserts, |
|
| 735 | array('id_member', 'id_theme', 'variable') |
|
| 736 | ); |
|
| 737 | } |
|
| 738 | ||
| 739 | cache_put_data('theme_settings-' . $_GET['th'], null, 90); |
|
| 740 | cache_put_data('theme_settings-1', null, 90); |
|
| @@ 1032-1040 (lines=9) @@ | ||
| 1029 | // If themeSetArray isn't still empty, send it to the database. |
|
| 1030 | if (empty($context['password_auth_failed'])) |
|
| 1031 | { |
|
| 1032 | if (!empty($themeSetArray)) |
|
| 1033 | { |
|
| 1034 | $smcFunc['db_insert']('replace', |
|
| 1035 | '{db_prefix}themes', |
|
| 1036 | array('id_member' => 'int', 'id_theme' => 'int', 'variable' => 'string-255', 'value' => 'string-65534'), |
|
| 1037 | $themeSetArray, |
|
| 1038 | array('id_member', 'id_theme', 'variable') |
|
| 1039 | ); |
|
| 1040 | } |
|
| 1041 | ||
| 1042 | if (!empty($erase_options)) |
|
| 1043 | { |
|