ea037c194cb1f8a2957276f8a72a43f8db3d5476,django/ckeditor/views.py,,get_media_url_project,#Any#Any#,185

Before Change


    
    
    // upload files to project folder which is open to all by default     
    return reverse("filetransfers.views.serve"\
                   ,kwargs={"project_name":projectname,\
                            "path":os.path.join(settings.COMIC_PUBLIC_FOLDER_NAME,filename)})
                                               

def get_image_files(user=None):
    

After Change


    filename should be relative to projectfolder/public_html/ 
    
    
    filepath = os.path.join(settings.COMIC_PUBLIC_FOLDER_NAME,filename)
    filepath = filepath.replace("\\", "/") // double backslash here somehow causes an 
                                           // infinite loop /filename/filename/filename..
     
    // upload files to project folder which is open to all by default     
    url =  reverse("project_serve_file",
                   kwargs={"project_name":projectname,
                           "path":filepath})        
    return url
                                               
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: comic/grand-challenge.org
Commit Name: ea037c194cb1f8a2957276f8a72a43f8db3d5476
Time: 2013-07-25
Author: w.s.kerkstra@gmail.com
File Name: django/ckeditor/views.py
Class Name:
Method Name: get_media_url_project


Project Name: comic/grand-challenge.org
Commit Name: 099b3eab0b64801e0a0bb54c5a7c8189baad0222
Time: 2012-11-27
Author: w.s.kerkstra@gmail.com
File Name: django/filetransfers/views.py
Class Name:
Method Name: delete_handler


Project Name: comic/grand-challenge.org
Commit Name: 10be620ec5a250bc7b7a3ec89b956eb5ca6f8147
Time: 2013-07-25
Author: w.s.kerkstra@gmail.com
File Name: django/ckeditor/views.py
Class Name:
Method Name: get_media_url_project


Project Name: comic/grand-challenge.org
Commit Name: 4272398c0f1aebc3e21df81beba69c3a171fa567
Time: 2012-11-27
Author: w.s.kerkstra@gmail.com
File Name: django/filetransfers/views.py
Class Name:
Method Name: delete_handler