Results 1 to 2 of 2

Thread: Set Category Image - Permissions Issue

  1. #1
    Join Date
    Aug 2004
    Posts
    353

    Default Set Category Image - Permissions Issue

    A user goes in and adds a story, uploads an attachment, sets a category image.

    I then go into their story, and attempt to change the category image to a different one.

    System doesn't allow me to do it. Page refreshes, original category image is still selected.

    I can understand this functionality on co-equal, non-admin usergroups, but admins should be able to bypass this.

    I tried looking in newattachment.php, didn't find anything yet.

    Is there any way to make it so an admin can override and re-choose the category image on a story whenever they want, regardless of other variables?

  2. #2
    Join Date
    Aug 2004
    Posts
    353

    Default

    Hehe, I always post then find something.

    Around line 415 of newattachment.php

    I changed this:

    PHP Code:
            $entryattachid 0;
            
    // Entry attachment id
            
    if ($vbulletin->GPC['entryattach'])
            {
                
    $entryattach $db->query_first("
                    SELECT attachmentid FROM " 
    ADV_DYNA_TABLE_PREFIX "attachments
                    WHERE attachmentid = " 
    $vbulletin->GPC['entryattach'] . "
                        AND userid = " 
    $vbulletin->userinfo['userid']
                );
                
    $entryattachid intval($entryattach['attachmentid']);
            } 
    To This:

    PHP Code:
            $entryattachid 0;
            
    // Entry attachment id
            
    if ($vbulletin->GPC['entryattach'])
            {
                
    $entryattach $db->query_first("
                    SELECT attachmentid FROM " 
    ADV_DYNA_TABLE_PREFIX "attachments
                    WHERE attachmentid = " 
    $vbulletin->GPC['entryattach'
                        
    //AND userid = " . $vbulletin->userinfo['userid']
                
    );
                
    $entryattachid intval($entryattach['attachmentid']); 
    Basically cuttting out the userid check from the query.

    Is that proper, and are there any negative affects of doing this?

    Seems to have fixed the above issue otherwise.

    Thanks in advance.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Category permissions not inherited
    By SoloX in forum Troubleshooting & Problems
    Replies: 5
    Last Post: 09-09-2009, 02:09 PM
  2. Circumventing Category Permissions
    By Webs961 in forum Troubleshooting & Problems
    Replies: 2
    Last Post: 07-29-2009, 10:56 PM
  3. [3.0.1 Bug?] Permissions Issue
    By KW802 in forum Troubleshooting & Problems
    Replies: 2
    Last Post: 06-24-2008, 09:24 PM
  4. Permissions Issue?
    By insolentmuse in forum Troubleshooting & Problems
    Replies: 13
    Last Post: 02-26-2007, 12:42 AM
  5. News Item displayed from category with no permissions
    By theMusicMan in forum Troubleshooting / "How do I..." Questions
    Replies: 2
    Last Post: 08-27-2004, 03:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •