Changeset 11794 for extensions/Copyrights/batch_single.php
- Timestamp:
- Jul 21, 2011, 11:43:45 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Copyrights/batch_single.php
r11678 r11794 24 24 <td> 25 25 <select id="copyright-{$element.ID}" name="copyright-{$element.ID}"> 26 <option value=" 0">--</option>26 <option value="">--</option> 27 27 {html_options options=$CRoptions selected=$CRcopyrights[$element.ID]} 28 28 </select> … … 48 48 FROM %s 49 49 WHERE `visible`<>0 50 ORDER BY cr_id ASC 50 51 ;', 51 52 COPYRIGHTS_ADMIN); … … 92 93 COPYRIGHTS_MEDIA, implode(',', $collection)); 93 94 pwg_query($query); 94 95 } 95 96 96 97 // Add all copyrights to an array … … 100 101 $crID = pwg_db_real_escape_string($_POST['copyright-'.$image_id]); 101 102 102 array_push( 103 $edits, 104 array( 105 'media_id' => $image_id, 106 107 'cr_id' => $crID, 108 ) 103 // If you assign no copyright, dont put them in the table 104 if ($crID != '') { 105 array_push( 106 $edits, 107 array( 108 'media_id' => $image_id, 109 'cr_id' => $crID, 110 ) 111 ); 112 } 113 } 114 115 if (count($edits) > 0) { 116 // Insert the array to the database 117 mass_inserts( 118 COPYRIGHTS_MEDIA, // Table name 119 array_keys($edits[0]), // Columns 120 $edits // Data 109 121 ); 110 } 111 112 // Insert the array to the database 113 mass_inserts( 114 COPYRIGHTS_MEDIA, // Table name 115 array_keys($edits[0]), // Columns 116 $edits // Data 117 ); 122 } 118 123 } 119 124 }
Note: See TracChangeset
for help on using the changeset viewer.