diff options
author | prashantsinalkar | 2017-08-22 12:20:35 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-08-22 12:20:35 +0530 |
commit | 017266777aa01e8713103b79e8b37805da9f2f38 (patch) | |
tree | 86c44ff0baa63f04d3417661014adbc1351712c4 | |
parent | b57ce9e853f3603659edf9ed4ce9233a94c8555c (diff) | |
download | textbook_companion_fixer-017266777aa01e8713103b79e8b37805da9f2f38.tar.gz textbook_companion_fixer-017266777aa01e8713103b79e8b37805da9f2f38.tar.bz2 textbook_companion_fixer-017266777aa01e8713103b79e8b37805da9f2f38.zip |
fixed category issues
-rwxr-xr-x | textbook_companion_fixer.module | 25 | ||||
-rw-r--r-- | textbook_companion_fixer_edit_book_category.inc | 3 |
2 files changed, 3 insertions, 25 deletions
diff --git a/textbook_companion_fixer.module b/textbook_companion_fixer.module index e26f2ee..bc8484c 100755 --- a/textbook_companion_fixer.module +++ b/textbook_companion_fixer.module @@ -1,5 +1,6 @@ <?php require_once('textbook_companion_fixer_email.inc'); +include('textbook_companion_fixer_edit_book_category.inc'); function textbook_companion_fixer_menu() { $items = array(); @@ -754,30 +755,6 @@ function scilab_fixer_code_form($form, &$form_state) ); return $form; } -function _tbc_fixer_list_of_category($category_id = NULL) -{ - $category[0] = "Please select"; - if ($category_id == NULL) - { - $query = db_select('list_of_category'); - $query->fields('list_of_category'); - $query->orderBy('id', 'ASC'); - $category_list = $query->execute(); - } //$category_id == NULL - else - { - $query = db_select('list_of_category'); - $query->fields('list_of_category'); - $query->condition('category_id', $category_id); - $query->orderBy('id', 'ASC'); - $category_list = $query->execute(); - } - while ($category_list_data = $category_list->fetchObject()) - { - $category[$category_list_data->category_id] = $category_list_data->category_name; - } //$category_list_data = $category_list->fetchObject() - return $category; -} function scilab_fixer_code_all() { $page_content = ""; diff --git a/textbook_companion_fixer_edit_book_category.inc b/textbook_companion_fixer_edit_book_category.inc index 9c534a5..e54e009 100644 --- a/textbook_companion_fixer_edit_book_category.inc +++ b/textbook_companion_fixer_edit_book_category.inc @@ -368,7 +368,8 @@ function _textbook_companion_fixer_list_of_subcategory($pref_id, $category_id) FROM list_of_subcategory los WHERE los.maincategory_id= :category_id AND los.subcategory_id NOT IN (SELECT los.subcategory_id as sub_id from list_of_subcategory los LEFT OUTER JOIN textbook_companion_book_main_subcategories tcbms - ON los.subcategory_id=tcbms.sub_category WHERE tcbms.pref_id= :pref_id ORDER BY sub_id) + ON los.subcategory_id=tcbms.sub_category WHERE tcbms.pref_id= :pref_id and tcbms.main_category=:category_id + ORDER BY sub_id) "; $args = array( ':pref_id' => $pref_id, |