namespace PT renamed to pt
This commit is contained in:
@@ -87,45 +87,45 @@ void current_date_utc(Info & i)
|
||||
|
||||
void current_sec(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->start_date);
|
||||
pt::Date date = system->ToLocal(cur->request->start_date);
|
||||
i.out << date.sec;
|
||||
}
|
||||
|
||||
void current_min(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->start_date);
|
||||
pt::Date date = system->ToLocal(cur->request->start_date);
|
||||
i.out << date.min;
|
||||
}
|
||||
|
||||
void current_hour(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->start_date);
|
||||
pt::Date date = system->ToLocal(cur->request->start_date);
|
||||
i.out << date.hour;
|
||||
}
|
||||
|
||||
|
||||
void current_day(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->start_date);
|
||||
pt::Date date = system->ToLocal(cur->request->start_date);
|
||||
i.out << date.day;
|
||||
}
|
||||
|
||||
void current_month(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->start_date);
|
||||
pt::Date date = system->ToLocal(cur->request->start_date);
|
||||
i.out << date.month;
|
||||
}
|
||||
|
||||
void current_year(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->start_date);
|
||||
pt::Date date = system->ToLocal(cur->request->start_date);
|
||||
i.out << date.year;
|
||||
}
|
||||
|
||||
|
||||
void current_date(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->start_date);
|
||||
pt::Date date = system->ToLocal(cur->request->start_date);
|
||||
i.out << date;
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ void dir_has_parents(Info & i)
|
||||
dir_parents_str += '/';
|
||||
}
|
||||
|
||||
i.res = PT::is_substr(i.par, dir_parents_str);
|
||||
i.res = pt::is_substr(i.par, dir_parents_str);
|
||||
}
|
||||
|
||||
|
||||
@@ -402,14 +402,14 @@ void dir_last_url_is_no(Info & i)
|
||||
|
||||
void dir_last_date_creation(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->dir_tab.back()->item_content.date_creation);
|
||||
pt::Date date = system->ToLocal(cur->request->dir_tab.back()->item_content.date_creation);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_date_modification(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->dir_tab.back()->item_content.date_modification);
|
||||
pt::Date date = system->ToLocal(cur->request->dir_tab.back()->item_content.date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
@@ -429,8 +429,8 @@ void dir_last_date_modification_nice(Info & i)
|
||||
|
||||
void dir_last_dates_equal(Info & i)
|
||||
{
|
||||
PT::Date & date1 = cur->request->dir_tab.back()->item_content.date_creation;
|
||||
PT::Date & date2 = cur->request->dir_tab.back()->item_content.date_modification;
|
||||
pt::Date & date1 = cur->request->dir_tab.back()->item_content.date_creation;
|
||||
pt::Date & date2 = cur->request->dir_tab.back()->item_content.date_modification;
|
||||
|
||||
i.res = date1 == date2;
|
||||
}
|
||||
|
||||
@@ -163,8 +163,8 @@ void doc_css_tab_file_is_global(Info & i)
|
||||
// !! z konfiga wziasc przedrostki
|
||||
|
||||
if( doc_css_index < cur->session->last_css.size() )
|
||||
i.res = PT::is_substr(L"http://", cur->session->last_css[doc_css_index].c_str()) ||
|
||||
PT::is_substr(L"https://", cur->session->last_css[doc_css_index].c_str());
|
||||
i.res = pt::is_substr(L"http://", cur->session->last_css[doc_css_index].c_str()) ||
|
||||
pt::is_substr(L"https://", cur->session->last_css[doc_css_index].c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -233,14 +233,14 @@ HtmlTextStream & HtmlTextStream::operator<<(RawText<void*> raw)
|
||||
}
|
||||
|
||||
|
||||
HtmlTextStream & HtmlTextStream::operator<<(RawText<PT::Space> raw)
|
||||
HtmlTextStream & HtmlTextStream::operator<<(RawText<pt::Space> raw)
|
||||
{
|
||||
TextStream<std::wstring>::operator<<(raw.par);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
HtmlTextStream & HtmlTextStream::operator<<(RawText<PT::Date> raw)
|
||||
HtmlTextStream & HtmlTextStream::operator<<(RawText<pt::Date> raw)
|
||||
{
|
||||
TextStream<std::wstring>::operator<<(raw.par);
|
||||
return *this;
|
||||
@@ -329,7 +329,7 @@ return *this;
|
||||
|
||||
HtmlTextStream & HtmlTextStream::EPutText(const char * str)
|
||||
{
|
||||
PT::UTF8ToWide(str, tmp_string);
|
||||
pt::UTF8ToWide(str, tmp_string);
|
||||
|
||||
for(size_t i=0 ; i<tmp_string.size() ; ++i)
|
||||
ETextPutChar(tmp_string[i]);
|
||||
@@ -343,7 +343,7 @@ return *this;
|
||||
|
||||
HtmlTextStream & HtmlTextStream::EPutText(const char * str, size_t len)
|
||||
{
|
||||
PT::UTF8ToWide(str, len, tmp_string);
|
||||
pt::UTF8ToWide(str, len, tmp_string);
|
||||
|
||||
for(size_t i=0 ; i<tmp_string.size() ; ++i)
|
||||
ETextPutChar(tmp_string[i]);
|
||||
@@ -362,7 +362,7 @@ HtmlTextStream & HtmlTextStream::EPutText(const std::string * str)
|
||||
|
||||
HtmlTextStream & HtmlTextStream::EPutText(const std::string & str)
|
||||
{
|
||||
PT::UTF8ToWide(str, tmp_string);
|
||||
pt::UTF8ToWide(str, tmp_string);
|
||||
|
||||
for(size_t i=0 ; i<tmp_string.size() ; ++i)
|
||||
ETextPutChar(tmp_string[i]);
|
||||
@@ -551,7 +551,7 @@ return *this;
|
||||
|
||||
|
||||
|
||||
HtmlTextStream & HtmlTextStream::operator<<(const PT::Space & space)
|
||||
HtmlTextStream & HtmlTextStream::operator<<(const pt::Space & space)
|
||||
{
|
||||
if( escape )
|
||||
{
|
||||
@@ -575,7 +575,7 @@ return *this;
|
||||
}
|
||||
|
||||
|
||||
HtmlTextStream & HtmlTextStream::operator<<(const PT::Date & date)
|
||||
HtmlTextStream & HtmlTextStream::operator<<(const pt::Date & date)
|
||||
{
|
||||
if( escape )
|
||||
{
|
||||
|
||||
@@ -143,11 +143,11 @@ public:
|
||||
HtmlTextStream & operator<<(RawText<unsigned long> raw);
|
||||
HtmlTextStream & operator<<(RawText<double> raw);
|
||||
HtmlTextStream & operator<<(RawText<void*> raw);
|
||||
HtmlTextStream & operator<<(RawText<PT::Space> raw);
|
||||
HtmlTextStream & operator<<(RawText<PT::Date> raw);
|
||||
HtmlTextStream & operator<<(RawText<pt::Space> raw);
|
||||
HtmlTextStream & operator<<(RawText<pt::Date> raw);
|
||||
|
||||
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
|
||||
HtmlTextStream & operator<<(RawText<PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> > raw);
|
||||
HtmlTextStream & operator<<(RawText<pt::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> > raw);
|
||||
|
||||
|
||||
|
||||
@@ -196,11 +196,11 @@ public:
|
||||
HtmlTextStream & operator<<(unsigned long);
|
||||
HtmlTextStream & operator<<(double);
|
||||
HtmlTextStream & operator<<(const void *);
|
||||
HtmlTextStream & operator<<(const PT::Space & space);
|
||||
HtmlTextStream & operator<<(const PT::Date & Date);
|
||||
HtmlTextStream & operator<<(const pt::Space & space);
|
||||
HtmlTextStream & operator<<(const pt::Date & Date);
|
||||
|
||||
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
|
||||
HtmlTextStream & operator<<(const PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg);
|
||||
HtmlTextStream & operator<<(const pt::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg);
|
||||
|
||||
|
||||
private:
|
||||
@@ -214,7 +214,7 @@ private:
|
||||
|
||||
|
||||
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
|
||||
HtmlTextStream & HtmlTextStream::operator<<(RawText<PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> > raw)
|
||||
HtmlTextStream & HtmlTextStream::operator<<(RawText<pt::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> > raw)
|
||||
{
|
||||
TextStream<std::wstring>::operator<<(raw.par);
|
||||
|
||||
@@ -223,9 +223,9 @@ return *this;
|
||||
|
||||
|
||||
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
|
||||
HtmlTextStream & HtmlTextStream::operator<<(const PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg)
|
||||
HtmlTextStream & HtmlTextStream::operator<<(const pt::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg)
|
||||
{
|
||||
typename PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size>::const_iterator i;
|
||||
typename pt::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size>::const_iterator i;
|
||||
|
||||
if( escape )
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ void ipban_current_ip_expires_time(Info & i)
|
||||
{
|
||||
if( cur->session->ip_ban && cur->session->ip_ban->expires != 0 )
|
||||
{
|
||||
PT::Date date = cur->session->ip_ban->expires;
|
||||
pt::Date date = cur->session->ip_ban->expires;
|
||||
i.out << date << " UTC";
|
||||
}
|
||||
}
|
||||
@@ -96,7 +96,7 @@ void ipban_tab_ip(Info & i)
|
||||
{
|
||||
if( ipban_index < session_manager->BanListSize() )
|
||||
{
|
||||
PT::WTextStream buf = IPToStr(session_manager->GetIPBan(ipban_index).ip);
|
||||
pt::WTextStream buf = IPToStr(session_manager->GetIPBan(ipban_index).ip);
|
||||
i.out << buf;
|
||||
}
|
||||
}
|
||||
@@ -164,7 +164,7 @@ void ipban_tab_expires(Info & i)
|
||||
if( ipban.expires != 0 )
|
||||
{
|
||||
time_t expires_local = system->ToLocal(ipban.expires);
|
||||
PT::Date date(expires_local);
|
||||
pt::Date date(expires_local);
|
||||
i.out << date;
|
||||
}
|
||||
}
|
||||
@@ -180,7 +180,7 @@ void ipban_tab_last_used(Info & i)
|
||||
if( ipban.last_used != 0 )
|
||||
{
|
||||
time_t last_used_local = system->ToLocal(ipban.last_used);
|
||||
PT::Date date(last_used_local);
|
||||
pt::Date date(last_used_local);
|
||||
i.out << date;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,14 +285,14 @@ void item_users_different(Info & i)
|
||||
|
||||
void item_date_creation(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->last_item->item_content.date_creation);
|
||||
pt::Date date = system->ToLocal(cur->request->last_item->item_content.date_creation);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
void item_date_modification(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->last_item->item_content.date_modification);
|
||||
pt::Date date = system->ToLocal(cur->request->last_item->item_content.date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
@@ -311,8 +311,8 @@ void item_date_modification_nice(Info & i)
|
||||
|
||||
void item_dates_equal(Info & i)
|
||||
{
|
||||
PT::Date & date1 = cur->request->last_item->item_content.date_creation;
|
||||
PT::Date & date2 = cur->request->last_item->item_content.date_modification;
|
||||
pt::Date & date1 = cur->request->last_item->item_content.date_creation;
|
||||
pt::Date & date2 = cur->request->last_item->item_content.date_modification;
|
||||
|
||||
i.res = date1 == date2;
|
||||
}
|
||||
@@ -684,7 +684,7 @@ void item_tab_date_creation(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->item_tab[item_index].item_content.date_creation);
|
||||
pt::Date date = system->ToLocal(cur->request->item_tab[item_index].item_content.date_creation);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
}
|
||||
@@ -694,7 +694,7 @@ void item_tab_date_modification(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->item_tab[item_index].item_content.date_modification);
|
||||
pt::Date date = system->ToLocal(cur->request->item_tab[item_index].item_content.date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
}
|
||||
@@ -723,8 +723,8 @@ void item_tab_dates_equal(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
PT::Date & date1 = cur->request->item_tab[item_index].item_content.date_creation;
|
||||
PT::Date & date2 = cur->request->item_tab[item_index].item_content.date_modification;
|
||||
pt::Date & date1 = cur->request->item_tab[item_index].item_content.date_creation;
|
||||
pt::Date & date2 = cur->request->item_tab[item_index].item_content.date_modification;
|
||||
|
||||
i.res = date1 == date2;
|
||||
}
|
||||
|
||||
@@ -113,15 +113,15 @@ bool read = false;
|
||||
file_name += file;
|
||||
|
||||
loc_parser.SetSpace(temp_space);
|
||||
PT::SpaceParser::Status status = loc_parser.ParseSpaceFile(file_name);
|
||||
pt::SpaceParser::Status status = loc_parser.ParseSpaceFile(file_name);
|
||||
|
||||
if( status == PT::SpaceParser::ok )
|
||||
if( status == pt::SpaceParser::ok )
|
||||
{
|
||||
read = true;
|
||||
log << log3 << "Locale: read locale from: " << file_name << logend;
|
||||
}
|
||||
else
|
||||
if( status == PT::SpaceParser::syntax_error )
|
||||
if( status == pt::SpaceParser::syntax_error )
|
||||
{
|
||||
log << log1 << "Locale: syntax error in: " << file_name << " in line: " << loc_parser.get_last_parsed_line() << logend;
|
||||
}
|
||||
@@ -187,7 +187,7 @@ bool read = false;
|
||||
|
||||
loc_parser.SetSpace(temp_space);
|
||||
|
||||
if( loc_parser.ParseSpaceFile(file_name) == PT::SpaceParser::ok )
|
||||
if( loc_parser.ParseSpaceFile(file_name) == pt::SpaceParser::ok )
|
||||
{
|
||||
read = true;
|
||||
CreateSubstVector(subst_url, temp_space.to_wstr(L"url_original"), temp_space.to_wstr(L"url_changeto"));
|
||||
@@ -266,7 +266,7 @@ void Locale::Read(const char * dir, const char * dir_def)
|
||||
|
||||
for(size_t i=0 ; i<locale_files.size() ; ++i)
|
||||
{
|
||||
PT::WideToUTF8(locale_files[i], locale_filea);
|
||||
pt::WideToUTF8(locale_files[i], locale_filea);
|
||||
ReadFile(dir, dir_def, locale_filea.c_str());
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ void Locale::Read(const std::string & dir, const std::string & dir_def)
|
||||
|
||||
void Locale::Read(const wchar_t * dir, const wchar_t * dir_def)
|
||||
{
|
||||
PT::WideToUTF8(dir, adir1);
|
||||
pt::WideToUTF8(dir, adir1);
|
||||
|
||||
if( !dir_def )
|
||||
{
|
||||
@@ -293,7 +293,7 @@ void Locale::Read(const wchar_t * dir, const wchar_t * dir_def)
|
||||
}
|
||||
else
|
||||
{
|
||||
PT::WideToUTF8(dir_def, adir2);
|
||||
pt::WideToUTF8(dir_def, adir2);
|
||||
Read(adir1.c_str(), adir2.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
bool IsKey(const std::wstring & key, bool try_default_too = true) const;
|
||||
|
||||
template<typename char_type, size_t stack_size, size_t heap_block_size>
|
||||
bool IsKey(const PT::TextStreamBase<char_type, stack_size, heap_block_size> & key,
|
||||
bool IsKey(const pt::TextStreamBase<char_type, stack_size, heap_block_size> & key,
|
||||
bool try_default_too = true);
|
||||
|
||||
// checking whether there is a 'key' in the lang_id language
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
bool IsKey(const std::wstring & key, size_t lang_id, bool try_default_too = true) const;
|
||||
|
||||
template<typename char_type, size_t stack_size, size_t heap_block_size>
|
||||
bool IsKey(const PT::TextStreamBase<char_type, stack_size, heap_block_size> & key,
|
||||
bool IsKey(const pt::TextStreamBase<char_type, stack_size, heap_block_size> & key,
|
||||
size_t lang_id, bool try_default_too = true);
|
||||
|
||||
// returning a value for a specific key
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
const std::wstring & Get(const std::wstring & key, size_t lang_id, bool try_default_too = true) const;
|
||||
|
||||
template<typename char_type, size_t stack_size, size_t heap_block_size>
|
||||
const std::wstring & Get(const PT::TextStreamBase<char_type, stack_size, heap_block_size> & key,
|
||||
const std::wstring & Get(const pt::TextStreamBase<char_type, stack_size, heap_block_size> & key,
|
||||
bool try_default_too = true);
|
||||
|
||||
template<typename ... Types>
|
||||
@@ -232,7 +232,7 @@ private:
|
||||
std::vector<size_t> locale_indices;
|
||||
|
||||
// messages vector<via language>
|
||||
std::vector<PT::Space> locale_tab;
|
||||
std::vector<pt::Space> locale_tab;
|
||||
|
||||
// default locale index (index to locale_indexes)
|
||||
size_t default_lang;
|
||||
@@ -240,7 +240,7 @@ private:
|
||||
// current locale index (index to locale_indexes)
|
||||
size_t current_lang;
|
||||
|
||||
PT::WPatternReplacer pattern_replacer;
|
||||
pt::WPatternReplacer pattern_replacer;
|
||||
|
||||
|
||||
// vectors of characters substitution (sort by 'from')
|
||||
@@ -250,8 +250,8 @@ private:
|
||||
std::vector<SubstItem> subst_sort; // local characters for comparison
|
||||
|
||||
|
||||
PT::Space temp_space;
|
||||
PT::SpaceParser loc_parser;
|
||||
pt::Space temp_space;
|
||||
pt::SpaceParser loc_parser;
|
||||
std::string locale_filea;
|
||||
std::string file_name;
|
||||
std::wstring key_str;
|
||||
@@ -262,7 +262,7 @@ private:
|
||||
|
||||
|
||||
template<typename char_type, size_t stack_size, size_t heap_block_size>
|
||||
bool Locale::IsKey(const PT::TextStreamBase<char_type, stack_size, heap_block_size> & key,
|
||||
bool Locale::IsKey(const pt::TextStreamBase<char_type, stack_size, heap_block_size> & key,
|
||||
bool try_default_too)
|
||||
{
|
||||
key.to_string(key_str);
|
||||
@@ -271,7 +271,7 @@ bool Locale::IsKey(const PT::TextStreamBase<char_type, stack_size, heap_block_si
|
||||
|
||||
|
||||
template<typename char_type, size_t stack_size, size_t heap_block_size>
|
||||
bool Locale::IsKey(const PT::TextStreamBase<char_type, stack_size, heap_block_size> & key,
|
||||
bool Locale::IsKey(const pt::TextStreamBase<char_type, stack_size, heap_block_size> & key,
|
||||
size_t lang_id, bool try_default_too)
|
||||
{
|
||||
key.to_string(key_str);
|
||||
@@ -281,7 +281,7 @@ bool Locale::IsKey(const PT::TextStreamBase<char_type, stack_size, heap_block_si
|
||||
|
||||
|
||||
template<typename char_type, size_t stack_size, size_t heap_block_size>
|
||||
const std::wstring & Locale::Get(const PT::TextStreamBase<char_type, stack_size, heap_block_size> & key,
|
||||
const std::wstring & Locale::Get(const pt::TextStreamBase<char_type, stack_size, heap_block_size> & key,
|
||||
bool try_default_too)
|
||||
{
|
||||
key.to_string(key_str);
|
||||
|
||||
@@ -126,10 +126,10 @@ char buffer[100];
|
||||
|
||||
|
||||
|
||||
void print_date_nice(Info & i, const PT::Date & date)
|
||||
void print_date_nice(Info & i, const pt::Date & date)
|
||||
{
|
||||
time_t one_day = 60 * 60 * 24;
|
||||
PT::Date ltm = system->ToLocal(date);
|
||||
pt::Date ltm = system->ToLocal(date);
|
||||
|
||||
if( date + one_day > cur->request->start_time )
|
||||
i.out << DateToStr(ltm.year, ltm.month, ltm.day, ltm.hour, ltm.min, ltm.sec);
|
||||
@@ -140,7 +140,7 @@ void print_date_nice(Info & i, const PT::Date & date)
|
||||
|
||||
|
||||
|
||||
// cannot be a const reference at the moment (PT::Space is used)
|
||||
// cannot be a const reference at the moment (pt::Space is used)
|
||||
void print_user_name(Info & i, User & user)
|
||||
{
|
||||
std::wstring * dname = user.aenv.get_wstr(L"display_name");
|
||||
|
||||
@@ -68,7 +68,7 @@ void InitGenerator(EzcGen & gen);
|
||||
void HtmlEscapeFormTxt(HtmlTextStream & out, const std::wstring & in);
|
||||
|
||||
void print_hour_min(Info & i, time_t time);
|
||||
void print_date_nice(Info & i, const PT::Date & date);
|
||||
void print_date_nice(Info & i, const pt::Date & date);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -73,13 +73,13 @@ void copy_space(const std::vector<Ezc::Var> & params, std::vector<std::wstring>
|
||||
}
|
||||
|
||||
|
||||
PT::Space * find_space(const std::vector<Ezc::Var> & params, PT::Space & space, size_t level = 0)
|
||||
pt::Space * find_space(const std::vector<Ezc::Var> & params, pt::Space & space, size_t level = 0)
|
||||
{
|
||||
if( level + 1 < params.size() && space.child_spaces )
|
||||
{
|
||||
for(size_t i=0 ; i<space.child_spaces->size() ; ++i)
|
||||
{
|
||||
PT::Space & child = *(*space.child_spaces)[i];
|
||||
pt::Space & child = *(*space.child_spaces)[i];
|
||||
|
||||
if( child.name && *child.name == params[level].str )
|
||||
return find_space(params, child, level+1);
|
||||
@@ -107,7 +107,7 @@ PT::Space * find_space(const std::vector<Ezc::Var> & params, PT::Space & space,
|
||||
struct SpaceInfo
|
||||
{
|
||||
bool inited;
|
||||
PT::Space * last_space;
|
||||
pt::Space * last_space;
|
||||
std::vector<std::wstring> spaces;
|
||||
|
||||
SpaceInfo()
|
||||
@@ -117,14 +117,14 @@ struct SpaceInfo
|
||||
}
|
||||
};
|
||||
|
||||
static std::map<PT::Space*, SpaceInfo> spaces_map;
|
||||
static std::map<pt::Space*, SpaceInfo> spaces_map;
|
||||
static size_t space_reqid = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void space_init(const std::vector<Ezc::Var> & params, PT::Space & space, SpaceInfo & space_info)
|
||||
void space_init(const std::vector<Ezc::Var> & params, pt::Space & space, SpaceInfo & space_info)
|
||||
{
|
||||
if( !space_info.inited || !are_spaces_the_same(params, space_info.spaces) )
|
||||
{
|
||||
@@ -145,7 +145,7 @@ void space_check_reqid()
|
||||
}
|
||||
|
||||
|
||||
void space_value(Info & i, PT::Space & space, bool escape)
|
||||
void space_value(Info & i, pt::Space & space, bool escape)
|
||||
{
|
||||
space_check_reqid();
|
||||
|
||||
@@ -183,7 +183,7 @@ struct SpaceTabStackItem : public Ezc::FunData
|
||||
|
||||
|
||||
|
||||
void space_list_tab(Info & i, PT::Space & space)
|
||||
void space_list_tab(Info & i, pt::Space & space)
|
||||
{
|
||||
if( !i.stack.fun_data )
|
||||
{
|
||||
@@ -192,7 +192,7 @@ void space_list_tab(Info & i, PT::Space & space)
|
||||
SpaceTabStackItem * stack_item = new SpaceTabStackItem();
|
||||
i.stack.fun_data = stack_item;
|
||||
|
||||
PT::Space * dst_space = find_space(i.params, space);
|
||||
pt::Space * dst_space = find_space(i.params, space);
|
||||
|
||||
if( dst_space )
|
||||
dst_space->to_list(i.params.back().str, stack_item->values);
|
||||
@@ -209,7 +209,7 @@ void space_list_tab(Info & i, PT::Space & space)
|
||||
|
||||
|
||||
|
||||
void space_list_tab_value(Info & i, PT::Space & space, const std::wstring & function_name)
|
||||
void space_list_tab_value(Info & i, pt::Space & space, const std::wstring & function_name)
|
||||
{
|
||||
Ezc::Stack * stack;
|
||||
auto user_object = i.FindUserObject<SpaceTabStackItem>(function_name, &stack);
|
||||
@@ -219,7 +219,7 @@ void space_list_tab_value(Info & i, PT::Space & space, const std::wstring & func
|
||||
}
|
||||
|
||||
|
||||
void space_list_tab_has_next(Info & i, PT::Space & space, const std::wstring & function_name)
|
||||
void space_list_tab_has_next(Info & i, pt::Space & space, const std::wstring & function_name)
|
||||
{
|
||||
Ezc::Stack * stack;
|
||||
auto user_object = i.FindUserObject<SpaceTabStackItem>(function_name, &stack);
|
||||
|
||||
@@ -65,18 +65,18 @@ namespace TemplatesFunctions
|
||||
*
|
||||
*
|
||||
*/
|
||||
void space_value(Info & i, PT::Space & space, bool escape = true);
|
||||
void space_value(Info & i, pt::Space & space, bool escape = true);
|
||||
|
||||
|
||||
// !! IMPROVE ME
|
||||
// add
|
||||
// void space_list_tab_size(Info & i, PT::Space & space);
|
||||
// void space_list_tab_size(Info & i, pt::Space & space);
|
||||
|
||||
|
||||
|
||||
void space_list_tab(Info & i, PT::Space & space);
|
||||
void space_list_tab_value(Info & i, PT::Space & space, const std::wstring & function_name);
|
||||
void space_list_tab_has_next(Info & i, PT::Space & space, const std::wstring & function_name);
|
||||
void space_list_tab(Info & i, pt::Space & space);
|
||||
void space_list_tab_value(Info & i, pt::Space & space, const std::wstring & function_name);
|
||||
void space_list_tab_has_next(Info & i, pt::Space & space, const std::wstring & function_name);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -122,8 +122,8 @@ void mount_css_tab_file_is_global(Info & i)
|
||||
int parcss = system->mounts.MountParCss();
|
||||
|
||||
if( mount_css_index < cur->mount->param[parcss].arg.size() )
|
||||
i.res = PT::is_substr(L"http://", cur->mount->param[parcss].arg[mount_css_index].c_str()) ||
|
||||
PT::is_substr(L"https://", cur->mount->param[parcss].arg[mount_css_index].c_str());
|
||||
i.res = pt::is_substr(L"http://", cur->mount->param[parcss].arg[mount_css_index].c_str()) ||
|
||||
pt::is_substr(L"https://", cur->mount->param[parcss].arg[mount_css_index].c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -99,14 +99,14 @@ void stat_item_privileges(Info & i)
|
||||
|
||||
void stat_item_date_creation(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->last_item->item_content.date_creation);
|
||||
pt::Date date = system->ToLocal(cur->request->last_item->item_content.date_creation);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
void stat_item_date_modification(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->last_item->item_content.date_modification);
|
||||
pt::Date date = system->ToLocal(cur->request->last_item->item_content.date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
@@ -472,7 +472,7 @@ return *this;
|
||||
|
||||
|
||||
|
||||
TexTextStream & TexTextStream::operator<<(const PT::Space & space)
|
||||
TexTextStream & TexTextStream::operator<<(const pt::Space & space)
|
||||
{
|
||||
tmp_stream.Clear();
|
||||
// !! IMPROVE ME
|
||||
@@ -485,7 +485,7 @@ return *this;
|
||||
}
|
||||
|
||||
|
||||
TexTextStream & TexTextStream::operator<<(const PT::Date & date)
|
||||
TexTextStream & TexTextStream::operator<<(const pt::Date & date)
|
||||
{
|
||||
tmp_stream.Clear();
|
||||
// !! IMPROVE ME
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
TexTextStream & operator<<(RawText<void*> raw);
|
||||
|
||||
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
|
||||
TexTextStream & operator<<(RawText<PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> > raw);
|
||||
TexTextStream & operator<<(RawText<pt::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> > raw);
|
||||
|
||||
|
||||
// 'write' don't escapes too
|
||||
@@ -175,11 +175,11 @@ public:
|
||||
TexTextStream & operator<<(unsigned long);
|
||||
TexTextStream & operator<<(double);
|
||||
TexTextStream & operator<<(const void *);
|
||||
TexTextStream & operator<<(const PT::Space & space);
|
||||
TexTextStream & operator<<(const PT::Date & Date);
|
||||
TexTextStream & operator<<(const pt::Space & space);
|
||||
TexTextStream & operator<<(const pt::Date & Date);
|
||||
|
||||
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
|
||||
TexTextStream & operator<<(const PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg);
|
||||
TexTextStream & operator<<(const pt::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg);
|
||||
|
||||
private:
|
||||
|
||||
@@ -189,7 +189,7 @@ private:
|
||||
|
||||
|
||||
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
|
||||
TexTextStream & TexTextStream::operator<<(RawText<PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> > raw)
|
||||
TexTextStream & TexTextStream::operator<<(RawText<pt::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> > raw)
|
||||
{
|
||||
TextStream<std::wstring>::operator<<(raw.par);
|
||||
|
||||
@@ -198,9 +198,9 @@ return *this;
|
||||
|
||||
|
||||
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
|
||||
TexTextStream & TexTextStream::operator<<(const PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg)
|
||||
TexTextStream & TexTextStream::operator<<(const pt::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg)
|
||||
{
|
||||
typename PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size>::const_iterator i;
|
||||
typename pt::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size>::const_iterator i;
|
||||
|
||||
for(i=arg.begin() ; i != arg.end() ; ++i)
|
||||
ETextPutChar(*i);
|
||||
|
||||
@@ -56,7 +56,7 @@ void winix_cur_time(Info & i)
|
||||
{
|
||||
static char buffer[100];
|
||||
|
||||
PT::Date & date = cur->request->start_date;
|
||||
pt::Date & date = cur->request->start_date;
|
||||
|
||||
sprintf(buffer, "%02d:%02d:%02d", date.hour, date.min, date.sec);
|
||||
i.out << buffer;
|
||||
|
||||
Reference in New Issue
Block a user