summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2015-05-03 10:15:39 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2015-05-03 10:15:39 +0200
commit399cea0f02b46d2253e5d8aa2a67e8f30271c23b (patch)
tree280c90d1aababcddeeff85750f5af4ce0e71fff8
parent6f7801f0c01b1b62a6b70dd2572d96cc82ff69b7 (diff)
downloadaCms-399cea0f02b46d2253e5d8aa2a67e8f30271c23b.tar.gz
aCms-399cea0f02b46d2253e5d8aa2a67e8f30271c23b.tar.bz2
fixed hard coded app links
-rw-r--r--TODOS5
-rw-r--r--src/master.cpp4
-rw-r--r--src/master_content.hpp8
3 files changed, 9 insertions, 8 deletions
diff --git a/TODOS b/TODOS
index a4e212c..af835f2 100644
--- a/TODOS
+++ b/TODOS
@@ -6,5 +6,6 @@
- check timeout when verifying the registration code of a user
- database model for a simple CMS
- http://www.techrepublic.com/article/two-ways-to-design-a-database-for-a-net-based-cms/
-
-
+- try to use the template mechanism for email in plain text and HTML,
+ the renderer should be callable outside the HTTP response mechanism
+
diff --git a/src/master.cpp b/src/master.cpp
index 95383d8..0699051 100644
--- a/src/master.cpp
+++ b/src/master.cpp
@@ -19,6 +19,10 @@ void master::ini( content::master &c )
} else {
c.username = "";
}
+ c.login_link = cms.root( ) + "/login";
+ c.logout_link = cms.root( ) + "/logout";
+ c.register_link = cms.root( ) + "/register";
+ c._root = cms.root( );
}
}
diff --git a/src/master_content.hpp b/src/master_content.hpp
index f1cd222..451ee7d 100644
--- a/src/master_content.hpp
+++ b/src/master_content.hpp
@@ -20,19 +20,15 @@ struct master : public cppcms::base_content {
std::string logout_link;
std::string register_link;
std::string username;
+ std::string _root;
public:
master( ) : cppcms::base_content( )
{
- // TODO: ini
- //~ c.login_link=wi.users.login_url();
- login_link = "/strusCms/login";
- logout_link = "/strusCms/logout";
- register_link = "/strusCms/register";
}
std::string root( ) {
- return "/strusCms";
+ return _root;
}
};