2008-12-30 02:05:03 +01:00
|
|
|
/*
|
2010-02-28 01:08:10 +01:00
|
|
|
* This file is a part of Winix
|
2008-12-30 02:05:03 +01:00
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
2010-02-28 22:33:06 +01:00
|
|
|
* Copyright (c) 2008-2010, Tomasz Sowa
|
2008-12-30 02:05:03 +01:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-08-10 18:12:50 +02:00
|
|
|
#include "ls.h"
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-10 18:12:50 +02:00
|
|
|
|
|
|
|
namespace Fun
|
|
|
|
{
|
|
|
|
|
|
|
|
Ls::Ls()
|
|
|
|
{
|
|
|
|
fun.url = "ls";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Ls::MakeGet()
|
2008-12-30 02:05:03 +01:00
|
|
|
{
|
2010-08-10 18:12:50 +02:00
|
|
|
if( !request->is_item )
|
2008-12-30 02:05:03 +01:00
|
|
|
{
|
2010-02-22 23:52:09 +01:00
|
|
|
Db::ItemQuery iq;
|
|
|
|
|
|
|
|
iq.sel_content = false;
|
|
|
|
|
2010-08-10 22:43:38 +02:00
|
|
|
iq.WhereParentId(request->dir_tab.back()->id);
|
2010-02-22 23:52:09 +01:00
|
|
|
iq.WhereType(Item::file);
|
|
|
|
|
2010-08-10 18:12:50 +02:00
|
|
|
if( request->IsParam("ckeditor_browse") )
|
2010-02-22 23:52:09 +01:00
|
|
|
{
|
|
|
|
iq.WhereAuth(Item::auth_image);
|
2010-08-10 22:43:38 +02:00
|
|
|
db->GetItems(request->item_tab, iq);
|
2010-02-22 23:52:09 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
db->GetItems(request->item_tab, iq);
|
2010-02-22 23:52:09 +01:00
|
|
|
}
|
2008-12-30 02:05:03 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-10 18:12:50 +02:00
|
|
|
} // namespace
|