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()
|
|
|
|
{
|
2010-11-21 01:19:17 +01:00
|
|
|
fun.url = L"ls";
|
2010-08-10 18:12:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Ls::MakeGet()
|
2008-12-30 02:05:03 +01:00
|
|
|
{
|
2011-01-23 15:15:30 +01:00
|
|
|
if( !cur->request->is_item )
|
2008-12-30 02:05:03 +01:00
|
|
|
{
|
2010-09-18 02:51:12 +02:00
|
|
|
DbItemQuery iq;
|
2010-02-22 23:52:09 +01:00
|
|
|
|
|
|
|
iq.sel_content = false;
|
|
|
|
|
2011-01-23 15:15:30 +01:00
|
|
|
iq.WhereParentId(cur->request->dir_tab.back()->id);
|
2011-01-05 22:24:11 +01:00
|
|
|
iq.WhereType(Item::dir, false);
|
2010-02-22 23:52:09 +01:00
|
|
|
|
2011-01-23 15:15:30 +01:00
|
|
|
if( cur->request->IsParam(L"ckeditor_browse") )
|
2010-02-22 23:52:09 +01:00
|
|
|
{
|
2010-12-10 22:07:01 +01:00
|
|
|
iq.WhereFileType(WINIX_ITEM_FILETYPE_IMAGE);
|
2011-01-23 15:15:30 +01:00
|
|
|
db->GetItems(cur->request->item_tab, iq);
|
2010-02-22 23:52:09 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-01-23 15:15:30 +01:00
|
|
|
db->GetItems(cur->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
|