Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixes to Item.form.class.php #129

Closed
wants to merge 9 commits into from

3 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 13, 2011
  1. @juanramon

    v2.3.2

    juanramon authored
Commits on Dec 17, 2011
  1. @juanramon

    OSClass 2.3.3

    juanramon authored
Commits on Jan 3, 2012
  1. @conejoninja

    Merge branch 'hotfixes'

    conejoninja authored
  2. @conejoninja
Commits on Jan 4, 2012
  1. @conejoninja

    Merge branch 'hotfixes'

    conejoninja authored
  2. @conejoninja

    Merge branch 'hotfixes'

    conejoninja authored
Commits on Jan 16, 2012
  1. @juanramon

    OSClass 2.3.5

    juanramon authored
Commits on Jan 17, 2012
  1. @juanramon
Commits on Jan 22, 2012
  1. @trains58554
This page is out of date. Refresh to see the latest.
View
9 oc-includes/osclass/frm/Item.form.class.php
@@ -188,11 +188,10 @@ static public function currency_select($currencies = null, $item = null) {
$currency = osc_get_preference('currency');
if ( isset($item['fk_c_currency_code']) ) {
$default_key = $item['fk_c_currency_code'];
- } elseif ( is_array($currency) ) {
- if ( isset($currency['s_value']) ) {
- $default_key = $currency['s_value'];
- }
- }
+ } elseif ( isset($currency) ) {
+ $default_key = $currency;
+ }
+
parent::generic_select('currency', $currencies, 'pk_c_code', 's_description', null, $default_key) ;
} else if (count($currencies) == 1) {
View
6 oc-includes/osclass/model/Field.php
@@ -123,10 +123,10 @@ public function findByCategory($id)
*/
public function findByCategoryItem($catId, $itemId)
{
-
- if(!is_numeric($catId) || !is_numeric($itemId)) {
- return false;
+ if( !is_numeric($catId) || (!is_numeric($itemId) && $itemId != null) ) {
+ return array() ;
}
+
$result = $this->dao->query(sprintf("SELECT query.*, im.s_value as s_value FROM (SELECT mf.* FROM %st_meta_fields mf, %st_meta_categories mc WHERE mc.fk_i_category_id = %d AND mf.pk_i_id = mc.fk_i_field_id) as query LEFT JOIN %st_item_meta im ON im.fk_i_field_id = query.pk_i_id AND im.fk_i_item_id = %d", DB_TABLE_PREFIX, DB_TABLE_PREFIX, $catId, DB_TABLE_PREFIX, $itemId));
if( $result == false ) {
Something went wrong with that request. Please try again.