public static function getListingFieldsInfoByParentSID($field_sid)
 {
     return SJB_ListingFieldDBManager::getListingFieldsInfoByParentSID($field_sid);
 }
Exemplo n.º 2
0
 public static function setComplexFields(&$listing_field_info)
 {
     switch ($listing_field_info['type']) {
         case 'list':
         case 'multilist':
             if (!empty($listing_field_info['parent_sid'])) {
                 if ($listing_field_info['id'] == 'Country') {
                     $displayAS = !empty($listing_field_info['display_as']) ? $listing_field_info['display_as'] : 'country_name';
                     $listing_field_info['list_values'] = SJB_CountriesManager::getAllCountriesCodesAndNames(true, $displayAS);
                 }
             } else {
                 $listing_field_info['list_values'] = SJB_ListingFieldDBManager::getListValuesBySID($listing_field_info['sid']);
             }
             break;
         case 'tree':
             $listing_field_info['tree_values'] = SJB_ListingFieldDBManager::getTreeValuesBySID($listing_field_info['sid']);
             $listing_field_info['tree_depth'] = SJB_ListingFieldDBManager::getTreeDepthBySID($listing_field_info['sid']);
             break;
         case 'monetary':
             $listing_field_info['currency_values'] = SJB_CurrencyManager::getActiveCurrencyList();
             break;
         case 'complex':
             $listing_field_info['fields'] = SJB_ListingFieldDBManager::getListingFieldsInfoByParentSID($listing_field_info['sid']);
             $listing_field_info['table_name'] = 'listings';
             break;
         case 'location':
             $listing_field_info['fields'] = SJB_ListingFieldManager::getListingFieldsInfoByParentSID($listing_field_info['sid']);
             break;
         case 'geo':
             if (isset($listing_field_info['parent_sid'])) {
                 $parentID = SJB_DB::queryValue("SELECT `id` FROM `listing_fields` WHERE `sid` = ?n", $listing_field_info['parent_sid']);
                 $listing_field_info['parentID'] = $parentID;
             }
             break;
     }
     $listing_field_info['is_classifieds'] = 1;
 }