Interceptor Forum

Normale Version: Anpassung: no download counter for uploader in attachment.php
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Es soll keine Zählung von Attachment bzw. Anhängen geben wenn es der Uplaoder selbst sich ansehen will.


Im root Verzeichnis die Datei attachment.php Bearbeiten

suche:
Code:
if(!isset($mybb->input['thumbnail'])) // Only increment the download count if this is not a thumbnail
{
    if(!is_member($attachtype['groups']))
    {
        error_no_permission();
    }

    $attachupdate = array(
        "downloads" => $attachment['downloads']+1,
    );
    $db->update_query("attachments", $attachupdate, "aid='{$attachment['aid']}'");
}


ersetze mit:
Code:
if(!isset($mybb->input['thumbnail'])) // Only increment the download count if this is not a thumbnail
{
    if (!is_member($attachtype['groups']))
        error_no_permission();
    }

    // Prüfe, ob der aktuelle Benutzer nicht der Uploader ist
    if ($mybb->user['uid'] != $attachment['uid']) {
    $attachupdate = array(
        "downloads" => $attachment['downloads'] + 1,
    );
    $db->update_query("attachments", $attachupdate, "aid='{$attachment['aid']}'");
}