Пример #1
0
function upload_complete(&$image)
{
    $topic = "upload.complete";
    $msg = array("file_exists" => $image->getLocalFile()->fileExists, "media_type" => $image->getLocalFile()->media_type, "mime" => $image->getLocalFile()->mime, "major_mime" => $image->getLocalFile()->major_mime, "minor_mime" => $image->getLocalFile()->minor_mime, "size" => $image->getLocalFile()->size, "user_id" => $image->getLocalFile()->user, "user_text" => $image->getLocalFile()->user_text, "description" => $image->getLocalFile()->description, "url" => $image->getLocalFile()->url, "title" => $image->getLocalFile()->getTitle());
    emit_message($topic, $msg);
    return true;
}
Пример #2
0
function upload_complete(&$image)
{
    # If for some reason or another we can't create our socket, then bail.
    if (!initialize()) {
        return false;
    }
    $topic = "upload.complete";
    $msg = array("file_exists" => $image->getLocalFile()->fileExists, "media_type" => $image->getLocalFile()->media_type, "mime" => $image->getLocalFile()->mime, "major_mime" => $image->getLocalFile()->major_mime, "minor_mime" => $image->getLocalFile()->minor_mime, "size" => $image->getLocalFile()->size, "user_id" => $image->getLocalFile()->user, "user_text" => $image->getLocalFile()->user_text, "description" => $image->getLocalFile()->description, "url" => $image->getLocalFile()->url);
    # I know it seems peculiar to have an array here with only one element.
    # https://github.com/fedora-infra/fedmsg_meta_fedora_infrastructure/pull/174
    $msg['title'] = array("mPrefixedText" => $image->getLocalFile()->getTitle()->getPrefixedText());
    emit_message($topic, $msg);
    return true;
}
Пример #3
0
function upload_complete(&$image)
{
    # If for some reason or another we can't create our socket, then bail.
    if (!initialize()) {
        return false;
    }
    $topic = "upload.complete";
    $msg = array("file_exists" => $image->getLocalFile()->fileExists, "media_type" => $image->getLocalFile()->media_type, "mime" => $image->getLocalFile()->mime, "major_mime" => $image->getLocalFile()->major_mime, "minor_mime" => $image->getLocalFile()->minor_mime, "size" => $image->getLocalFile()->size, "user_id" => $image->getLocalFile()->user, "user_text" => $image->getLocalFile()->user_text, "description" => $image->getLocalFile()->description, "url" => $image->getLocalFile()->url, "title" => $image->getLocalFile()->getTitle());
    emit_message($topic, $msg);
    return true;
}