From: <wis...@us...> - 2017-07-30 12:38:49
|
Revision: 13262 http://sourceforge.net/p/xoops/svn/13262 Author: wishcraft Date: 2017-07-30 12:38:47 +0000 (Sun, 30 Jul 2017) Log Message: ----------- Webdav User Propogation & Management module! Modified Paths: -------------- XoopsModules/webdav/trunk/modules/webdav/xoops_version.php Added Paths: ----------- XoopsModules/webdav/trunk/modules/webdav/preloads/ XoopsModules/webdav/trunk/modules/webdav/sql/mysql.sql Added: XoopsModules/webdav/trunk/modules/webdav/sql/mysql.sql =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/sql/mysql.sql (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/sql/mysql.sql 2017-07-30 12:38:47 UTC (rev 13262) @@ -0,0 +1,167 @@ +-- -------------------------------------------------------- + +-- +-- Table structure for table `webdav_clients` +-- + +CREATE TABLE `webdav_clients` ( + `clientid` mediumint(15) NOT NULL, + `webdavid` int(11) NOT NULL DEFAULT '0', + `uid` int(11) NOT NULL DEFAULT '0', + `username` varchar(45) NOT NULL DEFAULT '', + `password` varchar(32) NOT NULL DEFAULT '', + `email` varchar(196) NOT NULL DEFAULT '', + `name` varchar(64) NOT NULL DEFAULT '', + `staging-file` varchar(64) NOT NULL DEFAULT '', + `created` int(11) NOT NULL DEFAULT '0', + `staged` int(11) NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `webdav_files` +-- + +CREATE TABLE `webdav_files` ( + `fileid` mediumint(42) NOT NULL, + `folderid` mediumint(32) NOT NULL DEFAULT '0', + `webdavid` int(11) NOT NULL DEFAULT '0', + `type` enum('script','image','data','unknown') NOT NULL DEFAULT 'unknown', + `commonality-key` varchar(32) NOT NULL DEFAULT '', + `releases-hashinfo` varchar(32) NOT NULL DEFAULT '', + `fingerprint` varchar(44) NOT NULL DEFAULT '', + `path` varchar(255) NOT NULL DEFAULT '', + `filename` varchar(128) NOT NULL DEFAULT '', + `mime-type` varchar(64) NOT NULL DEFAULT '', + `extension` varchar(32) NOT NULL DEFAULT '', + `bytes` int(11) NOT NULL DEFAULT '0', + `found` int(11) NOT NULL DEFAULT '0', + `fingerprinted` int(11) NOT NULL DEFAULT '0', + `shipped` int(11) NOT NULL DEFAULT '0', + `written` int(11) NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `webdav_folders` +-- + +CREATE TABLE `webdav_folders` ( + `folderid` mediumint(32) NOT NULL, + `parent_fid` mediumint(32) NOT NULL, + `webdavid` int(11) NOT NULL, + `commonality-key` varchar(32) NOT NULL DEFAULT '', + `releases-hashinfo` varchar(32) NOT NULL DEFAULT '', + `primary` varchar(64) NOT NULL DEFAULT '', + `path` varchar(255) NOT NULL DEFAULT '', + `fingerprint` varchar(44) NOT NULL DEFAULT '', + `folders` int(11) NOT NULL DEFAULT '0', + `deleted` int(11) NOT NULL DEFAULT '0', + `renegade` int(11) NOT NULL DEFAULT '0', + `files` int(11) NOT NULL DEFAULT '0', + `bytes-files` mediumint(24) NOT NULL DEFAULT '0', + `bytes-deleted` mediumint(24) NOT NULL DEFAULT '0', + `bytes-renegade` mediumint(24) NOT NULL DEFAULT '0', + `created` int(11) NOT NULL DEFAULT '0', + `hunted` int(11) NOT NULL DEFAULT '0', + `fingerprinted` int(11) DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `webdav_webdavs` +-- + +CREATE TABLE `webdav_webdavs` ( + `webdav_id` int(11) NOT NULL, + `uid` int(11) NOT NULL, + `username` varchar(45) NOT NULL DEFAULT '', + `hashinfo` varchar(15) NOT NULL DEFAULT '', + `hostname` varchar(255) NOT NULL DEFAULT '', + `path` varchar(255) NOT NULL DEFAULT '', + `site-config-file` varchar(255) NOT NULL DEFAULT '', + `support-ssl` enum('Yes','No') NOT NULL DEFAULT 'No', + `online` int(11) NOT NULL DEFAULT '0', + `staging-cron` varchar(128) NOT NULL DEFAULT '', + `salt` varchar(64) NOT NULL DEFAULT '', + `created` int(11) NOT NULL DEFAULT '0', + `staged` int(11) NOT NULL DEFAULT '0', + `folders-created` int(11) NOT NULL DEFAULT '0', + `folders-exist` int(11) NOT NULL DEFAULT '0', + `folders-deleted` int(11) NOT NULL DEFAULT '0', + `files-created` int(11) NOT NULL DEFAULT '0', + `files-exist` int(11) NOT NULL DEFAULT '0', + `files-deleted` int(11) NOT NULL DEFAULT '0', + `bytes-files-created` mediumint(28) NOT NULL DEFAULT '0', + `bytes-files-exist` mediumint(28) NOT NULL DEFAULT '0', + `bytes-files-deleted` mediumint(28) NOT NULL DEFAULT '0', + `reneaged-created` int(11) NOT NULL DEFAULT '0', + `reneaged-exist` int(11) NOT NULL DEFAULT '0', + `reneaged-deleted` int(11) NOT NULL DEFAULT '0', + `bytes-reneaged-created` mediumint(28) NOT NULL DEFAULT '0', + `bytes-reneaged-exist` mediumint(28) NOT NULL DEFAULT '0', + `bytes-reneaged-deleted` mediumint(28) NOT NULL DEFAULT '0', + `root-folders` mediumtext, + `folders-hunted` int(11) NOT NULL DEFAULT '0', + `files-hunted` int(11) NOT NULL DEFAULT '0', + `renegade-hunted` int(11) NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Indexes for dumped tables +-- + +-- +-- Indexes for table `webdav_clients` +-- +ALTER TABLE `webdav_clients` + ADD PRIMARY KEY (`clientid`); + +-- +-- Indexes for table `webdav_files` +-- +ALTER TABLE `webdav_files` + ADD PRIMARY KEY (`fileid`), + ADD KEY `SEARCH` (`folderid`,`webdavid`,`commonality-key`,`type`,`releases-hashinfo`,`fingerprint`,`path`,`filename`,`mime-type`,`extension`,`found`,`fingerprinted`,`shipped`,`written`); + +-- +-- Indexes for table `webdav_folders` +-- +ALTER TABLE `webdav_folders` + ADD PRIMARY KEY (`folderid`), + ADD KEY `SEARCH` (`parent_fid`,`webdavid`,`fingerprint`,`primary`,`folders`,`deleted`,`renegade`,`files`,`hunted`,`created`,`fingerprinted`); + +-- +-- Indexes for table `webdav_webdavs` +-- +ALTER TABLE `webdav_webdavs` + ADD PRIMARY KEY (`webdav_id`,`uid`), + ADD KEY `SEARCH` (`uid`,`webdav_id`,`username`,`hashinfo`,`support-ssl`,`staging-cron`); + +-- +-- AUTO_INCREMENT for dumped tables +-- + +-- +-- AUTO_INCREMENT for table `webdav_clients` +-- +ALTER TABLE `webdav_clients` + MODIFY `clientid` mediumint(15) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `webdav_files` +-- +ALTER TABLE `webdav_files` + MODIFY `fileid` mediumint(42) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `webdav_folders` +-- +ALTER TABLE `webdav_folders` + MODIFY `folderid` mediumint(32) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `webdav_webdavs` +-- +ALTER TABLE `webdav_webdavs` + MODIFY `webdav_id` int(11) NOT NULL AUTO_INCREMENT; Modified: XoopsModules/webdav/trunk/modules/webdav/xoops_version.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/xoops_version.php 2017-07-30 10:15:16 UTC (rev 13261) +++ XoopsModules/webdav/trunk/modules/webdav/xoops_version.php 2017-07-30 12:38:47 UTC (rev 13262) @@ -73,8 +73,10 @@ // database tables $modversion["sqlfile"]["mysql"] = "sql/mysql.sql"; $modversion["tables"] = array( - "languages_languages", - "languages_users" + "webdav_clients", + "webdav_files", + "webdav_folders", + "webdav_webdavs" ); // Main @@ -89,7 +91,7 @@ // Search $modversion["hasSearch"] = WEBDAV_MI_HASSEARCH; $modversion['search']['file'] = "include/search.inc.php"; -$modversion['search']['func'] = "languages_search"; +$modversion['search']['func'] = "webdav_search"; // Comments $modversion["hasComments"] = WEBDAV_MI_HASCOMMENTS; @@ -200,7 +202,7 @@ "description" => "WEBDAV_MI_ROOT_PATH_DESC", "formtype" => "textbox", "valuetype" => "text", - "default" => strtolower('/var/www/'.basename(__DIR__) . '.' . parse_url(XOOPS_URL, PHP_URL_HOST)), + "default" => strtolower('/var/www/' . basename(__DIR__) . '.' . parse_url(XOOPS_URL, PHP_URL_HOST)), "category" => "paths" ); @@ -220,7 +222,7 @@ "description" => "WEBDAV_MI_HTPASSWD_PATH_DESC", "formtype" => "textbox", "valuetype" => "text", - "default" => strtolower('/var/www/'.basename(__DIR__) . '.' . parse_url(XOOPS_URL, PHP_URL_HOST) . DIRECTORY_SEPARATOR . '.htpasswd'), + "default" => strtolower('/var/www/' . basename(__DIR__) . '.' . parse_url(XOOPS_URL, PHP_URL_HOST) . DIRECTORY_SEPARATOR . '.htpasswd'), "category" => "paths" ); @@ -235,6 +237,16 @@ ); $modversion["config"][] = array( + "name" => "folder_data", + "title" => "WEBDAV_MI_FOLDER_DATA", + "description" => "WEBDAV_MI_FOLDER_DATA_DESC", + "formtype" => "textbox", + "valuetype" => "text", + "default" => basename(__DIR__), + "category" => "paths" + ); + +$modversion["config"][] = array( "name" => "folder_core", "title" => "WEBDAV_MI_FOLDER_CORE", "description" => "WEBDAV_MI_FOLDER_CORE_DESC", @@ -405,21 +417,21 @@ ); $modversion["config"][] = array( - "name" => "path_element", - "title" => "WEBDAV_MI_PATHELEMENT", - "description" => "WEBDAV_MI_PATHELEMENT_DESC", + "name" => "hostname_element", + "title" => "WEBDAV_MI_HOSTNAME_ELEMENT", + "description" => "WEBDAV_MI_HOSTNAME_ELEMENT_DESC", "formtype" => "radio", "valuetype" => "text", "default" => "hashinfo", - "options" => array( "hashinfo" => WEBDAV_MI_PATHELEMENT_HASHINFO, - "username" => WEBDAV_MI_PATHELEMENT_USERNAME ), + "options" => array( "hashinfo" => WEBDAV_MI_HOSTNAME_ELEMENT_HASHINFO, + "username" => WEBDAV_MI_HOSTNAME_ELEMENT_USERNAME ), "category" => "users" ); $modversion["config"][] = array( - "name" => "permissiables_mode", - "title" => "WEBDAV_MI_PERMISSIABLES_MODE", - "description" => "WEBDAV_MI_PERMISSIABLES_MODE_DESC", + "name" => "permissiables_files", + "title" => "WEBDAV_MI_PERMISSIABLES_FILES", + "description" => "WEBDAV_MI_PERMISSIABLES_FILES_DESC", "formtype" => "textbox", "valuetype" => "text", "default" => 'chmod -Rf 0777 %s', @@ -427,9 +439,9 @@ ); $modversion["config"][] = array( - "name" => "permissiables_user", - "title" => "WEBDAV_MI_PERMISSIABLES_USER", - "description" => "WEBDAV_MI_PERMISSIABLES_USER_DESC", + "name" => "permissiables_apache2", + "title" => "WEBDAV_MI_PERMISSIABLES_APACHE2", + "description" => "WEBDAV_MI_PERMISSIABLES_APACHE2_DESC", "formtype" => "textbox", "valuetype" => "text", "default" => 'chown -Rf www-data:www-data %s', |
From: <wis...@us...> - 2017-07-30 14:40:18
|
Revision: 13263 http://sourceforge.net/p/xoops/svn/13263 Author: wishcraft Date: 2017-07-30 14:40:15 +0000 (Sun, 30 Jul 2017) Log Message: ----------- Webdav User Propogation & Management module! Modified Paths: -------------- XoopsModules/webdav/trunk/modules/webdav/sql/mysql.sql XoopsModules/webdav/trunk/modules/webdav/xoops_version.php Added Paths: ----------- XoopsModules/webdav/trunk/modules/webdav/class/callbacks.php XoopsModules/webdav/trunk/modules/webdav/class/clients.php XoopsModules/webdav/trunk/modules/webdav/class/files.php XoopsModules/webdav/trunk/modules/webdav/class/folders.php XoopsModules/webdav/trunk/modules/webdav/class/webdavs.php XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-nossl-config-template.conf XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-ssl-config-template.conf XoopsModules/webdav/trunk/modules/webdav/include/data/awstats-config-template.conf Added: XoopsModules/webdav/trunk/modules/webdav/class/callbacks.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/class/callbacks.php (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/class/callbacks.php 2017-07-30 14:40:15 UTC (rev 13263) @@ -0,0 +1,78 @@ +<?php +/** + * XOOPS Webdav Propogating + Management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage webdav + * @description Module for controlling and propogating webdav resources for XOOPS Users + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link http://internetfounder.wordpress.com + */ + + + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +class WebdavCallbacks extends XoopsObject +{ + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("callbackid", XOBJ_DTYPE_INT, null, false); + $this->initVar("webdavid", XOBJ_DTYPE_INT, null, false); + $this->initVar("uid", XOBJ_DTYPE_INT, null, false); + $this->initVar("clientid", XOBJ_DTYPE_INT, null, false); + $this->initVar("url", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("fields", XOBJ_DTYPE_ARRAY, array(), false); + $this->initVar("created", XOBJ_DTYPE_INT, null, false); + $this->initVar("called", XOBJ_DTYPE_INT, null, false); + $this->initVar("deleted", XOBJ_DTYPE_INT, null, false); + } +} + +/** + * Tag object handler class. + * + * @author Taiwen Jiang <ph...@us...> + * @copyright copyright © The XOOPS Project + * + * {@link XoopsPersistableObjectHandler} + * + */ + +class WebdavCallbacksHandler extends XoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "webdav_callbacks", "WebdavCallbacks", "callbackid", "url"); + } + + +} +?> \ No newline at end of file Property changes on: XoopsModules/webdav/trunk/modules/webdav/class/callbacks.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/class/clients.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/class/clients.php (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/class/clients.php 2017-07-30 14:40:15 UTC (rev 13263) @@ -0,0 +1,85 @@ +<?php +/** + * XOOPS Webdav Propogating + Management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage webdav + * @description Module for controlling and propogating webdav resources for XOOPS Users + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link http://internetfounder.wordpress.com + */ + + + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +class WebdavClients extends XoopsObject +{ + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("clientid", XOBJ_DTYPE_INT, null, false); + $this->initVar("webdavid", XOBJ_DTYPE_INT, null, false); + $this->initVar("uid", XOBJ_DTYPE_INT, null, false); + $this->initVar("api-url", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("api-calls", XOBJ_DTYPE_INT, null, false); + $this->initVar("api-response", XOBJ_DTYPE_INT, null, false); + $this->initVar("api-result", XOBJ_DTYPE_OTHER, '', false); + $this->initVar("api-errors", XOBJ_DTYPE_INT, null, false); + $this->initVar("api-errored", XOBJ_DTYPE_INT, null, false); + $this->initVar("username", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("password", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("email", XOBJ_DTYPE_TXTBOX, null, false, 196); + $this->initVar("name", XOBJ_DTYPE_TXTBOX, null, false, 128); + $this->initVar("staging-file", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("created", XOBJ_DTYPE_INT, null, false); + $this->initVar("staged", XOBJ_DTYPE_INT, null, false); + } +} + +/** + * Tag object handler class. + * + * @author Taiwen Jiang <ph...@us...> + * @copyright copyright © The XOOPS Project + * + * {@link XoopsPersistableObjectHandler} + * + */ + +class WebdavClientsHandler extends XoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "webdav_clients", "WebdavClients", "clientid", "username"); + } + + +} +?> \ No newline at end of file Property changes on: XoopsModules/webdav/trunk/modules/webdav/class/clients.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/class/files.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/class/files.php (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/class/files.php 2017-07-30 14:40:15 UTC (rev 13263) @@ -0,0 +1,88 @@ +<?php +/** + * XOOPS Webdav Propogating + Management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage webdav + * @description Module for controlling and propogating webdav resources for XOOPS Users + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link http://internetfounder.wordpress.com + */ + + + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +class WebdavFiles extends XoopsObject +{ + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("fileid", XOBJ_DTYPE_INT, null, false); + $this->initVar("folderid", XOBJ_DTYPE_INT, null, false); + $this->initVar("webdavid", XOBJ_DTYPE_INT, null, false); + $this->initVar("uid", XOBJ_DTYPE_INT, null, false); + $this->initVar("key", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("type", XOBJ_DTYPE_ENUM, 'unknown', false, false, false, array('script','image','data','unknown')); + $this->initVar("commonality-key", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("releases-hashinfo", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("fingerprint", XOBJ_DTYPE_TXTBOX, null, false, 44); + $this->initVar("path", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("filename", XOBJ_DTYPE_TXTBOX, null, false, 128); + $this->initVar("mime-type", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("extension", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("bytes", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-edited", XOBJ_DTYPE_INT, null, false); + $this->initVar("found", XOBJ_DTYPE_INT, null, false); + $this->initVar("fingerprinted", XOBJ_DTYPE_INT, null, false); + $this->initVar("shipped", XOBJ_DTYPE_INT, null, false); + $this->initVar("edited", XOBJ_DTYPE_INT, null, false); + } +} + +/** + * Tag object handler class. + * + * @author Taiwen Jiang <ph...@us...> + * @copyright copyright © The XOOPS Project + * + * {@link XoopsPersistableObjectHandler} + * + */ + +class WebdavFilesHandler extends XoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "webdav_files", "WebdavFiles", "fileid", "filename"); + } + + +} +?> \ No newline at end of file Property changes on: XoopsModules/webdav/trunk/modules/webdav/class/files.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/class/folders.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/class/folders.php (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/class/folders.php 2017-07-30 14:40:15 UTC (rev 13263) @@ -0,0 +1,95 @@ +<?php +/** + * XOOPS Webdav Propogating + Management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage webdav + * @description Module for controlling and propogating webdav resources for XOOPS Users + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link http://internetfounder.wordpress.com + */ + + + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +class WebdavFolders extends XoopsObject +{ + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("folderid", XOBJ_DTYPE_INT, null, false); + $this->initVar("parent_fid", XOBJ_DTYPE_INT, null, false); + $this->initVar("webdavid", XOBJ_DTYPE_INT, null, false); + $this->initVar("uid", XOBJ_DTYPE_INT, null, false); + $this->initVar("key", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("renagading", XOBJ_DTYPE_ENUM, 'No', false, 255, false, array('Yes','No')); + $this->initVar("academic-license", XOBJ_DTYPE_ENUM, 'No', false, 255, false, array('Yes','No')); + $this->initVar("license-key", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("commonality-key", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("releases-hashinfo", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("primary", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("path", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("fingerprint", XOBJ_DTYPE_TXTBOX, null, false, 44); + $this->initVar("folders", XOBJ_DTYPE_INT, null, false); + $this->initVar("deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("renegade", XOBJ_DTYPE_INT, null, false); + $this->initVar("files", XOBJ_DTYPE_INT, null, false); + $this->initVar("edited", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-files", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-renegade", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-edited", XOBJ_DTYPE_INT, null, false); + $this->initVar("created", XOBJ_DTYPE_INT, null, false); + $this->initVar("hunted", XOBJ_DTYPE_INT, null, false); + $this->initVar("fingerprinted", XOBJ_DTYPE_INT, null, false); + + } +} + +/** + * Tag object handler class. + * + * @author Taiwen Jiang <ph...@us...> + * @copyright copyright © The XOOPS Project + * + * {@link XoopsPersistableObjectHandler} + * + */ + +class WebdavFoldersHandler extends XoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "webdav_folders", "WebdavFolders", "folderid", "path"); + } + + +} +?> \ No newline at end of file Property changes on: XoopsModules/webdav/trunk/modules/webdav/class/folders.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/class/webdavs.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/class/webdavs.php (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/class/webdavs.php 2017-07-30 14:40:15 UTC (rev 13263) @@ -0,0 +1,111 @@ +<?php +/** + * XOOPS Webdav Propogating + Management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage webdav + * @description Module for controlling and propogating webdav resources for XOOPS Users + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link http://internetfounder.wordpress.com + */ + + + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +class WebdavWebdavs extends XoopsObject +{ + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("webdavid", XOBJ_DTYPE_INT, null, false); + $this->initVar("uid", XOBJ_DTYPE_INT, null, false); + $this->initVar("key", XOBJ_DTYPE_TXTBOX, null, false, 32); + $this->initVar("clients", XOBJ_DTYPE_INT, null, false); + $this->initVar("client-apis", XOBJ_DTYPE_INT, null, false); + $this->initVar("username", XOBJ_DTYPE_TXTBOX, null, false, 45); + $this->initVar("hashinfo", XOBJ_DTYPE_TXTBOX, null, false, 15); + $this->initVar("hostname", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("path", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("htpasswd-file", XOBJ_DTYPE_TXTBOX, null, false, 128); + $this->initVar("apache2-config", XOBJ_DTYPE_TXTBOX, null, false, 128); + $this->initVar("awstats-config", XOBJ_DTYPE_TXTBOX, null, false, 128); + $this->initVar("apache2-config-updated", XOBJ_DTYPE_INT, null, false); + $this->initVar("awstats-config-updated", XOBJ_DTYPE_INT, null, false); + $this->initVar("support-ssl", XOBJ_DTYPE_ENUM, 'No', false, 255, false, array('Yes','No')); + $this->initVar("apache2-ssl-updated", XOBJ_DTYPE_INT, null, false); + $this->initVar("awstats-ssl-updated", XOBJ_DTYPE_INT, null, false); + $this->initVar("online", XOBJ_DTYPE_INT, null, false); + $this->initVar("staging-cron", XOBJ_DTYPE_TXTBOX, null, false, 128); + $this->initVar("salt", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("created", XOBJ_DTYPE_INT, null, false); + $this->initVar("staged", XOBJ_DTYPE_INT, null, false); + $this->initVar("folders-created", XOBJ_DTYPE_INT, null, false); + $this->initVar("folders-exist", XOBJ_DTYPE_INT, null, false); + $this->initVar("folders-deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("files-created", XOBJ_DTYPE_INT, null, false); + $this->initVar("files-exist", XOBJ_DTYPE_INT, null, false); + $this->initVar("files-deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-files-created", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-files-exist", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-files-deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("renegade-created", XOBJ_DTYPE_INT, null, false); + $this->initVar("renegade-exist", XOBJ_DTYPE_INT, null, false); + $this->initVar("renegade-deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-renegade-created", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-renegade-exist", XOBJ_DTYPE_INT, null, false); + $this->initVar("bytes-renegade-deleted", XOBJ_DTYPE_INT, null, false); + $this->initVar("root-folders", XOBJ_DTYPE_ARRAY, array(), false); + $this->initVar("folders-hunted", XOBJ_DTYPE_INT, null, false); + $this->initVar("files-hunted", XOBJ_DTYPE_INT, null, false); + $this->initVar("renegade-hunted", XOBJ_DTYPE_INT, null, false); + + } +} + +/** + * Tag object handler class. + * + * @author Taiwen Jiang <ph...@us...> + * @copyright copyright © The XOOPS Project + * + * {@link XoopsPersistableObjectHandler} + * + */ + +class WebdavWebdavsHandler extends XoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "webdav_webdavs", "WebdavWebdavs", "webdavid", "hostname"); + } + + +} +?> \ No newline at end of file Property changes on: XoopsModules/webdav/trunk/modules/webdav/class/webdavs.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-nossl-config-template.conf =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-nossl-config-template.conf (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-nossl-config-template.conf 2017-07-30 14:40:15 UTC (rev 13263) @@ -0,0 +1,16 @@ +<VirtualHost *:80> + ServerName %hostname% + ServerAdmin %email% + DocumentRoot %path% + ErrorLog /var/log/apache2/%hostname%-error.log + CustomLog /var/log/apache2/%hostname%-access.log common + <Directory %path%> + Options Indexes FollowSymLinks MultiViews + AllowOverride none + DAV On + AuthType Basic + AuthName "%title%" + AuthUserFile %htpasswd% + Require valid-user + </Directory> +</VirtualHost> \ No newline at end of file Added: XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-ssl-config-template.conf =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-ssl-config-template.conf (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-ssl-config-template.conf 2017-07-30 14:40:15 UTC (rev 13263) @@ -0,0 +1,33 @@ +<VirtualHost *:80> + ServerName %hostname% + ServerAdmin %email% + DocumentRoot %path% + ErrorLog /var/log/apache2/%hostname%-error.log + CustomLog /var/log/apache2/%hostname%-access.log common + <Directory %path%> + Options Indexes FollowSymLinks MultiViews + AllowOverride none + DAV On + AuthType Basic + AuthName "%title%" + AuthUserFile %htpasswd% + Require valid-user + </Directory> +</VirtualHost> + +<VirtualHost *:443> + ServerName %hostname% + ServerAdmin %email% + DocumentRoot %path% + ErrorLog /var/log/apache2/%hostname%-error.log + CustomLog /var/log/apache2/%hostname%-access.log common + <Directory %path%> + Options Indexes FollowSymLinks MultiViews + AllowOverride none + DAV On + AuthType Basic + AuthName "%title%" + AuthUserFile %htpasswd% + Require valid-user + </Directory> +</VirtualHost> \ No newline at end of file Added: XoopsModules/webdav/trunk/modules/webdav/include/data/awstats-config-template.conf =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/include/data/awstats-config-template.conf (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/include/data/awstats-config-template.conf 2017-07-30 14:40:15 UTC (rev 13263) @@ -0,0 +1,176 @@ + + +#----------------------------------------------------------------------------- +# MAIN SETUP SECTION (Required to make AWStats work) +#----------------------------------------------------------------------------- + +# "LogFile" contains the web, ftp or mail server log file to analyze. +# Possible values: A full path, or a relative path from awstats.pl directory. +# Example: "/var/log/apache/access.log" +# Example: "../logs/mycombinedlog.log" +# You can also use tags in this filename if you need a dynamic file name +# depending on date or time (Replacement is made by AWStats at the beginning +# of its execution). This is available tags : +# %YYYY-n is replaced with 4 digits year we were n hours ago +# %YY-n is replaced with 2 digits year we were n hours ago +# %MM-n is replaced with 2 digits month we were n hours ago +# %MO-n is replaced with 3 letters month we were n hours ago +# %DD-n is replaced with day we were n hours ago +# %HH-n is replaced with hour we were n hours ago +# %NS-n is replaced with number of seconds at 00:00 since 1970 +# %WM-n is replaced with the week number in month (1-5) +# %Wm-n is replaced with the week number in month (0-4) +# %WY-n is replaced with the week number in year (01-52) +# %Wy-n is replaced with the week number in year (00-51) +# %DW-n is replaced with the day number in week (1-7, 1=sunday) +# use n=24 if you need (1-7, 1=monday) +# %Dw-n is replaced with the day number in week (0-6, 0=sunday) +# use n=24 if you need (0-6, 0=monday) +# Use 0 for n if you need current year, month, day, hour... +# Example: "/var/log/access_log.%YYYY-0%MM-0%DD-0.log" +# Example: "C:/WINNT/system32/LogFiles/W3SVC1/ex%YY-24%MM-24%DD-24.log" +# You can also use a pipe if log file come from a pipe : +# Example: "gzip -cd /var/log/apache/access.log.gz |" +# If there are several log files from load balancing servers : +# Example: "/pathtotools/logresolvemerge.pl *.log |" +# +LogFile="/var/log/apache2/%hostname%-access.log" + + +# Enter the log file type you want to analyze. +# Possible values: +# W - For a web log file +# S - For a streaming log file +# M - For a mail log file +# F - For a ftp log file +# Example: W +# Default: W +# +LogType=W + + +# Enter here your log format (Must match your web server config. See setup +# instructions in documentation to know how to configure your web server to +# have the required log format). +# Possible values: 1,2,3,4 or "your_own_personalized_log_format" +# 1 - Apache or Lotus Notes/Domino native combined log format (NCSA combined/XLF/ELF log format) +# 2 - IIS or ISA format (IIS W3C log format). See FAQ-COM115 For ISA. +# 3 - Webstar native log format. +# 4 - Apache or Squid native common log format (NCSA common/CLF log format) +# With LogFormat=4, some features (browsers, os, keywords...) can't work. +# "your_own_personalized_log_format" = If your log is ftp, mail or other format, +# you must use following keys to define the log format string (See FAQ for +# ftp, mail or exotic web log format examples): +# %host Client hostname or IP address (or Sender host for mail log) +# %host_r Receiver hostname or IP address (for mail log) +# %lognamequot Authenticated login/user with format: "john" +# %logname Authenticated login/user with format: john +# %time1 Date and time with format: [dd/mon/yyyy:hh:mm:ss +0000] or [dd/mon/yyyy:hh:mm:ss] +# %time2 Date and time with format: yyyy-mm-dd hh:mm:ss +# %time3 Date and time with format: Mon dd hh:mm:ss or Mon dd hh:mm:ss yyyy +# %time4 Date and time with unix timestamp format: dddddddddd +# %time5 Date and time with format iso: yyyy-mm-ddThh:mm:ss, with optional timezone specification (ignored) +# %methodurl Method and URL with format: "GET /index.html HTTP/x.x" +# %methodurlnoprot Method and URL with format: "GET /index.html" +# %method Method with format: GET +# %url URL only with format: /index.html +# %query Query string (used by URLWithQuery option) +# %code Return code status (with format for web log: 999) +# %bytesd Size of document in bytes +# %refererquot Referer page with format: "http://from.com/from.htm" +# %referer Referer page with format: http://from.com/from.htm +# %uabracket User agent with format: [Mozilla/4.0 (compatible, ...)] +# %uaquot User agent with format: "Mozilla/4.0 (compatible, ...)" +# %ua User agent with format: Mozilla/4.0_(compatible...) +# %gzipin mod_gzip compression input bytes: In:XXX +# %gzipout mod_gzip compression output bytes & ratio: Out:YYY:ZZpct. +# %gzipratio mod_gzip compression ratio: ZZpct. +# %deflateratio mod_deflate compression ratio with format: (ZZ) +# %email EMail sender (for mail log) +# %email_r EMail receiver (for mail log) +# %virtualname Web sever virtual hostname. Use this tag when same log +# contains data of several virtual web servers. AWStats +# will discard records not in SiteDomain nor HostAliases +# %cluster If log file is provided from several computers (merged by +# logresolvemerge.pl), use this to define cluster id field. +# %extraX Another field that you plan to use for building a +# personalized report with ExtraSection feature (See later). +# If your log format has some fields not included in this list, use: +# %other Means another not used field +# %otherquot Means another not used double quoted field +# If your log format has some literal strings, which precede data fields, use +# status=%code Means your log files have HTTP status logged as "status=200" +# Literal strings that follow data field must be separated from said data fields by space. +# +# Examples for Apache combined logs (following two examples are equivalent): +# LogFormat = 1 +# LogFormat = "%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot" +# +# Example for IIS: +# LogFormat = 2 +# +LogFormat=1 + + +# If your log field's separator is not a space, you can change this parameter. +# This parameter is not used if LogFormat is a predefined value (1,2,3,4) +# Backslash can be used as escape character. +# Example: " " +# Example: "\t" +# Example: "\|" +# Example: "," +# Default: " " +# +LogSeparator=" " + + +# "SiteDomain" must contain the main domain name, or the main intranet web +# server name, used to reach the web site. +# If you share the same log file for several virtual web servers, this +# parameter is used to tell AWStats to filter record that contains records for +# this virtual host name only (So check that this virtual hostname can be +# found in your log file and use a personalized log format that include the +# %virtualname tag). +# But for multi hosting a better solution is to have one log file for each +# virtual web server. In this case, this parameter is only used to generate +# full URL's links when ShowLinksOnUrl option is set to 1. +# If analyzing mail log, enter here the domain name of mail server. +# Example: "myintranetserver" +# Example: "www.domain.com" +# Example: "ftp.domain.com" +# Example: "domain.com" +# +SiteDomain="%hostname%" + + +# Enter here all other possible domain names, addresses or virtual host +# aliases someone can use to access your site. Try to keep only the minimum +# number of possible names/addresses to have the best performances. +# You can repeat the "SiteDomain" value in this list. +# This parameter is used to analyze referer field in log file and to help +# AWStats to know if a referer URL is a local URL of same site or an URL of +# another site. +# Note: Use space between each value. +# Note: You can use regular expression values writing value with REGEX[value]. +# Note: You can also use @/mypath/myfile if list of aliases are in a file. +# Example: "www.myserver.com localhost 127.0.0.1 REGEX[mydomain\.(net|org)$]" +# +HostAliases="localhost 127.0.0.1 REGEX[([a-zA-Z0-9\-\.\_]+)(%hostname%)$] %hostname%" + + +# When AWStats updates its statistics, it stores results of its analysis in +# files (AWStats database). All those files are written in the directory +# defined by the "DirData" parameter. Set this value to the directory where +# you want AWStats to save its database and working files into. +# Warning: If you want to be able to use the "AllowToUpdateStatsFromBrowser" +# feature (see later), you need "Write" permissions by web server user on this +# directory (and "Modify" for Windows NTFS file systems). +# Example: "/var/lib/awstats" +# Example: "../data" +# Example: "C:/awstats_data_dir" +# Default: "." (means same directory as awstats.pl) +# +DirData="/var/lib/awstats/%hostname%" + + +Include "/etc/awstats/awstats.default.conf" Modified: XoopsModules/webdav/trunk/modules/webdav/sql/mysql.sql =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/sql/mysql.sql 2017-07-30 12:38:47 UTC (rev 13262) +++ XoopsModules/webdav/trunk/modules/webdav/sql/mysql.sql 2017-07-30 14:40:15 UTC (rev 13263) @@ -1,13 +1,27 @@ --- -------------------------------------------------------- +CREATE TABLE `webdav_callbacks` ( + `callbackid` mediumint(15) NOT NULL AUTO_INCREMENT, + `webdavid` int(11) NOT NULL DEFAULT '0', + `uid` int(11) NOT NULL DEFAULT '0', + `clientid` mediumint(15) NOT NULL DEFAULT '0', + `url` varchar(255) NOT NULL DEFAULT '', + `fields` mediumint, + `created` int(11) NOT NULL DEFAULT '0', + `called` int(11) NOT NULL DEFAULT '0', + `deleted` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`callbackid`), + KEY `SEARCH` (`webdavid`,`uid`,`clientid`,`created`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- --- Table structure for table `webdav_clients` --- - CREATE TABLE `webdav_clients` ( - `clientid` mediumint(15) NOT NULL, + `clientid` mediumint(15) NOT NULL AUTO_INCREMENT, `webdavid` int(11) NOT NULL DEFAULT '0', `uid` int(11) NOT NULL DEFAULT '0', + `api-url` varchar(255) NOT NULL DEFAULT '', + `api-calls` int(11) NOT NULL DEFAULT '0', + `api-response` int(11) NOT NULL DEFAULT '0', + `api-result` mediumtext, + `api-errors` int(11) NOT NULL DEFAULT '0', + `api-errored` int(11) NOT NULL DEFAULT '0', `username` varchar(45) NOT NULL DEFAULT '', `password` varchar(32) NOT NULL DEFAULT '', `email` varchar(196) NOT NULL DEFAULT '', @@ -14,19 +28,17 @@ `name` varchar(64) NOT NULL DEFAULT '', `staging-file` varchar(64) NOT NULL DEFAULT '', `created` int(11) NOT NULL DEFAULT '0', - `staged` int(11) NOT NULL DEFAULT '0' -) ENGINE=InnoDB DEFAULT CHARSET=latin1; + `staged` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`clientid`), + KEY `SEARCH` (`webdavid`,`uid`,`username`,`password`,`staging-file`,`staged`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- -------------------------------------------------------- - --- --- Table structure for table `webdav_files` --- - CREATE TABLE `webdav_files` ( - `fileid` mediumint(42) NOT NULL, + `fileid` mediumint(42) NOT NULL AUTO_INCREMENT, `folderid` mediumint(32) NOT NULL DEFAULT '0', `webdavid` int(11) NOT NULL DEFAULT '0', + `uid` int(11) NOT NULL DEFAULT '0', + `key` varchar(32) NOT NULL DEFAULT '', `type` enum('script','image','data','unknown') NOT NULL DEFAULT 'unknown', `commonality-key` varchar(32) NOT NULL DEFAULT '', `releases-hashinfo` varchar(32) NOT NULL DEFAULT '', @@ -36,22 +48,24 @@ `mime-type` varchar(64) NOT NULL DEFAULT '', `extension` varchar(32) NOT NULL DEFAULT '', `bytes` int(11) NOT NULL DEFAULT '0', + `bytes-edited` int(11) NOT NULL DEFAULT '0', `found` int(11) NOT NULL DEFAULT '0', `fingerprinted` int(11) NOT NULL DEFAULT '0', `shipped` int(11) NOT NULL DEFAULT '0', - `written` int(11) NOT NULL DEFAULT '0' -) ENGINE=InnoDB DEFAULT CHARSET=latin1; + `edited` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`fileid`), + KEY `SEARCH` (`folderid`,`webdavid`,`uid`,`key`,`commonality-key`,`type`,`releases-hashinfo`,`fingerprint`,`path`,`filename`,`mime-type`,`extension`,`found`,`fingerprinted`,`shipped`,`edited`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- -------------------------------------------------------- - --- --- Table structure for table `webdav_folders` --- - CREATE TABLE `webdav_folders` ( - `folderid` mediumint(32) NOT NULL, + `folderid` mediumint(32) NOT NULL AUTO_INCREMENT, `parent_fid` mediumint(32) NOT NULL, `webdavid` int(11) NOT NULL, + `uid` int(11) NOT NULL DEFAULT '0', + `key` varchar(32) NOT NULL DEFAULT '', + `renegading` enum('Yes','No') NOT NULL DEFAULT 'No', + `academic-license` enum('Yes','No') NOT NULL DEFAULT 'No', + `license-key` varchar(32) NOT NULL DEFAULT '', `commonality-key` varchar(32) NOT NULL DEFAULT '', `releases-hashinfo` varchar(32) NOT NULL DEFAULT '', `primary` varchar(64) NOT NULL DEFAULT '', @@ -61,29 +75,36 @@ `deleted` int(11) NOT NULL DEFAULT '0', `renegade` int(11) NOT NULL DEFAULT '0', `files` int(11) NOT NULL DEFAULT '0', + `edited` int(11) NOT NULL DEFAULT '0', `bytes-files` mediumint(24) NOT NULL DEFAULT '0', `bytes-deleted` mediumint(24) NOT NULL DEFAULT '0', `bytes-renegade` mediumint(24) NOT NULL DEFAULT '0', + `bytes-edited` mediumint(24) NOT NULL DEFAULT '0', `created` int(11) NOT NULL DEFAULT '0', `hunted` int(11) NOT NULL DEFAULT '0', - `fingerprinted` int(11) DEFAULT '0' -) ENGINE=InnoDB DEFAULT CHARSET=latin1; + `fingerprinted` int(11) DEFAULT '0', + PRIMARY KEY (`folderid`), + KEY `SEARCH` (`parent_fid`,`webdavid`,`key`,`commonality-key`,`fingerprint`,`primary`,`folders`,`deleted`,`renegade`,`files`,`hunted`,`created`,`fingerprinted`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- -------------------------------------------------------- - --- --- Table structure for table `webdav_webdavs` --- - CREATE TABLE `webdav_webdavs` ( - `webdav_id` int(11) NOT NULL, - `uid` int(11) NOT NULL, + `webdavid` int(11) NOT NULL AUTO_INCREMENT, + `uid` int(11) NOT NULL DEFAULT '0', + `key` varchar(32) NOT NULL DEFAULT '', + `clients` int(11) NOT NULL DEFAULT '0', + `client-apis` int(11) NOT NULL DEFAULT '0', `username` varchar(45) NOT NULL DEFAULT '', `hashinfo` varchar(15) NOT NULL DEFAULT '', `hostname` varchar(255) NOT NULL DEFAULT '', `path` varchar(255) NOT NULL DEFAULT '', - `site-config-file` varchar(255) NOT NULL DEFAULT '', + `htpasswd-file` varchar(128) NOT NULL DEFAULT '', + `apache2-config` varchar(128) NOT NULL DEFAULT '', + `awstats-config` varchar(128) NOT NULL DEFAULT '', + `apache2-config-updated` int(11) NOT NULL DEFAULT '0', + `awstats-config-updated` int(11) NOT NULL DEFAULT '0', `support-ssl` enum('Yes','No') NOT NULL DEFAULT 'No', + `apache2-ssl-updated` int(11) NOT NULL DEFAULT '0', + `awstats-ssl-updated` int(11) NOT NULL DEFAULT '0', `online` int(11) NOT NULL DEFAULT '0', `staging-cron` varchar(128) NOT NULL DEFAULT '', `salt` varchar(64) NOT NULL DEFAULT '', @@ -98,70 +119,16 @@ `bytes-files-created` mediumint(28) NOT NULL DEFAULT '0', `bytes-files-exist` mediumint(28) NOT NULL DEFAULT '0', `bytes-files-deleted` mediumint(28) NOT NULL DEFAULT '0', - `reneaged-created` int(11) NOT NULL DEFAULT '0', - `reneaged-exist` int(11) NOT NULL DEFAULT '0', - `reneaged-deleted` int(11) NOT NULL DEFAULT '0', - `bytes-reneaged-created` mediumint(28) NOT NULL DEFAULT '0', - `bytes-reneaged-exist` mediumint(28) NOT NULL DEFAULT '0', - `bytes-reneaged-deleted` mediumint(28) NOT NULL DEFAULT '0', + `renegade-created` int(11) NOT NULL DEFAULT '0', + `renegade-exist` int(11) NOT NULL DEFAULT '0', + `renegade-deleted` int(11) NOT NULL DEFAULT '0', + `bytes-renegade-created` mediumint(28) NOT NULL DEFAULT '0', + `bytes-renegade-exist` mediumint(28) NOT NULL DEFAULT '0', + `bytes-renegade-deleted` mediumint(28) NOT NULL DEFAULT '0', `root-folders` mediumtext, `folders-hunted` int(11) NOT NULL DEFAULT '0', `files-hunted` int(11) NOT NULL DEFAULT '0', - `renegade-hunted` int(11) NOT NULL DEFAULT '0' -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- --- Indexes for dumped tables --- - --- --- Indexes for table `webdav_clients` --- -ALTER TABLE `webdav_clients` - ADD PRIMARY KEY (`clientid`); - --- --- Indexes for table `webdav_files` --- -ALTER TABLE `webdav_files` - ADD PRIMARY KEY (`fileid`), - ADD KEY `SEARCH` (`folderid`,`webdavid`,`commonality-key`,`type`,`releases-hashinfo`,`fingerprint`,`path`,`filename`,`mime-type`,`extension`,`found`,`fingerprinted`,`shipped`,`written`); - --- --- Indexes for table `webdav_folders` --- -ALTER TABLE `webdav_folders` - ADD PRIMARY KEY (`folderid`), - ADD KEY `SEARCH` (`parent_fid`,`webdavid`,`fingerprint`,`primary`,`folders`,`deleted`,`renegade`,`files`,`hunted`,`created`,`fingerprinted`); - --- --- Indexes for table `webdav_webdavs` --- -ALTER TABLE `webdav_webdavs` - ADD PRIMARY KEY (`webdav_id`,`uid`), - ADD KEY `SEARCH` (`uid`,`webdav_id`,`username`,`hashinfo`,`support-ssl`,`staging-cron`); - --- --- AUTO_INCREMENT for dumped tables --- - --- --- AUTO_INCREMENT for table `webdav_clients` --- -ALTER TABLE `webdav_clients` - MODIFY `clientid` mediumint(15) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `webdav_files` --- -ALTER TABLE `webdav_files` - MODIFY `fileid` mediumint(42) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `webdav_folders` --- -ALTER TABLE `webdav_folders` - MODIFY `folderid` mediumint(32) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `webdav_webdavs` --- -ALTER TABLE `webdav_webdavs` - MODIFY `webdav_id` int(11) NOT NULL AUTO_INCREMENT; + `renegade-hunted` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`webdav_id`,`uid`), + KEY `SEARCH` (`uid`,`key`,`webdav_id`,`username`,`hashinfo`,`support-ssl`,`staging-cron`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; Modified: XoopsModules/webdav/trunk/modules/webdav/xoops_version.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/xoops_version.php 2017-07-30 12:38:47 UTC (rev 13262) +++ XoopsModules/webdav/trunk/modules/webdav/xoops_version.php 2017-07-30 14:40:15 UTC (rev 13263) @@ -73,6 +73,7 @@ // database tables $modversion["sqlfile"]["mysql"] = "sql/mysql.sql"; $modversion["tables"] = array( + "webdav_callbacks", "webdav_clients", "webdav_files", "webdav_folders", @@ -177,6 +178,16 @@ ); $modversion["config"][] = array( + "name" => "awstats", + "title" => "WEBDAV_MI_AWSTATS", + "description" => "WEBDAV_MI_AWSTATS_DESC", + "formtype" => "yesno", + "valuetype" => "int", + "default" => false, + "category" => "seo" + ); + +$modversion["config"][] = array( "name" => "ssl_support", "title" => "WEBDAV_MI_SSL_SUPPORT", "description" => "WEBDAV_MI_SSL_SUPPORT_DESC", @@ -207,9 +218,9 @@ ); $modversion["config"][] = array( - "name" => "sitesavailable_path", - "title" => "WEBDAV_MI_SITESAVAILABLE_PATH", - "description" => "WEBDAV_MI_SITESAVAILABLE_PATH_DESC", + "name" => "apache2_config_path", + "title" => "WEBDAV_MI_APACHE2_CONFIG_PATH", + "description" => "WEBDAV_MI_APACHE2_CONFIG_PATH_DESC", "formtype" => "textbox", "valuetype" => "text", "default" => '/etc/apache2/sites-available', @@ -217,6 +228,16 @@ ); $modversion["config"][] = array( + "name" => "awstats_config_path", + "title" => "WEBDAV_MI_AWSTATS_CONFIG_PATH", + "description" => "WEBDAV_MI_AWSTATS_CONFIG_PATH_DESC", + "formtype" => "textbox", + "valuetype" => "text", + "default" => '/etc/awstats', + "category" => "paths" + ); + +$modversion["config"][] = array( "name" => "htpasswd_path", "title" => "WEBDAV_MI_HTPASSWD_PATH", "description" => "WEBDAV_MI_HTPASSWD_PATH_DESC", |
From: <wis...@us...> - 2017-07-30 15:35:06
|
Revision: 13264 http://sourceforge.net/p/xoops/svn/13264 Author: wishcraft Date: 2017-07-30 15:35:03 +0000 (Sun, 30 Jul 2017) Log Message: ----------- Webdav User Propogation & Management module! Modified Paths: -------------- XoopsModules/webdav/trunk/modules/webdav/class/clients.php Added Paths: ----------- XoopsModules/webdav/trunk/modules/webdav/footer.php XoopsModules/webdav/trunk/modules/webdav/forgot.php XoopsModules/webdav/trunk/modules/webdav/header.php XoopsModules/webdav/trunk/modules/webdav/include/functions.php XoopsModules/webdav/trunk/modules/webdav/include/htaccess.txt XoopsModules/webdav/trunk/modules/webdav/index.php XoopsModules/webdav/trunk/modules/webdav/templates/webdav_forgot.html XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index.html XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index_client.html XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index_user.html Modified: XoopsModules/webdav/trunk/modules/webdav/class/clients.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/class/clients.php 2017-07-30 14:40:15 UTC (rev 13263) +++ XoopsModules/webdav/trunk/modules/webdav/class/clients.php 2017-07-30 15:35:03 UTC (rev 13264) @@ -30,6 +30,12 @@ class WebdavClients extends XoopsObject { + + /** + * This is determined in assignVar() & setVar() + */ + var $_staging_file_exists = false; + /** * Constructor * @@ -43,7 +49,7 @@ $this->initVar("api-url", XOBJ_DTYPE_TXTBOX, null, false, 255); $this->initVar("api-calls", XOBJ_DTYPE_INT, null, false); $this->initVar("api-response", XOBJ_DTYPE_INT, null, false); - $this->initVar("api-result", XOBJ_DTYPE_OTHER, '', false); + $this->initVar("api-result", XOBJ_DTYPE_OTHER, '', false); $this->initVar("api-errors", XOBJ_DTYPE_INT, null, false); $this->initVar("api-errored", XOBJ_DTYPE_INT, null, false); $this->initVar("username", XOBJ_DTYPE_TXTBOX, null, false, 64); @@ -54,6 +60,87 @@ $this->initVar("created", XOBJ_DTYPE_INT, null, false); $this->initVar("staged", XOBJ_DTYPE_INT, null, false); } + + /** + * Assigns Variable to Object + * + * {@inheritDoc} + * @see XoopsObject::assignVar() + */ + function assignVar($key, $value) + { + + static $staged = false; + global $webdavModule, $webdavConfigsList, $webdavConfigs, $webdavConfigsOptions; + switch ($key) + { + case 'staging-file'; + if (!empty($value) && !file_exists(XOOPS_VAR_PATH . DIRECTORY_SEPARATOR . $webdavConfigsList['folder_data'] . DIRECTORY_SEPARATOR . 'staging' . DIRECTORY_SEPARATOR . $value)) + { + $staged = true; + $value = ''; + $this->_staging_file_exists = false; + $this->setVar($key, $value); + } elseif (!empty($value) && file_exists(XOOPS_VAR_PATH . DIRECTORY_SEPARATOR . $webdavConfigsList['folder_data'] . DIRECTORY_SEPARATOR . 'staging' . DIRECTORY_SEPARATOR . $value)) + { + $staged = false; + $this->_staging_file_exists = true; + } + break; + case 'staged'; + if ($staged == true) + { + $value = time(); + $this->setVar($key, $value); + } + break; + } + parent::assignVar($key, $value); + } + + /** + * Sets Variable to Object + * + * {@inheritDoc} + * @see XoopsObject::setVar() + */ + function setVar($key, $value) + { + static $staged = false; + global $webdavModule, $webdavConfigsList, $webdavConfigs, $webdavConfigsOptions; + switch ($key) + { + case 'staging-file'; + if (!empty($value) && !file_exists(XOOPS_VAR_PATH . DIRECTORY_SEPARATOR . $webdavConfigsList['folder_data'] . DIRECTORY_SEPARATOR . 'staging' . DIRECTORY_SEPARATOR . $value)) + { + $staged = true; + $this->_staging_file_exists = false; + } elseif (!empty($value) && file_exists(XOOPS_VAR_PATH . DIRECTORY_SEPARATOR . $webdavConfigsList['folder_data'] . DIRECTORY_SEPARATOR . 'staging' . DIRECTORY_SEPARATOR . $value)) + { + $staged = false; + $this->_staging_file_exists = true; + } + break; + case 'staged'; + if ($staged == true) + { + $value = time(); + } + break; + } + parent::setVar($key, $value); + } + + /** + * For When Object Shuts Down in Memory + */ + function __destruct() + { + if ($this->vars['staging-file']['changed']==true && $this->vars['staged']['changed']==true ) + { + xoops_getModuleHandler('clients', 'webdav')->insert($this, true); + } + } } /** Added: XoopsModules/webdav/trunk/modules/webdav/footer.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/footer.php (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/footer.php 2017-07-30 15:35:03 UTC (rev 13264) @@ -0,0 +1,27 @@ +<?php +/** + * XOOPS Languages management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage languages + * @description Module for fitting languages on xoops + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link http://internetfounder.wordpress.com + */ + + + +include_once XOOPS_ROOT_PATH . "/footer.php"; +?> \ No newline at end of file Property changes on: XoopsModules/webdav/trunk/modules/webdav/footer.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/forgot.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/forgot.php (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/forgot.php 2017-07-30 15:35:03 UTC (rev 13264) @@ -0,0 +1,73 @@ +<?php +/** + * XOOPS Languages management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage languages + * @description Module for fitting languages on xoops + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link http://internetfounder.wordpress.com + */ + + + +global $languagesModule, $languagesConfigsList, $languagesConfigs, $languagesConfigsOptions; +global $start, $limit; + +include dirname(__FILE__) . "/header.php"; + +if ($languagesConfigsList['htaccess']) +{ + $url = XOOPS_URL . "/" . $languagesConfigsList['base'] . "/$start/$limit/index" . $languagesConfigsList['html']; + if (!strpos($url, $_SERVER["REQUEST_URI"])) + { + redirect_header($url, 0, ""); + exit(0); + } +} + +include XOOPS_ROOT_PATH . "/header.php"; +// Adds Stylesheet +$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL."/modules/languages/language/".$GLOBALS['xoopsConfig']['language'].'/style.css'); + +$languages_handler = xoops_getmodulehandler("languages", "languages"); +$langsusers_handler = xoops_getmodulehandler("users", "languages"); + +$criteria = new CriteriaCompo(new Criteria('1','1')); +$total = $languages_handler->getCount($criteria); +$criteria->setSort("`name`, `code`"); +$criteria->setOrder("ASC"); +$criteria->setLimit($limit); +$criteria->setStart($start); +$lang = array(); +foreach($languages_handler->getObjects($criteria) as $language) +{ + $lang[$language->getVar('lang_id')]['name'] = $language->getVar('name'); + $lang[$language->getVar('lang_id')]['code'] = $language->getVar('code'); + $lang[$language->getVar('lang_id')]['folder'] = (strlen($language->getVar('folder'))==0?strtolower($language->getVar('name')):$language->getVar('folder')); + $lang[$language->getVar('lang_id')]['folder'] = explode(',',$lang[$language->getVar('lang_id')]['folder']); + $lang[$language->getVar('lang_id')]['spoken'] = $langsusers_handler->getLanguageUsersArray('spoken', $language->getVar('lang_id')); + $lang[$language->getVar('lang_id')]['written'] = $langsusers_handler->getLanguageUsersArray('written', $language->getVar('lang_id')); +} +$GLOBALS['xoopsTpl']->assign("languages", $lang); + +xoops_load('XoopsPageNav'); +$pagenav = new XoopsPageNav($total, $limit, $start, 'start', 'limit='.$limit); +$GLOBALS['xoopsTpl']->assign("pagenav", $pagenav->renderNav(5)); + +$GLOBALS['xoopsTpl']->assign("xoops_pagetitle", sprintf(LANGS_MN_INDEX_TITLE, count($lang), $total)); +$GLOBALS['xoopsTpl']->display(__DIR__ . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . "languages_index.html"); +include_once "footer.php"; +?> \ No newline at end of file Property changes on: XoopsModules/webdav/trunk/modules/webdav/forgot.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/header.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/header.php (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/header.php 2017-07-30 15:35:03 UTC (rev 13264) @@ -0,0 +1,56 @@ +<?php +/** + * XOOPS Languages management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage languages + * @description Module for fitting languages on xoops + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link http://internetfounder.wordpress.com + */ + + +require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'mainfile.php'; +require_once __DIR__ . "/include/functions.php"; + +$myts =& MyTextSanitizer::getInstance(); + +global $webdavModule, $webdavConfigsList, $webdavConfigs, $webdavConfigsOptions; + +if (empty($webdavModule)) +{ + if (is_a($webdavModule = xoops_getHandler('module')->getByDirname(basename(__DIR__)), "XoopsModule")) + { + if (empty($webdavConfigsList)) + { + $webdavConfigsList = webdav_load_config(); + } + if (empty($webdavConfigs)) + { + $webdavConfigs = xoops_getHandler('config')->getConfigs(new Criteria('conf_modid', $webdavModule->getVar('mid'))); + } + if (empty($webdavConfigsOptions) && !empty($webdavConfigs)) + { + foreach($webdavConfigs as $key => $config) + $webdavConfigsOptions[$config->getVar('conf_name')] = $config->getConfOptions(); + } + } +} + +global $start, $limit, $op; + +$op = empty($_REQUEST["op"]) || !in_array($_REQUEST['op'], array('default', 'save')) ? 'default' : $_REQUEST["op"] ; +$start = intval( empty($_REQUEST["start"]) ? 0 : $_REQUEST["start"] ); +$limit = intval( empty($_REQUEST["limit"]) ? $webdavConfigsList['items_perpage']: $_REQUEST["limit"] ); Property changes on: XoopsModules/webdav/trunk/modules/webdav/header.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/include/functions.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/include/functions.php (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/include/functions.php 2017-07-30 15:35:03 UTC (rev 13264) @@ -0,0 +1,56 @@ +<?php +/** + * XOOPS Languages management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage languages + * @description Module for fitting languages on xoops + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link http://internetfounder.wordpress.com + */ + + +function webdav_load_config() +{ + global $xoopsModuleConfig; + static $moduleConfig; + + if (isset($moduleConfig)) { + return $moduleConfig; + } + + if (isset($GLOBALS["xoopsModule"]) && is_object($GLOBALS["xoopsModule"]) && $GLOBALS["xoopsModule"]->getVar("dirname", "n") == basename(dirname(__DIR__))) { + if (!empty($GLOBALS["xoopsModuleConfig"])) { + $moduleConfig = $GLOBALS["xoopsModuleConfig"]; + } else { + return null; + } + } else { + $module = xoops_gethandler('module')->getByDirname(basename(dirname(__DIR__))); + + $config_handler =& xoops_gethandler('config'); + $criteria = new CriteriaCompo(new Criteria('conf_modid', $module->getVar('mid'))); + $configs = $config_handler->getConfigs($criteria); + foreach (array_keys($configs) as $i) { + $moduleConfig[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput(); + } + unset($configs); + } + if (file_exists($cfile = XOOPS_ROOT_PATH . "/modules/" . basename(dirname(__DIR__)) . "/include/configs.php")) + if ($customConfig = @include $cfile) + $moduleConfig = array_merge($moduleConfig, $customConfig); + + return $moduleConfig; +} \ No newline at end of file Added: XoopsModules/webdav/trunk/modules/webdav/include/htaccess.txt =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/include/htaccess.txt (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/include/htaccess.txt 2017-07-30 15:35:03 UTC (rev 13264) @@ -0,0 +1,3 @@ +RewriteEngine On +RewriteRule ^%base%/([0-9]+)/([0-9]+)/index%html% ./modules/languages/index.php?start=$1&limit=$2 +RewriteRule ^%base%/requests%html% ./modules/languages/requests.php [L,NC,QSA] Added: XoopsModules/webdav/trunk/modules/webdav/index.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/index.php (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/index.php 2017-07-30 15:35:03 UTC (rev 13264) @@ -0,0 +1,73 @@ +<?php +/** + * XOOPS Languages management module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage languages + * @description Module for fitting languages on xoops + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link http://internetfounder.wordpress.com + */ + + + +global $languagesModule, $languagesConfigsList, $languagesConfigs, $languagesConfigsOptions; +global $start, $limit; + +include dirname(__FILE__) . "/header.php"; + +if ($languagesConfigsList['htaccess']) +{ + $url = XOOPS_URL . "/" . $languagesConfigsList['base'] . "/$start/$limit/index" . $languagesConfigsList['html']; + if (!strpos($url, $_SERVER["REQUEST_URI"])) + { + redirect_header($url, 0, ""); + exit(0); + } +} + +include XOOPS_ROOT_PATH . "/header.php"; +// Adds Stylesheet +$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL."/modules/languages/language/".$GLOBALS['xoopsConfig']['language'].'/style.css'); + +$languages_handler = xoops_getmodulehandler("languages", "languages"); +$langsusers_handler = xoops_getmodulehandler("users", "languages"); + +$criteria = new CriteriaCompo(new Criteria('1','1')); +$total = $languages_handler->getCount($criteria); +$criteria->setSort("`name`, `code`"); +$criteria->setOrder("ASC"); +$criteria->setLimit($limit); +$criteria->setStart($start); +$lang = array(); +foreach($languages_handler->getObjects($criteria) as $language) +{ + $lang[$language->getVar('lang_id')]['name'] = $language->getVar('name'); + $lang[$language->getVar('lang_id')]['code'] = $language->getVar('code'); + $lang[$language->getVar('lang_id')]['folder'] = (strlen($language->getVar('folder'))==0?strtolower($language->getVar('name')):$language->getVar('folder')); + $lang[$language->getVar('lang_id')]['folder'] = explode(',',$lang[$language->getVar('lang_id')]['folder']); + $lang[$language->getVar('lang_id')]['spoken'] = $langsusers_handler->getLanguageUsersArray('spoken', $language->getVar('lang_id')); + $lang[$language->getVar('lang_id')]['written'] = $langsusers_handler->getLanguageUsersArray('written', $language->getVar('lang_id')); +} +$GLOBALS['xoopsTpl']->assign("languages", $lang); + +xoops_load('XoopsPageNav'); +$pagenav = new XoopsPageNav($total, $limit, $start, 'start', 'limit='.$limit); +$GLOBALS['xoopsTpl']->assign("pagenav", $pagenav->renderNav(5)); + +$GLOBALS['xoopsTpl']->assign("xoops_pagetitle", sprintf(LANGS_MN_INDEX_TITLE, count($lang), $total)); +$GLOBALS['xoopsTpl']->display(__DIR__ . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . "languages_index.html"); +include_once "footer.php"; +?> \ No newline at end of file Property changes on: XoopsModules/webdav/trunk/modules/webdav/index.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/templates/webdav_forgot.html =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/templates/webdav_forgot.html (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/templates/webdav_forgot.html 2017-07-30 15:35:03 UTC (rev 13264) @@ -0,0 +1,34 @@ +<h1><{$smarty.const.LANGS_MN_INDEX_H1}></h1> +<p><{$smarty.const.LANGS_MN_INDEX_P1}></p> +<div> + <div style="float: right; width: auto; margin-right: 15px;"> + <{$pagenav}> + </div> +</div> +<table style="font-size: 145% !important;"> + <thead> + <tr class="head" align="center" style="font-weight: bold;"> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_NAME}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_FOLDER}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_CODE}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_SPOKEN}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_WRITTEN}></td> + </tr> + </thead> + <tbody> + <{foreach item=language from=$languages}> + <tr class="<{cycle values='even,odd'}>" align="center"> + <td style="padding: 4px;"><{$language.name}></td> + <td style="padding: 4px;"><{foreach from =$language.folder item=path}><{$smarty.const.DIRECTORY_SEPARATOR}><em><{$path}></em><br /><{/foreach}></td> + <td style="padding: 4px;"><strong><{$language.code}></strong></td> + <td style="padding: 4px;"><{if $language.spoken}><{foreach item=user from=$language.spoken key=uid}> - <a href="<{$xoops_url}>/userinfo.php?uid=<{$uid}>"><{$user.uname}></a><{/foreach}> - <{else}> - <{/if}></td> + <td style="padding: 4px;"><{if $language.written}><{foreach item=user from=$language.written key=uid}> - <a href="<{$xoops_url}>/userinfo.php?uid=<{$uid}>"><{$user.uname}></a><{/foreach}> - <{else}> - <{/if}></td> + </tr> + <{/foreach}> + </tbody> +</table> +<div> + <div style="float: left; width: auto; margin-left: 15px;"> + <{$pagenav}> + </div> +</div> Property changes on: XoopsModules/webdav/trunk/modules/webdav/templates/webdav_forgot.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index.html =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index.html (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index.html 2017-07-30 15:35:03 UTC (rev 13264) @@ -0,0 +1,34 @@ +<h1><{$smarty.const.LANGS_MN_INDEX_H1}></h1> +<p><{$smarty.const.LANGS_MN_INDEX_P1}></p> +<div> + <div style="float: right; width: auto; margin-right: 15px;"> + <{$pagenav}> + </div> +</div> +<table style="font-size: 145% !important;"> + <thead> + <tr class="head" align="center" style="font-weight: bold;"> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_NAME}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_FOLDER}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_CODE}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_SPOKEN}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_WRITTEN}></td> + </tr> + </thead> + <tbody> + <{foreach item=language from=$languages}> + <tr class="<{cycle values='even,odd'}>" align="center"> + <td style="padding: 4px;"><{$language.name}></td> + <td style="padding: 4px;"><{foreach from =$language.folder item=path}><{$smarty.const.DIRECTORY_SEPARATOR}><em><{$path}></em><br /><{/foreach}></td> + <td style="padding: 4px;"><strong><{$language.code}></strong></td> + <td style="padding: 4px;"><{if $language.spoken}><{foreach item=user from=$language.spoken key=uid}> - <a href="<{$xoops_url}>/userinfo.php?uid=<{$uid}>"><{$user.uname}></a><{/foreach}> - <{else}> - <{/if}></td> + <td style="padding: 4px;"><{if $language.written}><{foreach item=user from=$language.written key=uid}> - <a href="<{$xoops_url}>/userinfo.php?uid=<{$uid}>"><{$user.uname}></a><{/foreach}> - <{else}> - <{/if}></td> + </tr> + <{/foreach}> + </tbody> +</table> +<div> + <div style="float: left; width: auto; margin-left: 15px;"> + <{$pagenav}> + </div> +</div> Property changes on: XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index_client.html =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index_client.html (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index_client.html 2017-07-30 15:35:03 UTC (rev 13264) @@ -0,0 +1,34 @@ +<h1><{$smarty.const.LANGS_MN_INDEX_H1}></h1> +<p><{$smarty.const.LANGS_MN_INDEX_P1}></p> +<div> + <div style="float: right; width: auto; margin-right: 15px;"> + <{$pagenav}> + </div> +</div> +<table style="font-size: 145% !important;"> + <thead> + <tr class="head" align="center" style="font-weight: bold;"> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_NAME}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_FOLDER}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_CODE}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_SPOKEN}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_WRITTEN}></td> + </tr> + </thead> + <tbody> + <{foreach item=language from=$languages}> + <tr class="<{cycle values='even,odd'}>" align="center"> + <td style="padding: 4px;"><{$language.name}></td> + <td style="padding: 4px;"><{foreach from =$language.folder item=path}><{$smarty.const.DIRECTORY_SEPARATOR}><em><{$path}></em><br /><{/foreach}></td> + <td style="padding: 4px;"><strong><{$language.code}></strong></td> + <td style="padding: 4px;"><{if $language.spoken}><{foreach item=user from=$language.spoken key=uid}> - <a href="<{$xoops_url}>/userinfo.php?uid=<{$uid}>"><{$user.uname}></a><{/foreach}> - <{else}> - <{/if}></td> + <td style="padding: 4px;"><{if $language.written}><{foreach item=user from=$language.written key=uid}> - <a href="<{$xoops_url}>/userinfo.php?uid=<{$uid}>"><{$user.uname}></a><{/foreach}> - <{else}> - <{/if}></td> + </tr> + <{/foreach}> + </tbody> +</table> +<div> + <div style="float: left; width: auto; margin-left: 15px;"> + <{$pagenav}> + </div> +</div> Property changes on: XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index_client.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index_user.html =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index_user.html (rev 0) +++ XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index_user.html 2017-07-30 15:35:03 UTC (rev 13264) @@ -0,0 +1,34 @@ +<h1><{$smarty.const.LANGS_MN_INDEX_H1}></h1> +<p><{$smarty.const.LANGS_MN_INDEX_P1}></p> +<div> + <div style="float: right; width: auto; margin-right: 15px;"> + <{$pagenav}> + </div> +</div> +<table style="font-size: 145% !important;"> + <thead> + <tr class="head" align="center" style="font-weight: bold;"> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_NAME}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_FOLDER}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_CODE}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_SPOKEN}></td> + <td style="padding: 4px;"><{$smarty.const.LANGS_MN_TD_WRITTEN}></td> + </tr> + </thead> + <tbody> + <{foreach item=language from=$languages}> + <tr class="<{cycle values='even,odd'}>" align="center"> + <td style="padding: 4px;"><{$language.name}></td> + <td style="padding: 4px;"><{foreach from =$language.folder item=path}><{$smarty.const.DIRECTORY_SEPARATOR}><em><{$path}></em><br /><{/foreach}></td> + <td style="padding: 4px;"><strong><{$language.code}></strong></td> + <td style="padding: 4px;"><{if $language.spoken}><{foreach item=user from=$language.spoken key=uid}> - <a href="<{$xoops_url}>/userinfo.php?uid=<{$uid}>"><{$user.uname}></a><{/foreach}> - <{else}> - <{/if}></td> + <td style="padding: 4px;"><{if $language.written}><{foreach item=user from=$language.written key=uid}> - <a href="<{$xoops_url}>/userinfo.php?uid=<{$uid}>"><{$user.uname}></a><{/foreach}> - <{else}> - <{/if}></td> + </tr> + <{/foreach}> + </tbody> +</table> +<div> + <div style="float: left; width: auto; margin-left: 15px;"> + <{$pagenav}> + </div> +</div> Property changes on: XoopsModules/webdav/trunk/modules/webdav/templates/webdav_index_user.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property |
From: <wis...@us...> - 2017-07-30 18:17:37
|
Revision: 13265 http://sourceforge.net/p/xoops/svn/13265 Author: wishcraft Date: 2017-07-30 18:17:34 +0000 (Sun, 30 Jul 2017) Log Message: ----------- Webdav User Propogation & Management module! Modified Paths: -------------- XoopsModules/webdav/trunk/modules/webdav/class/clients.php XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-ssl-config-template.conf XoopsModules/webdav/trunk/modules/webdav/xoops_version.php Modified: XoopsModules/webdav/trunk/modules/webdav/class/clients.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/class/clients.php 2017-07-30 15:35:03 UTC (rev 13264) +++ XoopsModules/webdav/trunk/modules/webdav/class/clients.php 2017-07-30 18:17:34 UTC (rev 13265) @@ -61,6 +61,42 @@ $this->initVar("staged", XOBJ_DTYPE_INT, null, false); } + + + function xoops_getBlowfishes($single = false) + { + if (!defined('XOOPS_BLOWFISH_ALPHA') && !defined('XOOPS_BLOWFISH_GAMMA') && !defined('XOOPS_BLOWFISH_OMEGA')) + return false; + + $result = array(); + foreach(array('XOOPS_BLOWFISH_ALPHA', 'XOOPS_BLOWFISH_GAMMA', 'XOOPS_BLOWFISH_OMEGA') as $blowcharley) + { + $result[] = constant($blowalpha); + foreach(array('XOOPS_BLOWFISH_ALPHA', 'XOOPS_BLOWFISH_GAMMA', 'XOOPS_BLOWFISH_OMEGA') as $blowbeta) + { + $result[] = constant($blowalpha) . constant($blowbeta); + $result[] = constant($blowbeta) . constant($blowalpha); + $result[] = constant($blowalpha) . constant($blowalpha); + $result[] = constant($blowbeta) . constant($blowbeta); + foreach(array('XOOPS_BLOWFISH_ALPHA', 'XOOPS_BLOWFISH_GAMMA', 'XOOPS_BLOWFISH_OMEGA') as $blowcharley) + { + $result[] = constant($blowalpha) . constant($blowbeta) . constant($blowcharley); + $result[] = constant($blowbeta) . constant($blowalpha) . constant($blowcharley); + $result[] = constant($blowcharley) . constant($blowbeta) . constant($blowalpha); + $result[] = constant($blowbeta) . constant($blowcharley) . constant($blowalpha); + $result[] = constant($blowcharley) . constant($blowalpha) . constant($blowbeta); + $result[] = constant($blowcharley) . constant($blowbeta) . constant($blowalpha); + $result[] = constant($blowalpha) . constant($blowcharley) . constant($blowbeta); + } + } + } + shuffle($result); + shuffle($result); + shuffle($result); + if ($single == true) + return $result[mt_rand(0, count($result)-1)]; + return $result; + } /** * Assigns Variable to Object * @@ -80,7 +116,8 @@ $staged = true; $value = ''; $this->_staging_file_exists = false; - $this->setVar($key, $value); + parent::assignVar($key, $value); + return $this->setVar($key, $value); } elseif (!empty($value) && file_exists(XOOPS_VAR_PATH . DIRECTORY_SEPARATOR . $webdavConfigsList['folder_data'] . DIRECTORY_SEPARATOR . 'staging' . DIRECTORY_SEPARATOR . $value)) { $staged = false; @@ -91,7 +128,7 @@ if ($staged == true) { $value = time(); - $this->setVar($key, $value); + return $this->setVar($key, $value); } break; } Modified: XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-ssl-config-template.conf =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-ssl-config-template.conf 2017-07-30 15:35:03 UTC (rev 13264) +++ XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-ssl-config-template.conf 2017-07-30 18:17:34 UTC (rev 13265) @@ -30,4 +30,8 @@ AuthUserFile %htpasswd% Require valid-user </Directory> + SSLEngine on + SSLCertificateFile %sslcertfile% + SSLCertificateKeyFile %sslcertkey% + SSLCertificateChainFile %sslcertchain% </VirtualHost> \ No newline at end of file Modified: XoopsModules/webdav/trunk/modules/webdav/xoops_version.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/xoops_version.php 2017-07-30 15:35:03 UTC (rev 13264) +++ XoopsModules/webdav/trunk/modules/webdav/xoops_version.php 2017-07-30 18:17:34 UTC (rev 13265) @@ -418,6 +418,15 @@ ); $modversion["config"][] = array( + "name" => "api_url_profile_field", + "title" => "WEBDAV_MI_API_URL_PROFILE_FIELD", + "description" => "WEBDAV_MI_API_URL_PROFILE_FIELD_DESC", + "formtype" => "textbox", + "valuetype" => "text", + "default" => "callback_api_url", + "category" => "users" + ); +$modversion["config"][] = array( "name" => "populate_groups", "title" => "WEBDAV_MI_POPULATEGROUPS", "description" => "WEBDAV_MI_POPULATEGROUPS_DESC", @@ -426,8 +435,58 @@ "default" => explode(",", XOOPS_GROUPS_EXTRA), "category" => "users" ); +/** + * Have to enable on ubuntu/debian the following shell command + * + * $ sudo a2enmod ssl + * + */ +$modversion["config"][] = array( + "name" => "ssl_cert_file", + "title" => "WEBDAV_MI_SSL_CERTIFICATE_FILE", + "description" => "WEBDAV_MI_SSL_CERTIFICATE_FILE_DESC", + "formtype" => "textbox", + "valuetype" => "text", + "default" => "/path/to/".basename(__DIR__) . '.' . parse_url(XOOPS_URL, PHP_URL_HOST).".crt", + "category" => "users" + ); $modversion["config"][] = array( + "name" => "ssl_cert_key", + "title" => "WEBDAV_MI_SSL_CERTIFICATE_KEY", + "description" => "WEBDAV_MI_SSL_CERTIFICATE_KEY_DESC", + "formtype" => "textbox", + "valuetype" => "text", + "default" => "/path/to/".basename(__DIR__) . '.' . parse_url(XOOPS_URL, PHP_URL_HOST).".key", + "category" => "users" + ); + +$modversion["config"][] = array( + "name" => "ssl_cert_chain", + "title" => "WEBDAV_MI_SSL_CERTIFICATE_CHAIN", + "description" => "WEBDAV_MI_SSL_CERTIFICATE_CHAIN_DESC", + "formtype" => "textbox", + "valuetype" => "text", + "default" => "/path/to/".parse_url(XOOPS_URL, PHP_URL_HOST).".crt", + "category" => "users" + ); +/** + * Have to install on ubuntu/debian the following shell command + * + * $ sudo apt-get install apache2-utils + * + */ +$modversion["config"][] = array( + "name" => "webdav_htpasswd", + "title" => "WEBDAV_MI_WEBDAV_HTPASSWD", + "description" => "WEBDAV_MI_WEBDAV_HTPASSWD_DESC", + "formtype" => "textbox", + "valuetype" => "text", + "default" => "htpasswd -c %s %s %s", + "category" => "users" + ); + +$modversion["config"][] = array( "name" => "webdav_htpasswd_title", "title" => "WEBDAV_MI_WEBDAV_HTPASSWD_TITLE", "description" => "WEBDAV_MI_WEBDAV_HTPASSWD_TITLE_DESC", |
From: <wis...@us...> - 2017-07-30 18:32:18
|
Revision: 13266 http://sourceforge.net/p/xoops/svn/13266 Author: wishcraft Date: 2017-07-30 18:32:16 +0000 (Sun, 30 Jul 2017) Log Message: ----------- Webdav User Propogation & Management module! Modified Paths: -------------- XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-nossl-config-template.conf XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-ssl-config-template.conf XoopsModules/webdav/trunk/modules/webdav/xoops_version.php Modified: XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-nossl-config-template.conf =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-nossl-config-template.conf 2017-07-30 18:17:34 UTC (rev 13265) +++ XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-nossl-config-template.conf 2017-07-30 18:32:16 UTC (rev 13266) @@ -1,3 +1,9 @@ +## +## Requires on Ubuntu/Debian with apache the following command: +## +## $ sudo a2enmod dav +## $ sudo a2enmod dav_fs +## <VirtualHost *:80> ServerName %hostname% ServerAdmin %email% Modified: XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-ssl-config-template.conf =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-ssl-config-template.conf 2017-07-30 18:17:34 UTC (rev 13265) +++ XoopsModules/webdav/trunk/modules/webdav/include/data/apache2-ssl-config-template.conf 2017-07-30 18:32:16 UTC (rev 13266) @@ -1,3 +1,9 @@ +## +## Requires on Ubuntu/Debian with apache the following command: +## +## $ sudo a2enmod dav +## $ sudo a2enmod dav_fs +## <VirtualHost *:80> ServerName %hostname% ServerAdmin %email% @@ -15,6 +21,12 @@ </Directory> </VirtualHost> + +## +## Requires on Ubuntu/Debian with apache the following command: +## +## $ sudo a2enmod ssl +## <VirtualHost *:443> ServerName %hostname% ServerAdmin %email% Modified: XoopsModules/webdav/trunk/modules/webdav/xoops_version.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/xoops_version.php 2017-07-30 18:17:34 UTC (rev 13265) +++ XoopsModules/webdav/trunk/modules/webdav/xoops_version.php 2017-07-30 18:32:16 UTC (rev 13266) @@ -447,9 +447,9 @@ "description" => "WEBDAV_MI_SSL_CERTIFICATE_FILE_DESC", "formtype" => "textbox", "valuetype" => "text", - "default" => "/path/to/".basename(__DIR__) . '.' . parse_url(XOOPS_URL, PHP_URL_HOST).".crt", + "default" => "/path/to/" . basename(__DIR__) . '.' . parse_url(XOOPS_URL, PHP_URL_HOST) . ".crt", "category" => "users" - ); +); $modversion["config"][] = array( "name" => "ssl_cert_key", @@ -457,9 +457,9 @@ "description" => "WEBDAV_MI_SSL_CERTIFICATE_KEY_DESC", "formtype" => "textbox", "valuetype" => "text", - "default" => "/path/to/".basename(__DIR__) . '.' . parse_url(XOOPS_URL, PHP_URL_HOST).".key", + "default" => "/path/to/" . basename(__DIR__) . '.' . parse_url(XOOPS_URL, PHP_URL_HOST) . ".key", "category" => "users" - ); +); $modversion["config"][] = array( "name" => "ssl_cert_chain", @@ -467,9 +467,9 @@ "description" => "WEBDAV_MI_SSL_CERTIFICATE_CHAIN_DESC", "formtype" => "textbox", "valuetype" => "text", - "default" => "/path/to/".parse_url(XOOPS_URL, PHP_URL_HOST).".crt", - "category" => "users" - ); + "default" => "/path/to/" . parse_url(XOOPS_URL, PHP_URL_HOST) . ".crt", + "category" => "users" +); /** * Have to install on ubuntu/debian the following shell command * |
From: <wis...@us...> - 2017-07-30 18:43:54
|
Revision: 13267 http://sourceforge.net/p/xoops/svn/13267 Author: wishcraft Date: 2017-07-30 18:43:52 +0000 (Sun, 30 Jul 2017) Log Message: ----------- Webdav User Propogation & Management module! Modified Paths: -------------- XoopsModules/webdav/trunk/modules/webdav/class/clients.php Added Paths: ----------- XoopsModules/webdav/trunk/modules/webdav/images/windows-01.png XoopsModules/webdav/trunk/modules/webdav/images/windows-02.png XoopsModules/webdav/trunk/modules/webdav/images/windows-03.png XoopsModules/webdav/trunk/modules/webdav/images/windows-04.png XoopsModules/webdav/trunk/modules/webdav/images/windows-05.png XoopsModules/webdav/trunk/modules/webdav/images/windows-06.png XoopsModules/webdav/trunk/modules/webdav/images/windows-07.png XoopsModules/webdav/trunk/modules/webdav/images/windows-08.png XoopsModules/webdav/trunk/modules/webdav/images/windows-09.png XoopsModules/webdav/trunk/modules/webdav/images/windows-10.png Modified: XoopsModules/webdav/trunk/modules/webdav/class/clients.php =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/class/clients.php 2017-07-30 18:32:16 UTC (rev 13266) +++ XoopsModules/webdav/trunk/modules/webdav/class/clients.php 2017-07-30 18:43:52 UTC (rev 13267) @@ -63,40 +63,6 @@ - function xoops_getBlowfishes($single = false) - { - if (!defined('XOOPS_BLOWFISH_ALPHA') && !defined('XOOPS_BLOWFISH_GAMMA') && !defined('XOOPS_BLOWFISH_OMEGA')) - return false; - - $result = array(); - foreach(array('XOOPS_BLOWFISH_ALPHA', 'XOOPS_BLOWFISH_GAMMA', 'XOOPS_BLOWFISH_OMEGA') as $blowcharley) - { - $result[] = constant($blowalpha); - foreach(array('XOOPS_BLOWFISH_ALPHA', 'XOOPS_BLOWFISH_GAMMA', 'XOOPS_BLOWFISH_OMEGA') as $blowbeta) - { - $result[] = constant($blowalpha) . constant($blowbeta); - $result[] = constant($blowbeta) . constant($blowalpha); - $result[] = constant($blowalpha) . constant($blowalpha); - $result[] = constant($blowbeta) . constant($blowbeta); - foreach(array('XOOPS_BLOWFISH_ALPHA', 'XOOPS_BLOWFISH_GAMMA', 'XOOPS_BLOWFISH_OMEGA') as $blowcharley) - { - $result[] = constant($blowalpha) . constant($blowbeta) . constant($blowcharley); - $result[] = constant($blowbeta) . constant($blowalpha) . constant($blowcharley); - $result[] = constant($blowcharley) . constant($blowbeta) . constant($blowalpha); - $result[] = constant($blowbeta) . constant($blowcharley) . constant($blowalpha); - $result[] = constant($blowcharley) . constant($blowalpha) . constant($blowbeta); - $result[] = constant($blowcharley) . constant($blowbeta) . constant($blowalpha); - $result[] = constant($blowalpha) . constant($blowcharley) . constant($blowbeta); - } - } - } - shuffle($result); - shuffle($result); - shuffle($result); - if ($single == true) - return $result[mt_rand(0, count($result)-1)]; - return $result; - } /** * Assigns Variable to Object * Added: XoopsModules/webdav/trunk/modules/webdav/images/windows-01.png =================================================================== (Binary files differ) Index: XoopsModules/webdav/trunk/modules/webdav/images/windows-01.png =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/images/windows-01.png 2017-07-30 18:32:16 UTC (rev 13266) +++ XoopsModules/webdav/trunk/modules/webdav/images/windows-01.png 2017-07-30 18:43:52 UTC (rev 13267) Property changes on: XoopsModules/webdav/trunk/modules/webdav/images/windows-01.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/images/windows-02.png =================================================================== (Binary files differ) Index: XoopsModules/webdav/trunk/modules/webdav/images/windows-02.png =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/images/windows-02.png 2017-07-30 18:32:16 UTC (rev 13266) +++ XoopsModules/webdav/trunk/modules/webdav/images/windows-02.png 2017-07-30 18:43:52 UTC (rev 13267) Property changes on: XoopsModules/webdav/trunk/modules/webdav/images/windows-02.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/images/windows-03.png =================================================================== (Binary files differ) Index: XoopsModules/webdav/trunk/modules/webdav/images/windows-03.png =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/images/windows-03.png 2017-07-30 18:32:16 UTC (rev 13266) +++ XoopsModules/webdav/trunk/modules/webdav/images/windows-03.png 2017-07-30 18:43:52 UTC (rev 13267) Property changes on: XoopsModules/webdav/trunk/modules/webdav/images/windows-03.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/images/windows-04.png =================================================================== (Binary files differ) Index: XoopsModules/webdav/trunk/modules/webdav/images/windows-04.png =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/images/windows-04.png 2017-07-30 18:32:16 UTC (rev 13266) +++ XoopsModules/webdav/trunk/modules/webdav/images/windows-04.png 2017-07-30 18:43:52 UTC (rev 13267) Property changes on: XoopsModules/webdav/trunk/modules/webdav/images/windows-04.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/images/windows-05.png =================================================================== (Binary files differ) Index: XoopsModules/webdav/trunk/modules/webdav/images/windows-05.png =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/images/windows-05.png 2017-07-30 18:32:16 UTC (rev 13266) +++ XoopsModules/webdav/trunk/modules/webdav/images/windows-05.png 2017-07-30 18:43:52 UTC (rev 13267) Property changes on: XoopsModules/webdav/trunk/modules/webdav/images/windows-05.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/images/windows-06.png =================================================================== (Binary files differ) Index: XoopsModules/webdav/trunk/modules/webdav/images/windows-06.png =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/images/windows-06.png 2017-07-30 18:32:16 UTC (rev 13266) +++ XoopsModules/webdav/trunk/modules/webdav/images/windows-06.png 2017-07-30 18:43:52 UTC (rev 13267) Property changes on: XoopsModules/webdav/trunk/modules/webdav/images/windows-06.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/images/windows-07.png =================================================================== (Binary files differ) Index: XoopsModules/webdav/trunk/modules/webdav/images/windows-07.png =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/images/windows-07.png 2017-07-30 18:32:16 UTC (rev 13266) +++ XoopsModules/webdav/trunk/modules/webdav/images/windows-07.png 2017-07-30 18:43:52 UTC (rev 13267) Property changes on: XoopsModules/webdav/trunk/modules/webdav/images/windows-07.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/images/windows-08.png =================================================================== (Binary files differ) Index: XoopsModules/webdav/trunk/modules/webdav/images/windows-08.png =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/images/windows-08.png 2017-07-30 18:32:16 UTC (rev 13266) +++ XoopsModules/webdav/trunk/modules/webdav/images/windows-08.png 2017-07-30 18:43:52 UTC (rev 13267) Property changes on: XoopsModules/webdav/trunk/modules/webdav/images/windows-08.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/images/windows-09.png =================================================================== (Binary files differ) Index: XoopsModules/webdav/trunk/modules/webdav/images/windows-09.png =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/images/windows-09.png 2017-07-30 18:32:16 UTC (rev 13266) +++ XoopsModules/webdav/trunk/modules/webdav/images/windows-09.png 2017-07-30 18:43:52 UTC (rev 13267) Property changes on: XoopsModules/webdav/trunk/modules/webdav/images/windows-09.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/webdav/trunk/modules/webdav/images/windows-10.png =================================================================== (Binary files differ) Index: XoopsModules/webdav/trunk/modules/webdav/images/windows-10.png =================================================================== --- XoopsModules/webdav/trunk/modules/webdav/images/windows-10.png 2017-07-30 18:32:16 UTC (rev 13266) +++ XoopsModules/webdav/trunk/modules/webdav/images/windows-10.png 2017-07-30 18:43:52 UTC (rev 13267) Property changes on: XoopsModules/webdav/trunk/modules/webdav/images/windows-10.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property |