added: plugins_dir to config
small changes in makefiles git-svn-id: svn://ttmath.org/publicrep/winix/trunk@643 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -74,7 +74,7 @@ bool App::CreateFCGISocket()
|
||||
|
||||
|
||||
|
||||
int s = FCGX_OpenSocket(sock, 10);
|
||||
int s = FCGX_OpenSocket(sock, 100);
|
||||
|
||||
if( s < 0 )
|
||||
{
|
||||
|
@@ -161,6 +161,8 @@ void Config::AssignValues(bool stdout_is_closed)
|
||||
editors_html_safe_mode = Bool("editors_html_safe_mode", true);
|
||||
editors_html_safe_mode_skip_root = Bool("editors_html_safe_mode_skip_root", true);
|
||||
|
||||
plugins_dir = Text("plugins_dir", "/usr/local/winix/plugins");
|
||||
NoLastSlash(plugins_dir);
|
||||
parser.ListText("plugins", plugin_file);
|
||||
}
|
||||
|
||||
|
@@ -103,7 +103,13 @@ public:
|
||||
// if the output is shorter than this value then it will not be compressed
|
||||
int compression_page_min_size;
|
||||
|
||||
// plugins directory
|
||||
// default: /usr/local/winix/plugins
|
||||
std::string plugins_dir;
|
||||
|
||||
// plugins
|
||||
// you can provide either a relative path (plugins_dir will be used)
|
||||
// or a full path to a plugin
|
||||
std::vector<std::string> plugin_file;
|
||||
|
||||
// should the html code be cleaned by the html filter
|
||||
|
@@ -109,12 +109,22 @@ return res;
|
||||
}
|
||||
|
||||
|
||||
void Plugin::LoadPlugins(const std::vector<std::string> & plugins)
|
||||
void Plugin::LoadPlugins(const std::string & plugins_dir, const std::vector<std::string> & plugins)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
for(i=0 ; i<plugins.size() ; ++i)
|
||||
LoadPlugin(plugins[i]);
|
||||
for(size_t i=0 ; i<plugins.size() ; ++i)
|
||||
{
|
||||
if( !plugins[i].empty() && plugins[i][0] == '/' )
|
||||
{
|
||||
LoadPlugin(plugins[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
temp_path = plugins_dir;
|
||||
temp_path += '/';
|
||||
temp_path += plugins[i];
|
||||
LoadPlugin(plugins[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -136,7 +136,7 @@ public:
|
||||
|
||||
void LoadPlugin(const char * filename);
|
||||
void LoadPlugin(const std::string & filename);
|
||||
void LoadPlugins(const std::vector<std::string> & plugins);
|
||||
void LoadPlugins(const std::string & plugins_dir, const std::vector<std::string> & plugins);
|
||||
void UnloadPlugins();
|
||||
|
||||
void Call(int message);
|
||||
@@ -167,6 +167,7 @@ private:
|
||||
Templates * templates;
|
||||
SessionManager * session_manager;
|
||||
|
||||
std::string temp_path;
|
||||
|
||||
struct PluginsItem
|
||||
{
|
||||
|
Reference in New Issue
Block a user