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", |