50 lines
738 B
C++
Executable File
50 lines
738 B
C++
Executable File
/*
|
|
* This file is a part of CMSLU -- Content Management System like Unix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2008, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#include "content.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Content::FunLs()
|
|
{
|
|
if( request.is_item )
|
|
{
|
|
// we're showing only the item
|
|
request.item_table.push_back( request.item );
|
|
return;
|
|
}
|
|
|
|
// !! a gdzie sprawdzenie uprawnien?
|
|
|
|
// we're showing the whole directory
|
|
Item item_ref;
|
|
|
|
item_ref.parent_id = request.dir_table.back()->id;
|
|
|
|
// !! zrobic inna metode, inny interfejs (jako parametr niech bierze parent_id), i zeby nie odczytywala contentu i subjectu (a moze tylko subject? przyda sie przy ls -l)
|
|
db.GetItems(request.item_table, item_ref);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|