Changeset 1029

Show
Ignore:
Timestamp:
03/19/07 15:45:01 (2 years ago)
Author:
ben
Message:

If you post from a community, files from that community that you've uploaded can be inserted in community blog posts.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/units/files/weblogs_posts_add_fields.php

    r980 r1029  
    2828            $filetitle = htmlspecialchars($file->title); 
    2929            $filename = htmlspecialchars($file->originalname); 
    30             $body .= <<< END 
     30            if (run("users:access_level_check",$file->access)) $body .= <<< END 
    3131                     
    3232                    <option value="{$file->ident}" title="{$filename}">{$fileprefix} {$filetitle}</option> 
     
    3737    if ($folders = get_records_select('file_folders',"owner = ? AND parent = ? ",array($userid,$folderid))) { 
    3838        foreach($folders as $folder) { 
    39             $body .= viewfolder($folder->ident, $userid, $level + 1); 
     39            if (run("users:access_level_check",$folder->access)) $body .= viewfolder($folder->ident, $userid, $level + 1); 
    4040        } 
    4141    } 
     
    7979 
    8080    $run_result .= viewfolder(-1, $userid, 0); 
     81    if ($userid != $page_owner) { 
     82        $run_result .= viewfolder(-1, $page_owner, 0); 
     83    } 
    8184 
    8285    $addCode = __gettext("This will add a code to your weblog post that will be converted into an embedded file."); // gettext variable