Changeset 294:5d67ddc42592
- Timestamp:
- 05/18/11 11:47:37 (14 years ago)
- Branch:
- 2.3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/importExport/inc/flat/class.dc.import.php
r270 r294 371 371 private function insertPref($pref) 372 372 { 373 if ($this->prefExists($pref->pref_ws,$pref->pref_id,$pref->user_id)) { 374 return; 375 } 376 373 377 $this->cur_pref->clean(); 374 378 … … 751 755 $this->stack['users'][$user_id] = !$rs->isEmpty(); 752 756 return $this->stack['users'][$user_id]; 757 } 758 759 private function prefExists($pref_id,$pref_ws,$user_id) 760 { 761 $strReq = 'SELECT pref_id,pref_ws,user_id '. 762 'FROM '.$this->prefix.'pref '. 763 "WHERE pref_id = '".$this->con->escape($pref_id)."' ". 764 "AND pref_ws = '".$this->con->escape($pref_ws)."' "; 765 if (!$user_id) { 766 $strReq .= "AND user_id IS NULL "; 767 } else { 768 $strReq .= "AND user_id = '".$this->con->escape($user_id)."' "; 769 } 770 771 $rs = $this->con->select($strReq); 772 773 return !$rs->isEmpty(); 753 774 } 754 775
Note: See TracChangeset
for help on using the changeset viewer.