mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
Paged Article now also inherits from WebNode.
This commit is contained in:
parent
c6c9caed36
commit
4cbea7fd06
@ -8,7 +8,7 @@
|
||||
#include <tinydir/tinydir.h>
|
||||
#include <iostream>
|
||||
|
||||
void PagedArticle::index(Request *request) {
|
||||
void PagedArticle::handle_request_main(Request *request) {
|
||||
const String r = request->get_current_path_segment();
|
||||
|
||||
Article *s = pages[r];
|
||||
@ -222,7 +222,7 @@ void PagedArticle::generate_summary(Article *article) {
|
||||
}
|
||||
|
||||
PagedArticle::PagedArticle() :
|
||||
Object() {
|
||||
WebNode() {
|
||||
}
|
||||
|
||||
PagedArticle::~PagedArticle() {
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "core/string.h"
|
||||
|
||||
#include "core/file_cache.h"
|
||||
#include "core/object.h"
|
||||
#include "core/http/web_node.h"
|
||||
|
||||
#include "core/http/request.h"
|
||||
|
||||
@ -30,11 +30,11 @@ struct Article {
|
||||
}
|
||||
};
|
||||
|
||||
class PagedArticle : public Object {
|
||||
RCPP_OBJECT(PagedArticle, Object);
|
||||
class PagedArticle : public WebNode {
|
||||
RCPP_OBJECT(PagedArticle, WebNode);
|
||||
|
||||
public:
|
||||
void index(Request *request);
|
||||
void handle_request_main(Request *request);
|
||||
|
||||
void load();
|
||||
Article *load_folder(const String &folder, const String &path);
|
||||
|
@ -18,7 +18,7 @@ void PagedList::index(Request *request) {
|
||||
return;
|
||||
}
|
||||
|
||||
articles->index(request);
|
||||
articles->handle_request_main(request);
|
||||
}
|
||||
|
||||
void PagedList::load() {
|
||||
|
Loading…
Reference in New Issue
Block a user