@@ 875-886 (lines=12) @@ | ||
872 | ); |
|
873 | $query = 'SELECT id, guid FROM ' . $dbase . '`' . $sqlParser->prefix . 'site_modules` WHERE name="' . $dependency['module'] . '"'; |
|
874 | $ds = mysqli_query($sqlParser->conn, $query); |
|
875 | if (!$ds) { |
|
876 | $installDependencyLevel[$dependency['module']]['error'] = array( |
|
877 | 'type' => 'sql', |
|
878 | 'content' => mysqli_error($sqlParser->conn) |
|
879 | ); |
|
880 | $errorInstall = true; |
|
881 | break; |
|
882 | } else { |
|
883 | $row = mysqli_fetch_assoc($ds); |
|
884 | $moduleId = $row["id"]; |
|
885 | $moduleGuid = $row["guid"]; |
|
886 | } |
|
887 | // get extra id |
|
888 | $query = 'SELECT id FROM ' . $dbase . '`' . $sqlParser->prefix . 'site_' . $dependency['table'] . '` WHERE ' . $dependency['column'] . '="' . $dependency['name'] . '"'; |
|
889 | $ds = mysqli_query($sqlParser->conn, $query); |
|
@@ 890-900 (lines=11) @@ | ||
887 | // get extra id |
|
888 | $query = 'SELECT id FROM ' . $dbase . '`' . $sqlParser->prefix . 'site_' . $dependency['table'] . '` WHERE ' . $dependency['column'] . '="' . $dependency['name'] . '"'; |
|
889 | $ds = mysqli_query($sqlParser->conn, $query); |
|
890 | if (!$ds) { |
|
891 | $installDependencyLevel[$dependency['module']]['error'] = array( |
|
892 | 'type' => 'sql', |
|
893 | 'content' => mysqli_error($sqlParser->conn) |
|
894 | ); |
|
895 | $errorInstall = true; |
|
896 | break; |
|
897 | } else { |
|
898 | $row = mysqli_fetch_assoc($ds); |
|
899 | $extraId = $row["id"]; |
|
900 | } |
|
901 | // setup extra as module dependency |
|
902 | $query = 'SELECT module FROM ' . $dbase . '`' . $sqlParser->prefix . 'site_module_depobj` WHERE module=' . $moduleId . ' AND resource=' . $extraId . ' AND type=' . $dependency['type'] . ' LIMIT 1'; |
|
903 | $ds = mysqli_query($sqlParser->conn, $query); |