require_once('include/email.php');
require_once('library/langdet/Text/LanguageDetect.php');
require_once('include/tags.php');
+require_once('include/files.php');
require_once('include/threads.php');
function item_post(&$a) {
if($orig_post) {
- $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `attach` = '%s', `file` = '%s', `edited` = '%s' WHERE `id` = %d AND `uid` = %d",
+ $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `attach` = '%s', `file` = '%s', `edited` = '%s', `changed` = '%s' WHERE `id` = %d AND `uid` = %d",
dbesc($datarray['title']),
dbesc($datarray['body']),
dbesc($datarray['tag']),
dbesc($datarray['attach']),
dbesc($datarray['file']),
dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
intval($post_id),
intval($profile_uid)
);
- create_tags_from_itemuri($post_id, $profile_uid);
- update_thread_uri($post_id, $profile_uid);
// update filetags in pconfig
file_tag_update_pconfig($uid,$categories_old,$categories_new,'category');
if(count($r)) {
$post_id = $r[0]['id'];
logger('mod_item: saved item ' . $post_id);
- create_tags_from_item($post_id);
add_thread($post_id);
// update filetags in pconfig
dbesc(datetime_convert()),
intval($post_id)
);
- update_thread($post_id);
// photo comments turn the corresponding item visible to the profile wall
// This way we don't see every picture in your new photo album posted to your wall at once.
}
}
+ create_tags_from_item($post_id);
+ create_files_from_item($post_id);
+ update_thread($post_id);
+
// This is a real juggling act on shared hosting services which kill your processes
// e.g. dreamhost. We used to start delivery to our native delivery agents in the background
// and then run our plugin delivery from the foreground. We're now doing plugin delivery first,
// likely to get killed off. If you end up looking at an /item URL and a blank page,
// it's very likely the delivery got killed before all your friends could be notified.
// Currently the only realistic fixes are to use a reliable server - which precludes shared hosting,
- // or cut back on plugins which do remote deliveries.
+ // or cut back on plugins which do remote deliveries.
proc_run('php', "include/notifier.php", $notify_type, "$post_id");