Skip to content

Commit

Permalink
Revert "remove MYSQLI_ASSOC"
Browse files Browse the repository at this point in the history
  • Loading branch information
Colinax committed Dec 29, 2020
1 parent 3c70917 commit b152e38
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions wbce/modules/addon_monitor/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ function getModulesArray(){
$mod_name = '';
$module_name = '';
// Loop through addons
while($aRec = $oAddons->fetchRow()){
while($aRec = $oAddons->fetchRow(MYSQLI_ASSOC)){
// grab for page_id's and section_id's if Addon is a PAGE TYPE MODULE
if($aRec['function'] == 'page'){
++$aAddons['count_pagemodules'];
if($aRec['active'] == 'Y'){
$sQueryActiveSections = ("SELECT `section_id`, `page_id` FROM `".TABLE_PREFIX."sections` WHERE `module` = '".$aRec['directory']."'");
if($oActiveSections = $database->query($sQueryActiveSections)){
while($aSections = $oActiveSections->fetchRow()){
while($aSections = $oActiveSections->fetchRow(MYSQLI_ASSOC)){
$aRec['active_sections'][$aSections['section_id']] = $aSections['page_id'];
}
}
Expand Down Expand Up @@ -110,15 +110,15 @@ function getTemplatesArray(){

if($oAddons = $database->query($sQueryAddons)){
// Loop through addons
while($aRec = $oAddons->fetchRow()){
while($aRec = $oAddons->fetchRow(MYSQLI_ASSOC)){
// grab for page_id's Addon is used on different pages
if($aRec['function'] == 'template'){
++$aAddons['count_pagetemplates'];
// grab for page_id's if Addon is used on different pages
if($aRec['active'] == 'Y'){
$sQueryActiveSections = ("SELECT `page_id` FROM `".TABLE_PREFIX."pages` WHERE `template` = '".$aRec['directory']."'");
if($oActiveSections = $database->query($sQueryActiveSections)){
while($aSections = $oActiveSections->fetchRow()){
while($aSections = $oActiveSections->fetchRow(MYSQLI_ASSOC)){
$aRec['active_pages'][] = $aSections['page_id'];
}
}
Expand Down Expand Up @@ -155,12 +155,12 @@ function getLanguagesArray(){

if($oAddons = $database->query($sQueryAddons)){
// Loop through addons
while($aRec = $oAddons->fetchRow()){
while($aRec = $oAddons->fetchRow(MYSQLI_ASSOC)){
// grab for page_id's if Addon is used on different pages
if($aRec['active'] == 'Y'){
$sQueryActiveSections = ("SELECT `page_id` FROM `".TABLE_PREFIX."pages` WHERE `language` = '".$aRec['directory']."'");
if($oActiveSections = $database->query($sQueryActiveSections)){
while($aSections = $oActiveSections->fetchRow()){
while($aSections = $oActiveSections->fetchRow(MYSQLI_ASSOC)){
$aRec['active_pages'][] = $aSections['page_id'];
}
}
Expand All @@ -178,4 +178,4 @@ function getLanguagesArray(){
}
return $aAddons;
}
}
}
4 changes: 2 additions & 2 deletions wbce/modules/droplets/functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function wbce_copy_droplet($droplet_id)
TABLE_PREFIX, $droplet_id
));

$fetch_content = $query_content->fetchRow();
$fetch_content = $query_content->fetchRow(MYSQLI_ASSOC);
$code = addslashes(str_replace($tags, '', $fetch_content['code']));
$new_name = $fetch_content['name'] . "_copy";
$name = $new_name;
Expand Down Expand Up @@ -438,7 +438,7 @@ function wbce_list_droplets()
if($query_droplets->numRows() > 0)
{
$list = array();
while ($droplet = $query_droplets->fetchRow())
while ($droplet = $query_droplets->fetchRow(MYSQLI_ASSOC))
{
if(is_array($droplet) && isset($droplet['name']))
{
Expand Down
2 changes: 1 addition & 1 deletion wbce/modules/droplets/tool.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"SELECT * FROM `%smod_droplets` WHERE `id` = '%d'",
TABLE_PREFIX, $droplet_id
));
$fetch_content = $query_content->fetchRow();
$fetch_content = $query_content->fetchRow(MYSQLI_ASSOC);

$twig_data['content'] = wbce_twig_display(
array('data'=>$fetch_content),
Expand Down
2 changes: 1 addition & 1 deletion wbce/modules/tool_account_settings/account/form_forgot.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
$sSql = "SELECT * FROM `{TP}users` WHERE `email`='".$sEmail."'";

if(($rRow = $database->query($sSql))){
if($aUser = $rRow->fetchRow()) {
if($aUser = $rRow->fetchRow(MYSQLI_ASSOC)) {
if(strlen($aUser['signup_confirmcode']) > 25){
header("Location: ".ACCOUNT_URL."/signup_continue_page.php?switch=wrong_inputs");
exit(0); // break up the script here
Expand Down
2 changes: 1 addition & 1 deletion wbce/modules/wbSeoTool/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function pagesArray($bProcessSeo = FALSE) {
$aPages = array();
$refs = array();
// create $aPages[] Array
while($page = $oPages->fetchRow()) {
while($page = $oPages->fetchRow(MYSQLI_ASSOC)) {
if (isset($page["ANY_VALUE(s.`module`)"])){
$page["module"] = $page["ANY_VALUE(s.`module`)"];
}
Expand Down

0 comments on commit b152e38

Please sign in to comment.