|
@@ 735-744 (lines=10) @@
|
| 732 |
|
`item_id` int(12) NOT NULL |
| 733 |
|
) CHARSET=utf8;" |
| 734 |
|
); |
| 735 |
|
} elseif ($task == "restriction_to_roles") { |
| 736 |
|
$mysqli_result = mysqli_query( |
| 737 |
|
$dbTmp, |
| 738 |
|
"CREATE TABLE IF NOT EXISTS `".$var['tbl_prefix']."restriction_to_roles` ( |
| 739 |
|
`role_id` int(12) NOT NULL, |
| 740 |
|
`item_id` int(12) NOT NULL, |
| 741 |
|
KEY `role_id_idx` (`role_id`) |
| 742 |
|
) CHARSET=utf8;" |
| 743 |
|
); |
| 744 |
|
} elseif ($task === "languages") { |
| 745 |
|
$mysqli_result = mysqli_query( |
| 746 |
|
$dbTmp, |
| 747 |
|
"CREATE TABLE IF NOT EXISTS `".$var['tbl_prefix']."languages` ( |
|
@@ 956-961 (lines=6) @@
|
| 953 |
|
|
| 954 |
|
// check that API doesn't exist |
| 955 |
|
$tmp = mysqli_num_rows(mysqli_query($dbTmp, "SELECT * FROM `".$var['tbl_prefix']."users` WHERE id = '".API_USER_ID."'")); |
| 956 |
|
if ($tmp == 0) { |
| 957 |
|
$mysqli_result = mysqli_query( |
| 958 |
|
$dbTmp, |
| 959 |
|
"INSERT INTO `".$var['tbl_prefix']."users` (`id`, `login`, `pw`, `groupes_visibles`, `derniers`, `key_tempo`, `last_pw_change`, `last_pw`, `admin`, `fonction_id`, `groupes_interdits`, `last_connexion`, `gestionnaire`, `email`, `favourites`, `latest_items`, `personal_folder`) VALUES ('".API_USER_ID."', 'API', '', '', '', '', '', '', '1', '', '', '', '0', '', '', '', '0')" |
| 960 |
|
); |
| 961 |
|
} |
| 962 |
|
|
| 963 |
|
// check that OTV doesn't exist |
| 964 |
|
$tmp = mysqli_num_rows(mysqli_query($dbTmp, "SELECT * FROM `".$var['tbl_prefix']."users` WHERE id = '".OTV_USER_ID."'")); |
|
@@ 965-970 (lines=6) @@
|
| 962 |
|
|
| 963 |
|
// check that OTV doesn't exist |
| 964 |
|
$tmp = mysqli_num_rows(mysqli_query($dbTmp, "SELECT * FROM `".$var['tbl_prefix']."users` WHERE id = '".OTV_USER_ID."'")); |
| 965 |
|
if ($tmp == 0) { |
| 966 |
|
$mysqli_result = mysqli_query( |
| 967 |
|
$dbTmp, |
| 968 |
|
"INSERT INTO `".$var['tbl_prefix']."users` (`id`, `login`, `pw`, `groupes_visibles`, `derniers`, `key_tempo`, `last_pw_change`, `last_pw`, `admin`, `fonction_id`, `groupes_interdits`, `last_connexion`, `gestionnaire`, `email`, `favourites`, `latest_items`, `personal_folder`) VALUES ('".OTV_USER_ID."', 'OTV', '', '', '', '', '', '', '1', '', '', '', '0', '', '', '', '0')" |
| 969 |
|
); |
| 970 |
|
} |
| 971 |
|
} |
| 972 |
|
} |
| 973 |
|
// answer back |