Changeset 557 for trunk/plog-admin/plog-admin-functions.php
- Timestamp:
- 07/14/08 22:15:37 (4 years ago)
- File:
-
- 1 edited
-
trunk/plog-admin/plog-admin-functions.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plog-admin/plog-admin-functions.php
r556 r557 150 150 $result['output'] .= sprintf(plog_tr('Your photo (%s) was uploaded successfully.'),$filename); 151 151 $result['picture_id'] = mysql_insert_id(); 152 152 153 153 // let's generate the thumbnail and the large thumbnail right away. 154 154 // this way, the user won't see any latency from the thumbnail generation … … 156 156 // this also helps with the image pre-loading problem introduced 157 157 // by a javascript slideshow. 158 158 159 159 $thumbpath = generate_thumb($picture_path, $result['picture_id'],THUMB_SMALL); 160 160 #$thumbpath = generate_thumb($picture_path, $result['picture_id'],THUMB_LARGE); 161 161 162 162 return $result; 163 163 }; … … 187 187 188 188 $errors = $output = ""; 189 189 190 190 $picture_id = intval($picture_id); 191 191 $value = mysql_real_escape_string(trim($value)); 192 192 193 193 $query = "UPDATE ".TABLE_PREFIX."pictures SET $field = '$value' WHERE id='$picture_id'"; 194 194 195 195 $result = mysql_query($query); 196 196 if ($result) { … … 199 199 return array('errors' => plog_tr('Could not modify selected picture')); 200 200 }; 201 201 202 202 } 203 203 … … 215 215 return array('errors' => sprintf(plog_tr('There is no album with id %d'),$to_album)); 216 216 }; 217 217 218 218 $new_collection = $row['parent_id']; 219 219 … … 234 234 235 235 $new_path = mysql_real_escape_string($new_path); 236 236 237 237 // update database 238 238 $sql = "UPDATE ".TABLE_PREFIX."pictures SET … … 480 480 return array('errors' => plog_tr('Collection directory still contains files after all albums have been deleted.')); 481 481 } 482 482 483 483 } else { 484 484 return array('errors' => plog_tr('Collection has invalid path, not deleting directory')); … … 546 546 $name = mysql_real_escape_string(SmartStripSlashes($name)); 547 547 $description = mysql_real_escape_string(SmartStripSlashes($description)); 548 549 548 550 549 // first, get the album name and collection name of our source album … … 826 825 } 827 826 828 function edit_comment_form($comment_id) 829 { 827 function edit_comment_form($comment_id) { 830 828 $output = ''; 831 829 $comment_id = intval($comment_id); … … 1267 1265 </table>' . "\n"; 1268 1266 } else { 1269 $output .= "\n\n\t\t" . '<p class="actions">' . sprintf(plog_tr('Sadly, there are no pictures yet. Why don\'t you <a href="%s">upload some?</a>'),'plog-upload.php') . '</p>' . "\n";1267 $output .= "\n\n\t\t" . '<p class="actions">' . sprintf(plog_tr('Sadly, there are no pictures yet. Why don\'t you <a href="%s">upload some?</a>'),'plog-upload.php') . '</p>' . "\n"; 1270 1268 }; 1271 1269 return $output; … … 1492 1490 1493 1491 function generate_ajax_picture_editing_init() { 1494 1492 1495 1493 $output = '<script type="text/javascript">'; 1496 1494 }
Note: See TracChangeset
for help on using the changeset viewer.
