From 3bd39af15f64e753cb14ea131d3735584b09c01f Mon Sep 17 00:00:00 2001 From: Kayou Date: Sun, 10 Mar 2019 02:20:27 +0100 Subject: [PATCH] General update --- README.md | 90 ++-- README_fr.md | 67 +++ check_process | 67 ++- conf/app.src | 6 + conf/connect.php | 5 - conf/ldap.php | 7 - conf/nginx.conf | 16 +- conf/php-fpm.conf | 118 +++-- conf/php-fpm.ini | 3 - conf/sql/spip.sql | 1084 -------------------------------------------- manifest.json | 37 +- scripts/.fonctions | 204 --------- scripts/_common.sh | 134 ++++++ scripts/backup | 76 +++- scripts/change_url | 101 +++++ scripts/install | 253 +++++++---- scripts/remove | 96 ++-- scripts/restore | 144 +++--- scripts/upgrade | 239 ++++++++-- sources/source_dir | 1 - sources/source_md5 | 1 - sources/source_url | 1 - 22 files changed, 1050 insertions(+), 1700 deletions(-) create mode 100644 README_fr.md create mode 100644 conf/app.src delete mode 100644 conf/connect.php delete mode 100644 conf/ldap.php delete mode 100644 conf/php-fpm.ini delete mode 100644 conf/sql/spip.sql delete mode 100644 scripts/.fonctions create mode 100644 scripts/_common.sh create mode 100644 scripts/change_url delete mode 100644 sources/source_dir delete mode 100644 sources/source_md5 delete mode 100644 sources/source_url diff --git a/README.md b/README.md index 5eccd8a..cafcec8 100644 --- a/README.md +++ b/README.md @@ -1,79 +1,67 @@ # SPIP for YunoHost -## SPIP c'est quoi ? +[![Integration level](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/app/spip) +[![Install spip with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=spip) -SPIP est un système de publication pour l’Internet qui s’attache particulièrement au fonctionnement collectif, au multilinguisme et à la facilité d’emploi. C’est un logiciel libre, distribué sous la licence GNU/GPL. Il peut ainsi être utilisé pour tout site Internet, qu’il soit associatif ou institutionnel, personnel ou marchand. +*[Lire ce readme en français.](./README_fr.md)* -Source: [spip.net](http://www.spip.net/fr_rubrique91.html) +> *This package allow you to install spip quickly and simply on a YunoHost server. +If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* -## Fonctionnalité de l'application pour Yunohost - -- Installation de la base sans passer par le système d'installation -- Support multilingue -- Support LDAP - -### Installation - -`$ sudo yunohost app install https://github.com/YunoHost-Apps/spip_ynh.git` - -### Mise à jour - -`$ sudo yunohost app upgrade --verbose spip -u https://github.com/YunoHost-Apps/spip_ynh.git` - -### Utilisation - -Accéder à l'administration du site en écrivant l'adresse suivante dans votre navigateur. - -https://www.domain.tld/spip/ecrire - -Faire une demande de "mot de passe oublié" pour changer votre mot de passe, vous recevez un email vous indiquant comment procéder au changement de mot de passe. - -## What is SPIP? +## Overview SPIP is a publishing system for the Internet in which great importance is attached to collaborative working, to multilingual environments, and to simplicity of use for web authors. It is free software, distributed under the GNU/GPL licence. This means that it can be used for any Internet site, whether personal or institutional, non-profit or commercial. Source: [spip.net](http://www.spip.net/en_rubrique25.html) -### Use +**Shipped version:** 3.2.3 -Access the site administration by writing the following address in your browser. +## Screenshots -https://www.domain.tld/spip/ecrire +![](https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Logo_SPIP.png/220px-Logo_SPIP.png) -Request a "forgotten password" to change your password, you will receive an email telling you how to change your password. +## Demo -## Features for Yunohost app +* [Official demo](https://demo.spip.net/) -- Database install without going through the system install -- Multilanguage support -- LDAP support +## Configuration -## Versionning +How to configure this app: by an admin panel. -### Version 1.1.4 (05/03/17) +## Documentation -- Support LDAP + * Official documentation: https://www.spip.net -### Version 1.1.3 (22/02/17) +## YunoHost specific features -- Update scripts for passing package_linter -- Install database -- Multilanguage +#### Multi-users support -### Version 1.0.3 (20/10/16) +Are LDAP and HTTP auth supported? **Yes** +Can the app be used by multiple users? **Yes** -- Update script - status test +#### Supported architectures -### Version 1.0.2 (29/08/16) +* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/spip/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/spip/) +* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/spip%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/spip/) -- Fix Packaging [Source](https://forum.yunohost.org/t/news-about-app-management-and-packaging-in-yunohost-2-4/1379/1) -- Update SPIP Version +## Links -### Version 1.0.1 (04/01/16) + * Report a bug: https://github.com/YunoHost-Apps/spip_ynh/issues + * App website: https://www.spip.net + * YunoHost website: https://yunohost.org/ -- Delete SPIP sources -- Fix install script for download and extract SPIP +--- -###Version 1.0.0 (28/12/15) +Developers info +---------------- -- Create script install +**Only if you want to use a testing branch for coding, instead of merging directly into master.** +Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/spip_ynh/tree/testing). + +To try the testing branch, please proceed like that. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/spip_ynh/tree/testing --debug +or +sudo yunohost app upgrade spip -u https://github.com/YunoHost-Apps/spip_ynh/tree/testing --debug +``` diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..f2cc20e --- /dev/null +++ b/README_fr.md @@ -0,0 +1,67 @@ +# SPIP pour YunoHost + +[![Integration level](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/app/spip) +[![Install spip with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=spip) + +*[Read this readme in english.](./README.md)* + +> *Ce package vous permet d'installer spip rapidement et simplement sur un serveur Yunohost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* + +## Vue d'ensemble + +SPIP est un système de publication pour l’Internet qui s’attache particulièrement au fonctionnement collectif, au multilinguisme et à la facilité d’emploi. C’est un logiciel libre, distribué sous la licence GNU/GPL. Il peut ainsi être utilisé pour tout site Internet, qu’il soit associatif ou institutionnel, personnel ou marchand. + +Source: [spip.net](http://www.spip.net/fr_rubrique91.html) + +**Version incluse:** 3.2.3 + +## Captures d'écran + +![](https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Logo_SPIP.png/220px-Logo_SPIP.png) + +## Démo + +* [Démo officielle](https://demo.spip.net/) + +## Configuration + +Comment configurer cette application: via le panneau d'administration. + +## Documentation + + * Documentation officielle: https://www.spip.net + +## Caractéristiques spécifiques YunoHost + +#### Support multi-utilisateurs + +L'authentification LDAP et HTTP est-elle prise en charge? **Oui** +L'application peut-elle être utilisée par plusieurs utilisateurs? **Oui** + +#### Supported architectures + +* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/spip/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/spip/) +* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/spip%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/spip/) + +## Links + + * Signaler un bug: https://github.com/YunoHost-Apps/spip_ynh/issues + * Site de l'application: Lien vers le site officiel de cette application + * Site web YunoHost: https://yunohost.org/ + +--- + +Informations pour les développeurs +---------------- + +**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.** +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/spip_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/spip_ynh/tree/testing --debug +ou +sudo yunohost app upgrade spip -u https://github.com/YunoHost-Apps/spip_ynh/tree/testing --debug +``` diff --git a/check_process b/check_process index c07c2ba..e3297c5 100644 --- a/check_process +++ b/check_process @@ -1,36 +1,33 @@ -;; Test complet sans multisite - auto_remove=1 - ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) - language="fr_FR" - is_public="Yes" (PUBLIC|public=Yes|private=No) - ; Checks - pkg_linter=1 - setup_sub_dir=1 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - backup_restore=1 - multi_instance=0 - wrong_user=1 - wrong_path=1 - incorrect_path=1 - corrupt_source=0 - fail_download_source=0 - port_already_use=0 - final_path_already_use=0 +;; Test complet + ; Manifest + domain="domain.tld" (DOMAIN) + path="/path" (PATH) + admin="john" (USER) + users_status="Editor" + is_public=1 (PUBLIC|public=1|private=0) + password="thisisapassword" + ; Checks + pkg_linter=1 + setup_sub_dir=1 + setup_root=1 + setup_nourl=0 + setup_private=1 + setup_public=1 + upgrade=1 + upgrade=1 from_commit=2016c3a3a972dc74d1ae1ec74ff80987eb753ce9 + backup_restore=1 + multi_instance=1 + incorrect_path=1 + port_already_use=0 + change_url=1 ;;; Levels - Level 1=auto - Level 2=auto - Level 3=auto - Level 4=1 - Level 5=auto - Level 6=auto - Level 7=auto - Level 8=0 - Level 9=0 - Level 10=0 \ No newline at end of file + Level 1=auto + Level 2=auto + Level 3=auto + Level 4=1 + Level 5=auto + Level 6=auto + Level 7=auto + Level 8=0 + Level 9=0 + Level 10=0 diff --git a/conf/app.src b/conf/app.src new file mode 100644 index 0000000..c276e1d --- /dev/null +++ b/conf/app.src @@ -0,0 +1,6 @@ +SOURCE_URL=https://files.spip.net/spip/archives/SPIP-v3.2.3.zip +SOURCE_SUM=6211907d4275cfc8131a10c6222e7f13b2d75a355b94e95cd442f2aa80816fc9 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=zip +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= diff --git a/conf/connect.php b/conf/connect.php deleted file mode 100644 index 3a17b4b..0000000 --- a/conf/connect.php +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/conf/ldap.php b/conf/ldap.php deleted file mode 100644 index da5552a..0000000 --- a/conf/ldap.php +++ /dev/null @@ -1,7 +0,0 @@ - array('sAMAccountName','uid','login','userid','cn','sn'),'nom' => 'cn','email' => 'mail','bio' => 'description',); diff --git a/conf/nginx.conf b/conf/nginx.conf index da3ef19..ffd5111 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,12 +1,12 @@ -location __PATHTOCHANGE__ { +location __PATH__ { alias __FINALPATH__/; index index.php; if (!-e $request_filename) { - rewrite ^/([^/]*)/robots\.txt$ __PATHTOCHANGE__/spip.php?page=robots.txt last; - rewrite ^/([^/]*)/sitemap\.xml$ __PATHTOCHANGE__/spip.php?page=sitemap.xml last; - rewrite ^(.+)$ __PATHTOCHANGE__/index.php?q=$1 last; + rewrite ^/([^/]*)/robots\.txt$ __PATH__/spip.php?page=robots.txt last; + rewrite ^/([^/]*)/sitemap\.xml$ __PATH__/spip.php?page=sitemap.xml last; + rewrite ^(.+)$ __PATH__/index.php?q=$1 last; } if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; @@ -30,13 +30,13 @@ location __PATHTOCHANGE__ { # à garder en cache une semaine. Si il y a un proxy sur la # route, celui-ci est autorisé à faire une copie et à la # cacher. - rewrite ^/([^/]*)/favicon\.ico$ __PATHTOCHANGE__/spip.php?page=favicon.ico last; + rewrite ^/([^/]*)/favicon\.ico$ __PATH__/spip.php?page=favicon.ico last; expires 1w; add_header Cache-Control public; } location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php5-fpm-__NAMETOCHANGE__.sock; + fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; @@ -49,6 +49,6 @@ location __PATHTOCHANGE__ { } } - #--PRIVATE--# Include SSOWAT user panel. - #--PRIVATE--include conf.d/yunohost_panel.conf.inc; + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; } diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 5672f10..8ad30fc 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -1,10 +1,11 @@ ; Start a new pool named 'www'. -; the variable $pool can we used in any directive and will be replaced by the +; the variable $pool can be used in any directive and will be replaced by the ; pool name ('www' here) [__NAMETOCHANGE__] ; Per pool prefix ; It only applies on the following directives: +; - 'access.log' ; - 'slowlog' ; - 'listen' (unixsocket) ; - 'chroot' @@ -19,33 +20,40 @@ ; Unix user/group of processes ; Note: The user is mandatory. If the group is not set, the default user's group ; will be used. -user = www-data -group = www-data +user = __USER__ +group = __USER__ ; The address on which to accept FastCGI requests. ; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on +; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on ; a specific port; -; 'port' - to listen on a TCP socket to all addresses on a -; specific port; +; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on +; a specific port; +; 'port' - to listen on a TCP socket to all addresses +; (IPv6 and IPv4-mapped) on a specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. -listen = /var/run/php5-fpm-__NAMETOCHANGE__.sock +listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock ; Set listen(2) backlog. -; Default Value: 128 (-1 on FreeBSD and OpenBSD) -;listen.backlog = 128 +; Default Value: 511 (-1 on FreeBSD and OpenBSD) +;listen.backlog = 511 ; Set permissions for unix socket, if one is used. In Linux, read/write ; permissions must be set in order to allow connections from a web server. Many -; BSD-derived systems allow connections regardless of permissions. +; BSD-derived systems allow connections regardless of permissions. ; Default Values: user and group are set as the running user ; mode is set to 0660 listen.owner = www-data listen.group = www-data ;listen.mode = 0660 - -; List of ipv4 addresses of FastCGI clients which are allowed to connect. +; When POSIX Access Control Lists are supported you can set them using +; these options, value is a comma separated list of user/group names. +; When set, listen.owner and listen.group are ignored +;listen.acl_users = +;listen.acl_groups = + +; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address ; must be separated by a comma. If this value is left blank, connections will be @@ -59,7 +67,13 @@ listen.group = www-data ; - The pool processes will inherit the master process priority ; unless it specified otherwise ; Default Value: no set -; priority = -19 +; process.priority = -19 + +; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user +; or group is differrent than the master process user. It allows to create process +; core dump and ptrace the process for the pool user. +; Default Value: no +; process.dumpable = yes ; Choose how the process manager will control the number of child processes. ; Possible Values: @@ -96,7 +110,7 @@ pm = dynamic ; forget to tweak pm.* to fit your needs. ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' ; Note: This value is mandatory. -pm.max_children = 10 +pm.max_children = 5 ; The number of child processes created on startup. ; Note: Used only when pm is set to 'dynamic' @@ -117,12 +131,12 @@ pm.max_spare_servers = 3 ; Note: Used only when pm is set to 'ondemand' ; Default Value: 10s ;pm.process_idle_timeout = 10s; - + ; The number of requests each child process should execute before respawning. ; This can be useful to work around memory leaks in 3rd party libraries. For ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. ; Default Value: 0 -pm.max_requests = 500 +;pm.max_requests = 500 ; The URI to view the FPM status page. If this value is not set, no URI will be ; recognized as a status page. It shows the following informations: @@ -170,7 +184,7 @@ pm.max_requests = 500 ; ; By default the status page only outputs short status. Passing 'full' in the ; query string will also return status for each pool process. -; Example: +; Example: ; http://www.foo.bar/status?full ; http://www.foo.bar/status?json&full ; http://www.foo.bar/status?html&full @@ -215,14 +229,14 @@ pm.max_requests = 500 ; last request memory: 0 ; ; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: ${prefix}/share/fpm/status.html +; It's available in: /usr/share/php/7.0/fpm/status.html ; ; Note: The value must start with a leading slash (/). The value can be ; anything, but it may not be a good idea to use the .php extension or it ; may conflict with a real PHP file. -; Default Value: not set +; Default Value: not set ;pm.status_path = /status - + ; The ping URI to call the monitoring page of FPM. If this value is not set, no ; URI will be recognized as a ping page. This could be used to test from outside ; that FPM is alive and responding, or to @@ -275,7 +289,7 @@ pm.max_requests = 500 ; - %{megabytes}M ; - %{mega}M ; %n: pool name -; %o: ouput header +; %o: output header ; it must be associated with embraces to specify the name of the header: ; - %{Content-Type}o ; - %{X-Powered-By}o @@ -283,7 +297,7 @@ pm.max_requests = 500 ; - .... ; %p: PID of the child that serviced the request ; %P: PID of the parent of the child that serviced the request -; %q: the query string +; %q: the query string ; %Q: the '?' character if query string exists ; %r: the request URI (without the query string, see %q and %Q) ; %R: remote IP address @@ -291,72 +305,85 @@ pm.max_requests = 500 ; %t: server time the request was received ; it can accept a strftime(3) format: ; %d/%b/%Y:%H:%M:%S %z (default) +; The strftime(3) format must be encapsuled in a %{}t tag +; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t ; %T: time the log has been written (the request has finished) ; it can accept a strftime(3) format: ; %d/%b/%Y:%H:%M:%S %z (default) +; The strftime(3) format must be encapsuled in a %{}t tag +; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t ; %u: remote user ; ; Default: "%R - %u %t \"%m %r\" %s" ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" - + ; The log file for slow requests ; Default Value: not set ; Note: slowlog is mandatory if request_slowlog_timeout is set -slowlog = /var/log/nginx/__NAMETOCHANGE__.slow.log - +;slowlog = log/$pool.log.slow + ; The timeout for serving a single request after which a PHP backtrace will be ; dumped to the 'slowlog' file. A value of '0s' means 'off'. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) ; Default Value: 0 -request_slowlog_timeout = 5s - +;request_slowlog_timeout = 0 + ; The timeout for serving a single request after which the worker process will ; be killed. This option should be used when the 'max_execution_time' ini option ; does not stop script execution for some reason. A value of '0' means 'off'. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) ; Default Value: 0 request_terminate_timeout = 1d - + ; Set open file descriptor rlimit. ; Default Value: system defined value ;rlimit_files = 1024 - + ; Set max core size rlimit. ; Possible Values: 'unlimited' or an integer greater or equal to 0 ; Default Value: system defined value ;rlimit_core = 0 - + ; Chroot to this directory at the start. This value must be defined as an ; absolute path. When this value is not set, chroot is not used. ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one ; of its subdirectories. If the pool prefix is not set, the global prefix ; will be used instead. -; Note: chrooting is a great security feature and should be used whenever +; Note: chrooting is a great security feature and should be used whenever ; possible. However, all PHP paths will be relative to the chroot ; (error_log, sessions.save_path, ...). ; Default Value: not set -;chroot = - +;chroot = + ; Chdir to this directory at the start. ; Note: relative path can be used. ; Default Value: current directory or / when chroot chdir = __FINALPATH__ - + ; Redirect worker stdout and stderr into main error log. If not set, stdout and ; stderr will be redirected to /dev/null according to FastCGI specs. ; Note: on highloaded environement, this can cause some delay in the page ; process time (several ms). ; Default Value: no -catch_workers_output = yes +;catch_workers_output = yes + +; Clear environment in FPM workers +; Prevents arbitrary environment variables from reaching FPM worker processes +; by clearing the environment in workers before env vars specified in this +; pool configuration are added. +; Setting to "no" will make all environment variables available to PHP code +; via getenv(), $_ENV and $_SERVER. +; Default Value: yes +;clear_env = no ; Limits the extensions of the main script FPM will allow to parse. This can ; prevent configuration mistakes on the web server side. You should only limit ; FPM to .php extensions to prevent malicious users to use other extensions to -; exectute php code. +; execute php code. ; Note: set an empty value to allow all extensions. ; Default Value: .php -;security.limit_extensions = .php .php3 .php4 .php5 - +;security.limit_extensions = .php .php3 .php4 .php5 .php7 + ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from ; the current environment. ; Default Value: clean env @@ -370,7 +397,7 @@ catch_workers_output = yes ; overwrite the values previously defined in the php.ini. The directives are the ; same as the PHP SAPI: ; php_value/php_flag - you can set classic ini defines which can -; be overwritten from PHP call 'ini_set'. +; be overwritten from PHP call 'ini_set'. ; php_admin_value/php_admin_flag - these directives won't be overwritten by ; PHP call 'ini_set' ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. @@ -389,4 +416,15 @@ catch_workers_output = yes ;php_flag[display_errors] = off ;php_admin_value[error_log] = /var/log/fpm-php.www.log ;php_admin_flag[log_errors] = on -;php_admin_value[memory_limit] = 32M \ No newline at end of file +;php_admin_value[memory_limit] = 32M + +; Common values to change to increase file upload limit +php_admin_value[upload_max_filesize] = 30M +php_admin_value[post_max_size] = 30M +; php_admin_flag[mail.add_x_header] = Off + +; Other common parameters +; php_admin_value[max_execution_time] = 600 +; php_admin_value[max_input_time] = 300 +; php_admin_value[memory_limit] = 256M +; php_admin_flag[short_open_tag] = On diff --git a/conf/php-fpm.ini b/conf/php-fpm.ini deleted file mode 100644 index 55e2ba7..0000000 --- a/conf/php-fpm.ini +++ /dev/null @@ -1,3 +0,0 @@ -upload_max_filesize=30M -post_max_size=30M -; max_execution_time=60 \ No newline at end of file diff --git a/conf/sql/spip.sql b/conf/sql/spip.sql deleted file mode 100644 index 28969df..0000000 --- a/conf/sql/spip.sql +++ /dev/null @@ -1,1084 +0,0 @@ --- MySQL dump 10.15 Distrib 10.0.29-MariaDB, for debian-linux-gnueabihf (armv7l) --- --- Host: spip Database: spip --- ------------------------------------------------------ --- Server version 10.0.29-MariaDB-0+deb8u1 - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `spip_articles` --- - -DROP TABLE IF EXISTS `spip_articles`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_articles` ( - `id_article` bigint(21) NOT NULL AUTO_INCREMENT, - `surtitre` text NOT NULL, - `titre` text NOT NULL, - `soustitre` text NOT NULL, - `id_rubrique` bigint(21) NOT NULL DEFAULT '0', - `descriptif` text NOT NULL, - `chapo` mediumtext NOT NULL, - `texte` longtext NOT NULL, - `ps` mediumtext NOT NULL, - `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `statut` varchar(10) NOT NULL DEFAULT '0', - `id_secteur` bigint(21) NOT NULL DEFAULT '0', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `export` varchar(10) DEFAULT 'oui', - `date_redac` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `visites` int(11) NOT NULL DEFAULT '0', - `referers` int(11) NOT NULL DEFAULT '0', - `popularite` double NOT NULL DEFAULT '0', - `accepter_forum` char(3) NOT NULL DEFAULT '', - `date_modif` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `lang` varchar(10) NOT NULL DEFAULT '', - `langue_choisie` varchar(3) DEFAULT 'non', - `id_trad` bigint(21) NOT NULL DEFAULT '0', - `nom_site` tinytext NOT NULL, - `url_site` text NOT NULL, - `virtuel` text NOT NULL, - PRIMARY KEY (`id_article`), - KEY `id_rubrique` (`id_rubrique`), - KEY `id_secteur` (`id_secteur`), - KEY `id_trad` (`id_trad`), - KEY `lang` (`lang`), - KEY `statut` (`statut`,`date`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_articles` --- - -LOCK TABLES `spip_articles` WRITE; -/*!40000 ALTER TABLE `spip_articles` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_articles` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_auteurs` --- - -DROP TABLE IF EXISTS `spip_auteurs`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_auteurs` ( - `id_auteur` bigint(21) NOT NULL AUTO_INCREMENT, - `nom` text NOT NULL, - `bio` text NOT NULL, - `email` tinytext NOT NULL, - `nom_site` tinytext NOT NULL, - `url_site` text NOT NULL, - `login` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `pass` tinytext NOT NULL, - `low_sec` tinytext NOT NULL, - `statut` varchar(255) NOT NULL DEFAULT '0', - `webmestre` varchar(3) NOT NULL DEFAULT 'non', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `pgp` text NOT NULL, - `htpass` tinytext NOT NULL, - `en_ligne` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `alea_actuel` tinytext, - `alea_futur` tinytext, - `prefs` tinytext, - `cookie_oubli` tinytext, - `source` varchar(10) NOT NULL DEFAULT 'spip', - `lang` varchar(10) NOT NULL DEFAULT '', - `imessage` varchar(3) DEFAULT NULL, - `messagerie` varchar(3) DEFAULT NULL, - PRIMARY KEY (`id_auteur`), - KEY `login` (`login`), - KEY `statut` (`statut`), - KEY `en_ligne` (`en_ligne`) -) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_auteurs` --- - -LOCK TABLES `spip_auteurs` WRITE; -/*!40000 ALTER TABLE `spip_auteurs` DISABLE KEYS */; -INSERT INTO `spip_auteurs` VALUES (1,'__ADMIN_SPIP__','','__ADMIN_SPIP__@__DOMAIN__','','','__ADMIN_SPIP__','__DB_SHA__','','0minirezo','oui','2017-02-22 00:06:22','','__DB_PWD__','0000-00-00 00:00:00','__ALEA_ACTUEL__','__ALEA_FUTUR__',NULL,NULL,'spip','__LANG_SPIP__',NULL,NULL); -/*!40000 ALTER TABLE `spip_auteurs` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_auteurs_liens` --- - -DROP TABLE IF EXISTS `spip_auteurs_liens`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_auteurs_liens` ( - `id_auteur` bigint(21) NOT NULL DEFAULT '0', - `id_objet` bigint(21) NOT NULL DEFAULT '0', - `objet` varchar(25) NOT NULL DEFAULT '', - `vu` varchar(6) NOT NULL DEFAULT 'non', - PRIMARY KEY (`id_auteur`,`id_objet`,`objet`), - KEY `id_auteur` (`id_auteur`), - KEY `id_objet` (`id_objet`), - KEY `objet` (`objet`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_auteurs_liens` --- - -LOCK TABLES `spip_auteurs_liens` WRITE; -/*!40000 ALTER TABLE `spip_auteurs_liens` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_auteurs_liens` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_breves` --- - -DROP TABLE IF EXISTS `spip_breves`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_breves` ( - `id_breve` bigint(21) NOT NULL AUTO_INCREMENT, - `date_heure` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `titre` text NOT NULL, - `texte` longtext NOT NULL, - `lien_titre` text NOT NULL, - `lien_url` text NOT NULL, - `statut` varchar(6) NOT NULL DEFAULT '0', - `id_rubrique` bigint(21) NOT NULL DEFAULT '0', - `lang` varchar(10) NOT NULL DEFAULT '', - `langue_choisie` varchar(3) DEFAULT 'non', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id_breve`), - KEY `id_rubrique` (`id_rubrique`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_breves` --- - -LOCK TABLES `spip_breves` WRITE; -/*!40000 ALTER TABLE `spip_breves` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_breves` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_depots` --- - -DROP TABLE IF EXISTS `spip_depots`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_depots` ( - `id_depot` bigint(21) NOT NULL AUTO_INCREMENT, - `titre` text NOT NULL, - `descriptif` text NOT NULL, - `type` varchar(10) NOT NULL DEFAULT '', - `url_serveur` varchar(255) NOT NULL DEFAULT '', - `url_brouteur` varchar(255) NOT NULL DEFAULT '', - `url_archives` varchar(255) NOT NULL DEFAULT '', - `url_commits` varchar(255) NOT NULL DEFAULT '', - `xml_paquets` varchar(255) NOT NULL DEFAULT '', - `sha_paquets` varchar(40) NOT NULL DEFAULT '', - `nbr_paquets` int(11) NOT NULL DEFAULT '0', - `nbr_plugins` int(11) NOT NULL DEFAULT '0', - `nbr_autres` int(11) NOT NULL DEFAULT '0', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id_depot`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_depots` --- - -LOCK TABLES `spip_depots` WRITE; -/*!40000 ALTER TABLE `spip_depots` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_depots` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_depots_plugins` --- - -DROP TABLE IF EXISTS `spip_depots_plugins`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_depots_plugins` ( - `id_depot` bigint(21) NOT NULL, - `id_plugin` bigint(21) NOT NULL, - PRIMARY KEY (`id_depot`,`id_plugin`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_depots_plugins` --- - -LOCK TABLES `spip_depots_plugins` WRITE; -/*!40000 ALTER TABLE `spip_depots_plugins` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_depots_plugins` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_documents` --- - -DROP TABLE IF EXISTS `spip_documents`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_documents` ( - `id_document` bigint(21) NOT NULL AUTO_INCREMENT, - `id_vignette` bigint(21) NOT NULL DEFAULT '0', - `extension` varchar(10) NOT NULL DEFAULT '', - `titre` text NOT NULL, - `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `descriptif` text NOT NULL, - `fichier` text NOT NULL, - `taille` bigint(20) DEFAULT NULL, - `largeur` int(11) DEFAULT NULL, - `hauteur` int(11) DEFAULT NULL, - `media` varchar(10) NOT NULL DEFAULT 'file', - `mode` varchar(10) NOT NULL DEFAULT 'document', - `distant` varchar(3) DEFAULT 'non', - `statut` varchar(10) NOT NULL DEFAULT '0', - `credits` varchar(255) NOT NULL DEFAULT '', - `date_publication` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `brise` tinyint(4) DEFAULT '0', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id_document`), - KEY `id_vignette` (`id_vignette`), - KEY `mode` (`mode`), - KEY `extension` (`extension`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_documents` --- - -LOCK TABLES `spip_documents` WRITE; -/*!40000 ALTER TABLE `spip_documents` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_documents` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_documents_liens` --- - -DROP TABLE IF EXISTS `spip_documents_liens`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_documents_liens` ( - `id_document` bigint(21) NOT NULL DEFAULT '0', - `id_objet` bigint(21) NOT NULL DEFAULT '0', - `objet` varchar(25) NOT NULL DEFAULT '', - `vu` enum('non','oui') NOT NULL DEFAULT 'non', - PRIMARY KEY (`id_document`,`id_objet`,`objet`), - KEY `id_document` (`id_document`), - KEY `id_objet` (`id_objet`), - KEY `objet` (`objet`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_documents_liens` --- - -LOCK TABLES `spip_documents_liens` WRITE; -/*!40000 ALTER TABLE `spip_documents_liens` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_documents_liens` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_forum` --- - -DROP TABLE IF EXISTS `spip_forum`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_forum` ( - `id_forum` bigint(21) NOT NULL AUTO_INCREMENT, - `id_objet` bigint(21) NOT NULL DEFAULT '0', - `objet` varchar(25) NOT NULL DEFAULT '', - `id_parent` bigint(21) NOT NULL DEFAULT '0', - `id_thread` bigint(21) NOT NULL DEFAULT '0', - `date_heure` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `date_thread` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `titre` text NOT NULL, - `texte` mediumtext NOT NULL, - `auteur` text NOT NULL, - `email_auteur` text NOT NULL, - `nom_site` text NOT NULL, - `url_site` text NOT NULL, - `statut` varchar(8) NOT NULL DEFAULT '0', - `ip` varchar(40) NOT NULL DEFAULT '', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `id_auteur` bigint(20) NOT NULL DEFAULT '0', - PRIMARY KEY (`id_forum`), - KEY `id_auteur` (`id_auteur`), - KEY `id_parent` (`id_parent`), - KEY `id_thread` (`id_thread`), - KEY `optimal` (`statut`,`id_parent`,`id_objet`,`objet`,`date_heure`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_forum` --- - -LOCK TABLES `spip_forum` WRITE; -/*!40000 ALTER TABLE `spip_forum` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_forum` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_groupes_mots` --- - -DROP TABLE IF EXISTS `spip_groupes_mots`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_groupes_mots` ( - `id_groupe` bigint(21) NOT NULL AUTO_INCREMENT, - `titre` text NOT NULL, - `descriptif` text NOT NULL, - `texte` longtext NOT NULL, - `unseul` varchar(3) NOT NULL DEFAULT '', - `obligatoire` varchar(3) NOT NULL DEFAULT '', - `tables_liees` text NOT NULL, - `minirezo` varchar(3) NOT NULL DEFAULT '', - `comite` varchar(3) NOT NULL DEFAULT '', - `forum` varchar(3) NOT NULL DEFAULT '', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id_groupe`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_groupes_mots` --- - -LOCK TABLES `spip_groupes_mots` WRITE; -/*!40000 ALTER TABLE `spip_groupes_mots` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_groupes_mots` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_jobs` --- - -DROP TABLE IF EXISTS `spip_jobs`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_jobs` ( - `id_job` bigint(21) NOT NULL AUTO_INCREMENT, - `descriptif` text NOT NULL, - `fonction` varchar(255) NOT NULL, - `args` longblob NOT NULL, - `md5args` char(32) NOT NULL DEFAULT '', - `inclure` varchar(255) NOT NULL, - `priorite` smallint(6) NOT NULL DEFAULT '0', - `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `status` tinyint(4) NOT NULL DEFAULT '1', - PRIMARY KEY (`id_job`), - KEY `date` (`date`), - KEY `status` (`status`) -) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_jobs` --- - -LOCK TABLES `spip_jobs` WRITE; -/*!40000 ALTER TABLE `spip_jobs` DISABLE KEYS */; -INSERT INTO `spip_jobs` VALUES (1,'Tâche CRON queue_watch (toutes les 86400 s)','queue_watch','a:1:{i:0;d:1487683770;}','4ac9c0e20e1261177e9fd10eca9d2765','genie/',0,'2017-02-22 00:06:27',1),(2,'Tâche CRON optimiser (toutes les 172800 s)','optimiser','a:1:{i:0;d:1487687192;}','bfddeedfe143a7e3d3c8f5351d973239','genie/',0,'2017-02-22 00:06:27',1),(3,'Tâche CRON invalideur (toutes les 600 s)','invalideur','a:1:{i:0;d:1487721825;}','b80309f70aca458607e41bbfb5736f3c','genie/',0,'2017-02-22 00:06:27',1),(4,'Tâche CRON maintenance (toutes les 7200 s)','maintenance','a:1:{i:0;d:1487717510;}','ac4b0e07b06bdf113d1e6531f6d734c7','genie/',0,'2017-02-22 00:06:27',1),(5,'Tâche CRON mise_a_jour (toutes les 259200 s)','mise_a_jour','a:1:{i:0;d:1487592938;}','6953f26a7d139babf1e0b917637e27b4','genie/',0,'2017-02-22 00:06:27',1),(6,'Tâche CRON optimiser_revisions (toutes les 86400 s)','optimiser_revisions','a:1:{i:0;d:1487652252;}','30ff48e04c43be68bef69246d782465f','genie/',0,'2017-02-22 00:06:27',1),(7,'Tâche CRON svp_actualiser_depots (toutes les 21600 s)','svp_actualiser_depots','a:1:{i:0;d:1487712863;}','baa4283b0e8e181658d57a5b20384ab1','genie/',0,'2017-02-22 00:06:27',1); -/*!40000 ALTER TABLE `spip_jobs` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_jobs_liens` --- - -DROP TABLE IF EXISTS `spip_jobs_liens`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_jobs_liens` ( - `id_job` bigint(21) NOT NULL DEFAULT '0', - `id_objet` bigint(21) NOT NULL DEFAULT '0', - `objet` varchar(25) NOT NULL DEFAULT '', - PRIMARY KEY (`id_job`,`id_objet`,`objet`), - KEY `id_job` (`id_job`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_jobs_liens` --- - -LOCK TABLES `spip_jobs_liens` WRITE; -/*!40000 ALTER TABLE `spip_jobs_liens` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_jobs_liens` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_messages` --- - -DROP TABLE IF EXISTS `spip_messages`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_messages` ( - `id_message` bigint(21) NOT NULL AUTO_INCREMENT, - `titre` text NOT NULL, - `texte` longtext NOT NULL, - `type` varchar(6) NOT NULL DEFAULT '', - `date_heure` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `date_fin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `rv` varchar(3) NOT NULL DEFAULT '', - `statut` varchar(6) NOT NULL DEFAULT '0', - `id_auteur` bigint(21) NOT NULL DEFAULT '0', - `destinataires` text NOT NULL, - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id_message`), - KEY `id_auteur` (`id_auteur`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_messages` --- - -LOCK TABLES `spip_messages` WRITE; -/*!40000 ALTER TABLE `spip_messages` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_messages` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_meta` --- - -DROP TABLE IF EXISTS `spip_meta`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_meta` ( - `nom` varchar(255) NOT NULL, - `valeur` text, - `impt` enum('non','oui') NOT NULL DEFAULT 'oui', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`nom`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_meta` --- - -LOCK TABLES `spip_meta` WRITE; -/*!40000 ALTER TABLE `spip_meta` DISABLE KEYS */; -INSERT INTO `spip_meta` VALUES ('charset_sql_base','utf8','non','2017-02-22 00:05:15'),('charset_collation_sql_base','utf8_general_ci','non','2017-02-22 00:05:15'),('charset_sql_connexion','utf8','non','2017-02-22 00:05:15'),('version_installee','21742','non','2017-02-22 00:05:15'),('nouvelle_install','1','non','2017-02-22 00:05:15'),('langue_site','__LANG_SPIP__','non','2017-02-22 00:06:22'),('pcre_u','u','oui','2017-02-22 00:05:56'),('charset','utf-8','oui','2017-02-22 00:05:56'),('alea_ephemere_ancien',NULL,'non','2017-02-22 00:06:22'),('alea_ephemere','1efd6d108a6f8c0654692bb7ad572cf4','non','2017-02-22 00:06:22'),('alea_ephemere_date','1487721956','non','2017-02-22 00:06:22'),('langues_proposees','ar,ast,ay,bg,br,bs,ca,co,cpf,cpf_hat,cs,da,de,en,eo,es,eu,fa,fon,fr,fr_fem,gl,he,hr,hu,id,it,it_fem,ja,km,lb,my,nl,oc_auv,oc_gsc,oc_lms,oc_lnc,oc_ni,oc_ni_la,oc_ni_mis,oc_prv,oc_va,pl,pt,pt_br,ro,ru,sk,sv,tr,uk,vi,zh','non','2017-02-22 00:06:22'),('email_webmaster','__ADMIN_SPIP__@__DOMAIN__','oui','2017-02-22 00:06:22'),('nom_site','Mon site SPIP','oui','2017-02-22 00:06:22'),('slogan_site','','oui','2017-02-22 00:06:22'),('adresse_site','https://__DOMAIN____PATH__','non','2017-02-22 00:06:27'),('descriptif_site','','oui','2017-02-22 00:06:22'),('activer_logos','oui','oui','2017-02-22 00:06:22'),('activer_logos_survol','non','oui','2017-02-22 00:06:22'),('articles_surtitre','non','oui','2017-02-22 00:06:22'),('articles_soustitre','non','oui','2017-02-22 00:06:22'),('articles_descriptif','non','oui','2017-02-22 00:06:22'),('articles_chapeau','non','oui','2017-02-22 00:06:22'),('articles_texte','oui','oui','2017-02-22 00:06:22'),('articles_ps','non','oui','2017-02-22 00:06:22'),('articles_redac','non','oui','2017-02-22 00:06:22'),('post_dates','non','oui','2017-02-22 00:06:22'),('articles_urlref','non','oui','2017-02-22 00:06:22'),('articles_redirection','non','oui','2017-02-22 00:06:22'),('creer_preview','non','non','2017-02-22 00:06:27'),('taille_preview','150','non','2017-02-22 00:06:27'),('articles_modif','non','oui','2017-02-22 00:06:22'),('rubriques_descriptif','non','oui','2017-02-22 00:06:22'),('rubriques_texte','oui','oui','2017-02-22 00:06:22'),('accepter_inscriptions','non','oui','2017-02-22 00:06:22'),('accepter_visiteurs','non','oui','2017-02-22 00:06:22'),('prevenir_auteurs','non','oui','2017-02-22 00:06:22'),('suivi_edito','non','oui','2017-02-22 00:06:22'),('adresse_suivi','','oui','2017-02-22 00:06:22'),('adresse_suivi_inscription','','oui','2017-02-22 00:06:22'),('adresse_neuf','','oui','2017-02-22 00:06:22'),('jours_neuf','','oui','2017-02-22 00:06:22'),('quoi_de_neuf','non','oui','2017-02-22 00:06:22'),('preview',',0minirezo,1comite,','oui','2017-02-22 00:06:22'),('syndication_integrale','oui','oui','2017-02-22 00:06:22'),('dir_img','IMG/','oui','2017-02-22 00:06:22'),('multi_rubriques','non','oui','2017-02-22 00:06:22'),('multi_secteurs','non','oui','2017-02-22 00:06:22'),('gerer_trad','non','oui','2017-02-22 00:06:22'),('langues_multilingue','','oui','2017-02-22 00:06:22'),('version_html_max','html4','oui','2017-02-22 00:06:22'),('type_urls','page','oui','2017-02-22 00:06:22'),('email_envoi','','oui','2017-02-22 00:06:22'),('auto_compress_http','non','oui','2017-02-22 00:06:22'),('mots_cles_forums','non','oui','2017-02-22 00:06:22'),('forums_titre','oui','oui','2017-02-22 00:06:22'),('forums_texte','oui','oui','2017-02-22 00:06:22'),('forums_urlref','non','oui','2017-02-22 00:06:22'),('forums_afficher_barre','oui','oui','2017-02-22 00:06:22'),('forums_forcer_previsu','oui','oui','2017-02-22 00:06:22'),('formats_documents_forum','','oui','2017-02-22 00:06:22'),('forums_publics','posteriori','oui','2017-02-22 00:06:22'),('forum_prive','oui','oui','2017-02-22 00:06:22'),('forum_prive_objets','oui','oui','2017-02-22 00:06:22'),('forum_prive_admin','non','oui','2017-02-22 00:06:22'),('articles_mots','non','oui','2017-02-22 00:06:22'),('config_precise_groupes','non','oui','2017-02-22 00:06:22'),('messagerie_agenda','oui','oui','2017-02-22 00:06:22'),('barre_outils_public','oui','oui','2017-02-22 00:06:22'),('objets_versions','a:0:{}','oui','2017-02-22 00:06:29'),('activer_sites','non','oui','2017-02-22 00:06:22'),('proposer_sites','0','oui','2017-02-22 00:06:22'),('activer_syndic','oui','oui','2017-02-22 00:06:22'),('moderation_sites','non','oui','2017-02-22 00:06:22'),('activer_statistiques','non','oui','2017-02-22 00:06:22'),('activer_captures_referers','non','oui','2017-02-22 00:06:22'),('activer_referers','oui','oui','2017-02-22 00:06:22'),('activer_breves','non','oui','2017-02-22 00:06:22'),('auto_compress_js','non','oui','2017-02-22 00:06:22'),('auto_compress_closure','non','oui','2017-02-22 00:06:22'),('auto_compress_css','non','oui','2017-02-22 00:06:22'),('url_statique_ressources','','oui','2017-02-22 00:06:22'),('documents_objets','spip_articles','oui','2017-02-22 00:06:22'),('documents_date','non','oui','2017-02-22 00:06:22'),('langues_utilisees','__LANG_SPIP__','oui','2017-02-22 00:06:23'),('plugin','a:28:{s:4:\"SPIP\";a:5:{s:3:\"nom\";s:4:\"SPIP\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"3.1.3\";s:8:\"dir_type\";s:14:\"_DIR_RESTREINT\";s:3:\"dir\";s:0:\"\";}s:9:\"COMPAGNON\";a:5:{s:3:\"nom\";s:9:\"Compagnon\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"1.5.2\";s:3:\"dir\";s:9:\"compagnon\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:4:\"DUMP\";a:5:{s:3:\"nom\";s:4:\"Dump\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"1.7.5\";s:3:\"dir\";s:4:\"dump\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:6:\"IMAGES\";a:5:{s:3:\"nom\";s:6:\"Images\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"1.2.1\";s:3:\"dir\";s:14:\"filtres_images\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:5:\"FORUM\";a:5:{s:3:\"nom\";s:5:\"Forum\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:6:\"1.9.35\";s:3:\"dir\";s:5:\"forum\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:8:\"JQUERYUI\";a:5:{s:3:\"nom\";s:9:\"jQuery UI\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:6:\"1.11.4\";s:3:\"dir\";s:9:\"jquery_ui\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:8:\"MEDIABOX\";a:5:{s:3:\"nom\";s:8:\"MediaBox\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"1.0.2\";s:3:\"dir\";s:8:\"mediabox\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:4:\"MOTS\";a:5:{s:3:\"nom\";s:4:\"Mots\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"2.7.8\";s:3:\"dir\";s:4:\"mots\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:10:\"ORGANISEUR\";a:5:{s:3:\"nom\";s:10:\"Organiseur\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"1.0.3\";s:3:\"dir\";s:10:\"organiseur\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:9:\"PETITIONS\";a:5:{s:3:\"nom\";s:10:\"Pétitions\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"1.5.4\";s:3:\"dir\";s:9:\"petitions\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:4:\"PLAN\";a:5:{s:3:\"nom\";s:35:\"Plan du site dans l’espace privé\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"2.1.1\";s:3:\"dir\";s:4:\"plan\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:11:\"PORTE_PLUME\";a:5:{s:3:\"nom\";s:11:\"Porte plume\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:7:\"1.15.14\";s:3:\"dir\";s:11:\"porte_plume\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:9:\"REVISIONS\";a:5:{s:3:\"nom\";s:10:\"Révisions\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"1.8.7\";s:3:\"dir\";s:9:\"revisions\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:8:\"SAFEHTML\";a:5:{s:3:\"nom\";s:8:\"SafeHTML\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"1.4.3\";s:3:\"dir\";s:8:\"safehtml\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:5:\"SITES\";a:5:{s:3:\"nom\";s:5:\"Sites\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:6:\"1.9.24\";s:3:\"dir\";s:5:\"sites\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:23:\"SQUELETTES_PAR_RUBRIQUE\";a:5:{s:3:\"nom\";s:23:\"Squelettes par Rubrique\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"1.1.2\";s:3:\"dir\";s:23:\"squelettes_par_rubrique\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:5:\"STATS\";a:5:{s:3:\"nom\";s:12:\"Statistiques\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"1.0.5\";s:3:\"dir\";s:12:\"statistiques\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:3:\"SVP\";a:5:{s:3:\"nom\";s:3:\"SVP\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"1.0.7\";s:3:\"dir\";s:3:\"svp\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:2:\"TW\";a:5:{s:3:\"nom\";s:19:\"TextWheel pour SPIP\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:6:\"1.3.15\";s:3:\"dir\";s:9:\"textwheel\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:4:\"URLS\";a:5:{s:3:\"nom\";s:13:\"Urls Etendues\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"1.5.9\";s:3:\"dir\";s:13:\"urls_etendues\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:9:\"VERTEBRES\";a:5:{s:3:\"nom\";s:10:\"Vertèbres\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:5:\"1.2.6\";s:3:\"dir\";s:9:\"vertebres\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:10:\"ITERATEURS\";a:5:{s:3:\"nom\";s:10:\"iterateurs\";s:7:\"version\";s:5:\"1.0.6\";s:4:\"etat\";s:1:\"?\";s:8:\"dir_type\";s:14:\"_DIR_RESTREINT\";s:3:\"dir\";s:18:\"procure:iterateurs\";}s:5:\"QUEUE\";a:5:{s:3:\"nom\";s:5:\"queue\";s:7:\"version\";s:5:\"0.6.8\";s:4:\"etat\";s:1:\"?\";s:8:\"dir_type\";s:14:\"_DIR_RESTREINT\";s:3:\"dir\";s:13:\"procure:queue\";}s:6:\"JQUERY\";a:5:{s:3:\"nom\";s:6:\"jquery\";s:7:\"version\";s:6:\"1.12.4\";s:4:\"etat\";s:1:\"?\";s:8:\"dir_type\";s:14:\"_DIR_RESTREINT\";s:3:\"dir\";s:14:\"procure:jquery\";}s:3:\"PHP\";a:5:{s:3:\"nom\";s:3:\"php\";s:7:\"version\";s:15:\"5.6.29-0+deb8u1\";s:4:\"etat\";s:1:\"?\";s:8:\"dir_type\";s:14:\"_DIR_RESTREINT\";s:3:\"dir\";s:11:\"procure:php\";}s:6:\"BREVES\";a:5:{s:3:\"nom\";s:7:\"Brèves\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:6:\"1.3.14\";s:3:\"dir\";s:6:\"breves\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:11:\"COMPRESSEUR\";a:5:{s:3:\"nom\";s:11:\"Compresseur\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:6:\"1.10.4\";s:3:\"dir\";s:11:\"compresseur\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}s:6:\"MEDIAS\";a:5:{s:3:\"nom\";s:6:\"Medias\";s:4:\"etat\";s:6:\"stable\";s:7:\"version\";s:7:\"2.10.35\";s:3:\"dir\";s:6:\"medias\";s:8:\"dir_type\";s:17:\"_DIR_PLUGINS_DIST\";}}','non','2017-02-22 00:06:27'),('plugin_attente','a:0:{}','oui','2017-02-22 00:06:24'),('plugin_header','spip(3.1.3),compagnon(1.5.2),dump(1.7.5),images(1.2.1),forum(1.9.35),jqueryui(1.11.4),mediabox(1.0.2),mots(2.7.8),organiseur(1.0.3),petitions(1.5.4),plan(2.1.1),porte_plume(1.15.14),revisions(1.8.7),safehtml(1.4.3),sites(1.9.24),squelettes_par_rubrique(1.1.2),stats(1.0.5),svp(1.0.7),tw(1.3.15),urls(1.5.9),vertebres(1.2.6),iterateurs(1.0.6),queue(0.6.8),jquery(1.12.4),php(5.6.29-0+deb8u1),breves(1.3.14),compresseur(1.10.4),medias(2.10.35)','non','2017-02-22 00:06:27'),('compagnon','a:1:{s:6:\"config\";a:1:{s:7:\"activer\";s:3:\"oui\";}}','oui','2017-02-22 00:06:27'),('compagnon_base_version','1.0.0','oui','2017-02-22 00:06:27'),('forum_base_version','1.2.2','oui','2017-02-22 00:06:28'),('mots_base_version','2.1.1','oui','2017-02-22 00:06:28'),('organiseur_base_version','1.1.2','oui','2017-02-22 00:06:28'),('petitions_base_version','1.1.6','oui','2017-02-22 00:06:28'),('revisions_base_version','1.2.0','oui','2017-02-22 00:06:29'),('sites_base_version','1.1.1','oui','2017-02-22 00:06:29'),('stats_base_version','1.0.1','oui','2017-02-22 00:06:29'),('svp_base_version','0.5.1','oui','2017-02-22 00:06:29'),('urls_base_version','1.1.4','oui','2017-02-22 00:06:29'),('breves_base_version','1.0.0','oui','2017-02-22 00:06:29'),('medias_base_version','1.2.7','oui','2017-02-22 00:06:30'),('plugin_installes','a:12:{i:0;s:9:\"compagnon\";i:1;s:5:\"forum\";i:2;s:4:\"mots\";i:3;s:10:\"organiseur\";i:4;s:9:\"petitions\";i:5;s:9:\"revisions\";i:6;s:5:\"sites\";i:7;s:12:\"statistiques\";i:8;s:3:\"svp\";i:9;s:13:\"urls_etendues\";i:10;s:6:\"breves\";i:11;s:6:\"medias\";}','oui','2017-02-22 00:06:30'); -/*!40000 ALTER TABLE `spip_meta` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_mots` --- - -DROP TABLE IF EXISTS `spip_mots`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_mots` ( - `id_mot` bigint(21) NOT NULL AUTO_INCREMENT, - `titre` text NOT NULL, - `descriptif` text NOT NULL, - `texte` longtext NOT NULL, - `id_groupe` bigint(21) NOT NULL DEFAULT '0', - `type` text NOT NULL, - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id_mot`), - KEY `id_groupe` (`id_groupe`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_mots` --- - -LOCK TABLES `spip_mots` WRITE; -/*!40000 ALTER TABLE `spip_mots` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_mots` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_mots_liens` --- - -DROP TABLE IF EXISTS `spip_mots_liens`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_mots_liens` ( - `id_mot` bigint(21) NOT NULL DEFAULT '0', - `id_objet` bigint(21) NOT NULL DEFAULT '0', - `objet` varchar(25) NOT NULL DEFAULT '', - PRIMARY KEY (`id_mot`,`id_objet`,`objet`), - KEY `id_mot` (`id_mot`), - KEY `id_objet` (`id_objet`), - KEY `objet` (`objet`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_mots_liens` --- - -LOCK TABLES `spip_mots_liens` WRITE; -/*!40000 ALTER TABLE `spip_mots_liens` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_mots_liens` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_paquets` --- - -DROP TABLE IF EXISTS `spip_paquets`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_paquets` ( - `id_paquet` bigint(21) NOT NULL AUTO_INCREMENT, - `id_plugin` bigint(21) NOT NULL, - `prefixe` varchar(30) NOT NULL DEFAULT '', - `logo` varchar(255) NOT NULL DEFAULT '', - `version` varchar(24) NOT NULL DEFAULT '', - `version_base` varchar(24) NOT NULL DEFAULT '', - `compatibilite_spip` varchar(24) NOT NULL DEFAULT '', - `branches_spip` varchar(255) NOT NULL DEFAULT '', - `description` text NOT NULL, - `auteur` text NOT NULL, - `credit` text NOT NULL, - `licence` text NOT NULL, - `copyright` text NOT NULL, - `lien_doc` text NOT NULL, - `lien_demo` text NOT NULL, - `lien_dev` text NOT NULL, - `etat` varchar(16) NOT NULL DEFAULT '', - `etatnum` int(1) NOT NULL DEFAULT '0', - `dependances` text NOT NULL, - `procure` text NOT NULL, - `date_crea` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `date_modif` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `id_depot` bigint(21) NOT NULL DEFAULT '0', - `nom_archive` varchar(255) NOT NULL DEFAULT '', - `nbo_archive` int(11) NOT NULL DEFAULT '0', - `maj_archive` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `src_archive` varchar(255) NOT NULL DEFAULT '', - `traductions` text NOT NULL, - `actif` varchar(3) NOT NULL DEFAULT 'non', - `installe` varchar(3) NOT NULL DEFAULT 'non', - `recent` int(2) NOT NULL DEFAULT '0', - `maj_version` varchar(255) NOT NULL DEFAULT '', - `superieur` varchar(3) NOT NULL DEFAULT 'non', - `obsolete` varchar(3) NOT NULL DEFAULT 'non', - `attente` varchar(3) NOT NULL DEFAULT 'non', - `constante` varchar(30) NOT NULL DEFAULT '', - `signature` varchar(32) NOT NULL DEFAULT '', - PRIMARY KEY (`id_paquet`), - KEY `id_plugin` (`id_plugin`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_paquets` --- - -LOCK TABLES `spip_paquets` WRITE; -/*!40000 ALTER TABLE `spip_paquets` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_paquets` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_petitions` --- - -DROP TABLE IF EXISTS `spip_petitions`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_petitions` ( - `id_petition` bigint(21) NOT NULL AUTO_INCREMENT, - `id_article` bigint(21) NOT NULL DEFAULT '0', - `email_unique` char(3) NOT NULL DEFAULT '', - `site_obli` char(3) NOT NULL DEFAULT '', - `site_unique` char(3) NOT NULL DEFAULT '', - `message` char(3) NOT NULL DEFAULT '', - `texte` longtext NOT NULL, - `statut` varchar(10) NOT NULL DEFAULT 'publie', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id_petition`), - UNIQUE KEY `id_article` (`id_article`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_petitions` --- - -LOCK TABLES `spip_petitions` WRITE; -/*!40000 ALTER TABLE `spip_petitions` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_petitions` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_plugins` --- - -DROP TABLE IF EXISTS `spip_plugins`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_plugins` ( - `id_plugin` bigint(21) NOT NULL AUTO_INCREMENT, - `prefixe` varchar(30) NOT NULL DEFAULT '', - `nom` text NOT NULL, - `slogan` text NOT NULL, - `categorie` varchar(100) NOT NULL DEFAULT '', - `tags` text NOT NULL, - `vmax` varchar(24) NOT NULL DEFAULT '', - `date_crea` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `date_modif` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `compatibilite_spip` varchar(24) NOT NULL DEFAULT '', - `branches_spip` varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (`id_plugin`), - KEY `prefixe` (`prefixe`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_plugins` --- - -LOCK TABLES `spip_plugins` WRITE; -/*!40000 ALTER TABLE `spip_plugins` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_plugins` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_referers` --- - -DROP TABLE IF EXISTS `spip_referers`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_referers` ( - `referer_md5` bigint(20) unsigned NOT NULL, - `date` date NOT NULL, - `referer` varchar(255) DEFAULT NULL, - `visites` int(10) unsigned NOT NULL, - `visites_jour` int(10) unsigned NOT NULL, - `visites_veille` int(10) unsigned NOT NULL, - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`referer_md5`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_referers` --- - -LOCK TABLES `spip_referers` WRITE; -/*!40000 ALTER TABLE `spip_referers` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_referers` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_referers_articles` --- - -DROP TABLE IF EXISTS `spip_referers_articles`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_referers_articles` ( - `id_article` int(10) unsigned NOT NULL, - `referer_md5` bigint(20) unsigned NOT NULL, - `referer` varchar(255) NOT NULL DEFAULT '', - `visites` int(10) unsigned NOT NULL, - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id_article`,`referer_md5`), - KEY `referer_md5` (`referer_md5`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_referers_articles` --- - -LOCK TABLES `spip_referers_articles` WRITE; -/*!40000 ALTER TABLE `spip_referers_articles` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_referers_articles` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_resultats` --- - -DROP TABLE IF EXISTS `spip_resultats`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_resultats` ( - `recherche` char(16) NOT NULL DEFAULT '', - `id` int(10) unsigned NOT NULL, - `points` int(10) unsigned NOT NULL DEFAULT '0', - `table_objet` varchar(30) NOT NULL DEFAULT '', - `serveur` char(16) NOT NULL DEFAULT '', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_resultats` --- - -LOCK TABLES `spip_resultats` WRITE; -/*!40000 ALTER TABLE `spip_resultats` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_resultats` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_rubriques` --- - -DROP TABLE IF EXISTS `spip_rubriques`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_rubriques` ( - `id_rubrique` bigint(21) NOT NULL AUTO_INCREMENT, - `id_parent` bigint(21) NOT NULL DEFAULT '0', - `titre` text NOT NULL, - `descriptif` text NOT NULL, - `texte` longtext NOT NULL, - `id_secteur` bigint(21) NOT NULL DEFAULT '0', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `statut` varchar(10) NOT NULL DEFAULT '0', - `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `lang` varchar(10) NOT NULL DEFAULT '', - `langue_choisie` varchar(3) DEFAULT 'non', - `statut_tmp` varchar(10) NOT NULL DEFAULT '0', - `date_tmp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `profondeur` smallint(5) NOT NULL DEFAULT '0', - PRIMARY KEY (`id_rubrique`), - KEY `lang` (`lang`), - KEY `id_parent` (`id_parent`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_rubriques` --- - -LOCK TABLES `spip_rubriques` WRITE; -/*!40000 ALTER TABLE `spip_rubriques` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_rubriques` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_signatures` --- - -DROP TABLE IF EXISTS `spip_signatures`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_signatures` ( - `id_signature` bigint(21) NOT NULL AUTO_INCREMENT, - `id_petition` bigint(21) NOT NULL DEFAULT '0', - `date_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `nom_email` text NOT NULL, - `ad_email` text NOT NULL, - `nom_site` text NOT NULL, - `url_site` text NOT NULL, - `message` mediumtext NOT NULL, - `statut` varchar(10) NOT NULL DEFAULT '0', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id_signature`), - KEY `id_petition` (`id_petition`), - KEY `statut` (`statut`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_signatures` --- - -LOCK TABLES `spip_signatures` WRITE; -/*!40000 ALTER TABLE `spip_signatures` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_signatures` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_syndic` --- - -DROP TABLE IF EXISTS `spip_syndic`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_syndic` ( - `id_syndic` bigint(21) NOT NULL AUTO_INCREMENT, - `id_rubrique` bigint(21) NOT NULL DEFAULT '0', - `id_secteur` bigint(21) NOT NULL DEFAULT '0', - `nom_site` text NOT NULL, - `url_site` text NOT NULL, - `url_syndic` text NOT NULL, - `descriptif` text NOT NULL, - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `syndication` varchar(3) NOT NULL DEFAULT '', - `statut` varchar(10) NOT NULL DEFAULT '0', - `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `date_syndic` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `date_index` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `moderation` varchar(3) DEFAULT 'non', - `miroir` varchar(3) DEFAULT 'non', - `oubli` varchar(3) DEFAULT 'non', - `resume` varchar(3) DEFAULT 'oui', - PRIMARY KEY (`id_syndic`), - KEY `id_rubrique` (`id_rubrique`), - KEY `id_secteur` (`id_secteur`), - KEY `statut` (`statut`,`date_syndic`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_syndic` --- - -LOCK TABLES `spip_syndic` WRITE; -/*!40000 ALTER TABLE `spip_syndic` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_syndic` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_syndic_articles` --- - -DROP TABLE IF EXISTS `spip_syndic_articles`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_syndic_articles` ( - `id_syndic_article` bigint(21) NOT NULL AUTO_INCREMENT, - `id_syndic` bigint(21) NOT NULL DEFAULT '0', - `titre` text NOT NULL, - `url` text NOT NULL, - `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `lesauteurs` text NOT NULL, - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `statut` varchar(10) NOT NULL DEFAULT '0', - `descriptif` text NOT NULL, - `lang` varchar(10) NOT NULL DEFAULT '', - `url_source` tinytext NOT NULL, - `source` tinytext NOT NULL, - `tags` text NOT NULL, - PRIMARY KEY (`id_syndic_article`), - KEY `id_syndic` (`id_syndic`), - KEY `statut` (`statut`), - KEY `url` (`url`(255)) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_syndic_articles` --- - -LOCK TABLES `spip_syndic_articles` WRITE; -/*!40000 ALTER TABLE `spip_syndic_articles` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_syndic_articles` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_types_documents` --- - -DROP TABLE IF EXISTS `spip_types_documents`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_types_documents` ( - `extension` varchar(10) NOT NULL DEFAULT '', - `titre` text NOT NULL, - `descriptif` text NOT NULL, - `mime_type` varchar(100) NOT NULL DEFAULT '', - `inclus` enum('non','image','embed') NOT NULL DEFAULT 'non', - `upload` enum('oui','non') NOT NULL DEFAULT 'oui', - `media_defaut` varchar(10) NOT NULL DEFAULT 'file', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`extension`), - KEY `inclus` (`inclus`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_types_documents` --- - -LOCK TABLES `spip_types_documents` WRITE; -/*!40000 ALTER TABLE `spip_types_documents` DISABLE KEYS */; -INSERT INTO `spip_types_documents` VALUES ('jpg','JPEG','','image/jpeg','image','oui','image','2017-02-22 00:06:29'),('png','PNG','','image/png','image','oui','image','2017-02-22 00:06:29'),('gif','GIF','','image/gif','image','oui','image','2017-02-22 00:06:29'),('bmp','BMP','','image/x-ms-bmp','image','oui','image','2017-02-22 00:06:29'),('tif','TIFF','','image/tiff','embed','oui','image','2017-02-22 00:06:29'),('aac','Advanced Audio Coding','','audio/mp4a-latm','embed','oui','audio','2017-02-22 00:06:29'),('ac3','AC-3 Compressed Audio','','audio/x-aac','embed','oui','audio','2017-02-22 00:06:29'),('aifc','Compressed AIFF Audio','','audio/x-aifc','embed','oui','audio','2017-02-22 00:06:29'),('aiff','AIFF','','audio/x-aiff','embed','oui','audio','2017-02-22 00:06:29'),('amr','Adaptive Multi-Rate Audio','','audio/amr','embed','oui','audio','2017-02-22 00:06:29'),('ape','Monkey\'s Audio File','','audio/x-monkeys-audio','embed','oui','audio','2017-02-22 00:06:29'),('asf','Windows Media','','video/x-ms-asf','embed','oui','video','2017-02-22 00:06:29'),('avi','AVI','','video/x-msvideo','embed','oui','video','2017-02-22 00:06:29'),('anx','Annodex','','application/annodex','embed','oui','file','2017-02-22 00:06:29'),('axa','Annodex Audio','','audio/annodex','embed','oui','audio','2017-02-22 00:06:29'),('axv','Annodex Video','','video/annodex','embed','oui','video','2017-02-22 00:06:29'),('dv','Digital Video','','video/x-dv','embed','oui','video','2017-02-22 00:06:29'),('f4a','Audio for Adobe Flash Player','','audio/mp4','embed','oui','audio','2017-02-22 00:06:29'),('f4b','Audio Book for Adobe Flash Player','','audio/mp4','embed','oui','audio','2017-02-22 00:06:29'),('f4p','Protected Video for Adobe Flash Player','','video/mp4','embed','oui','video','2017-02-22 00:06:29'),('f4v','Video for Adobe Flash Player','','video/mp4','embed','oui','video','2017-02-22 00:06:29'),('flac','Free Lossless Audio Codec','','audio/x-flac','embed','oui','audio','2017-02-22 00:06:29'),('flv','Flash Video','','video/x-flv','embed','oui','video','2017-02-22 00:06:29'),('m2p','MPEG-PS','','video/MP2P','embed','oui','video','2017-02-22 00:06:29'),('m2ts','BDAV MPEG-2 Transport Stream','','video/MP2T','embed','oui','video','2017-02-22 00:06:29'),('m4a','MPEG4 Audio','','audio/mp4a-latm','embed','oui','audio','2017-02-22 00:06:29'),('m4b','MPEG4 Audio','','audio/mp4a-latm','embed','oui','audio','2017-02-22 00:06:29'),('m4p','MPEG4 Audio','','audio/mp4a-latm','embed','oui','audio','2017-02-22 00:06:29'),('m4r','iPhone Ringtone','','audio/aac','embed','oui','audio','2017-02-22 00:06:29'),('m4u','MPEG4 Playlist','','video/vnd.mpegurl','non','oui','video','2017-02-22 00:06:29'),('m4v','MPEG4 Video','','video/x-m4v','embed','oui','video','2017-02-22 00:06:29'),('mid','Midi','','audio/midi','embed','oui','audio','2017-02-22 00:06:29'),('mka','Matroska Audio','','audio/mka','embed','oui','audio','2017-02-22 00:06:29'),('mkv','Matroska Video','','video/mkv','embed','oui','video','2017-02-22 00:06:29'),('mng','MNG','','video/x-mng','embed','oui','video','2017-02-22 00:06:29'),('mov','QuickTime','','video/quicktime','embed','oui','video','2017-02-22 00:06:29'),('mp3','MP3','','audio/mpeg','embed','oui','audio','2017-02-22 00:06:29'),('mp4','MPEG4','','application/mp4','embed','oui','video','2017-02-22 00:06:29'),('mpc','Musepack','','audio/x-musepack','embed','oui','audio','2017-02-22 00:06:29'),('mpg','MPEG','','video/mpeg','embed','oui','video','2017-02-22 00:06:29'),('mts','AVCHD MPEG-2 transport stream','','video/MP2T','embed','oui','video','2017-02-22 00:06:29'),('oga','Ogg Audio','','audio/ogg','embed','oui','audio','2017-02-22 00:06:29'),('ogg','Ogg Vorbis','','audio/ogg','embed','oui','audio','2017-02-22 00:06:29'),('ogv','Ogg Video','','video/ogg','embed','oui','video','2017-02-22 00:06:29'),('ogx','Ogg Multiplex','','application/ogg','embed','oui','video','2017-02-22 00:06:29'),('qt','QuickTime','','video/quicktime','embed','oui','video','2017-02-22 00:06:29'),('ra','RealAudio','','audio/x-pn-realaudio','embed','oui','audio','2017-02-22 00:06:29'),('ram','RealAudio','','audio/x-pn-realaudio','embed','oui','audio','2017-02-22 00:06:29'),('rm','RealAudio','','audio/x-pn-realaudio','embed','oui','audio','2017-02-22 00:06:29'),('spx','Ogg Speex','','audio/ogg','embed','oui','audio','2017-02-22 00:06:29'),('svg','Scalable Vector Graphics','','image/svg+xml','embed','oui','image','2017-02-22 00:06:29'),('svgz','Compressed Scalable Vector Graphic','','image/svg+xml','embed','oui','image','2017-02-22 00:06:29'),('swf','Flash','','application/x-shockwave-flash','embed','oui','video','2017-02-22 00:06:29'),('ts','MPEG transport stream','','video/MP2T','embed','oui','video','2017-02-22 00:06:29'),('wav','WAV','','audio/x-wav','embed','oui','audio','2017-02-22 00:06:29'),('webm','WebM','','video/webm','embed','oui','video','2017-02-22 00:06:29'),('wma','Windows Media Audio','','audio/x-ms-wma','embed','oui','audio','2017-02-22 00:06:29'),('wmv','Windows Media Video','','video/x-ms-wmv','embed','oui','video','2017-02-22 00:06:29'),('y4m','YUV4MPEG2','','video/x-raw-yuv','embed','oui','video','2017-02-22 00:06:29'),('3gp','3rd Generation Partnership Project','','video/3gpp','embed','oui','video','2017-02-22 00:06:29'),('3ga','3GP Audio File','','audio/3ga','embed','oui','audio','2017-02-22 00:06:29'),('7z','7 Zip','','application/x-7z-compressed','non','oui','file','2017-02-22 00:06:29'),('ai','Adobe Illustrator','','application/illustrator','non','oui','image','2017-02-22 00:06:29'),('abw','Abiword','','application/abiword','non','oui','file','2017-02-22 00:06:29'),('asx','Advanced Stream Redirector','','video/x-ms-asf','non','oui','video','2017-02-22 00:06:29'),('bib','BibTeX','','application/x-bibtex','non','oui','file','2017-02-22 00:06:29'),('bin','Binary Data','','application/octet-stream','non','oui','file','2017-02-22 00:06:29'),('blend','Blender','','application/x-blender','non','oui','file','2017-02-22 00:06:29'),('bz2','BZip','','application/x-bzip2','non','oui','file','2017-02-22 00:06:29'),('c','C source','','text/x-csrc','non','oui','file','2017-02-22 00:06:29'),('csl','Citation Style Language','','application/xml','non','oui','file','2017-02-22 00:06:29'),('css','Cascading Style Sheet','','text/css','non','oui','file','2017-02-22 00:06:29'),('csv','Comma Separated Values','','text/csv','non','oui','file','2017-02-22 00:06:29'),('deb','Debian','','application/x-debian-package','non','oui','file','2017-02-22 00:06:29'),('doc','Word','','application/msword','non','oui','file','2017-02-22 00:06:29'),('dot','Word Template','','application/msword','non','oui','file','2017-02-22 00:06:29'),('djvu','DjVu','','image/vnd.djvu','non','oui','image','2017-02-22 00:06:29'),('dvi','LaTeX DVI','','application/x-dvi','non','oui','file','2017-02-22 00:06:29'),('emf','Enhanced Metafile','','image/x-emf','non','oui','image','2017-02-22 00:06:29'),('enl','EndNote Library','','application/octet-stream','non','oui','file','2017-02-22 00:06:29'),('ens','EndNote Style','','application/octet-stream','non','oui','file','2017-02-22 00:06:29'),('eps','PostScript','','application/postscript','non','oui','file','2017-02-22 00:06:29'),('epub','EPUB','','application/epub+zip','non','oui','file','2017-02-22 00:06:29'),('gpx','GPS eXchange Format','','application/gpx+xml','non','oui','file','2017-02-22 00:06:29'),('gz','GZ','','application/x-gzip','non','oui','file','2017-02-22 00:06:29'),('h','C header','','text/x-chdr','non','oui','file','2017-02-22 00:06:29'),('html','HTML','','text/html','non','oui','file','2017-02-22 00:06:29'),('ics','iCalendar','','text/calendar','non','oui','file','2017-02-22 00:06:29'),('jar','Java Archive','','application/java-archive','non','oui','file','2017-02-22 00:06:29'),('json','JSON','','application/json','non','oui','file','2017-02-22 00:06:29'),('kml','Keyhole Markup Language','','application/vnd.google-earth.kml+xml','non','oui','file','2017-02-22 00:06:29'),('kmz','Google Earth Placemark File','','application/vnd.google-earth.kmz','non','oui','file','2017-02-22 00:06:29'),('lyx','Lyx file','','application/x-lyx','non','oui','file','2017-02-22 00:06:29'),('m3u','M3U Playlist','','text/plain','non','oui','file','2017-02-22 00:06:29'),('m3u8','M3U8 Playlist','','text/plain','non','oui','file','2017-02-22 00:06:29'),('mathml','MathML','','application/mathml+xml','non','oui','file','2017-02-22 00:06:29'),('mbtiles','MBTiles','','application/x-sqlite3','non','oui','file','2017-02-22 00:06:29'),('md','Markdown Document','','text/x-markdown','non','oui','file','2017-02-22 00:06:29'),('pas','Pascal','','text/x-pascal','non','oui','file','2017-02-22 00:06:29'),('pdf','PDF','','application/pdf','non','oui','file','2017-02-22 00:06:29'),('pgn','Portable Game Notation','','application/x-chess-pgn','non','oui','file','2017-02-22 00:06:30'),('pls','Playlist','','text/plain','non','oui','file','2017-02-22 00:06:30'),('ppt','PowerPoint','','application/vnd.ms-powerpoint','non','oui','file','2017-02-22 00:06:30'),('pot','PowerPoint Template','','application/vnd.ms-powerpoint','non','oui','file','2017-02-22 00:06:30'),('ps','PostScript','','application/postscript','non','oui','file','2017-02-22 00:06:30'),('psd','Photoshop','','image/x-photoshop','non','oui','image','2017-02-22 00:06:30'),('rar','WinRAR','','application/x-rar-compressed','non','oui','file','2017-02-22 00:06:30'),('rdf','Resource Description Framework','','application/rdf+xml','non','oui','file','2017-02-22 00:06:30'),('ris','RIS','','application/x-research-info-systems','non','oui','file','2017-02-22 00:06:30'),('rpm','RedHat/Mandrake/SuSE','','application/x-redhat-package-manager','non','oui','file','2017-02-22 00:06:30'),('rtf','RTF','','application/rtf','non','oui','file','2017-02-22 00:06:30'),('sdc','StarOffice Spreadsheet','','application/vnd.stardivision.calc','non','oui','file','2017-02-22 00:06:30'),('sdd','StarOffice Presentation','','application/vnd.stardivision.impress','non','oui','file','2017-02-22 00:06:30'),('sdw','StarOffice Writer document','','application/vnd.stardivision.writer','non','oui','file','2017-02-22 00:06:30'),('sit','Stuffit','','application/x-stuffit','non','oui','file','2017-02-22 00:06:30'),('sla','Scribus','','application/x-scribus','non','oui','file','2017-02-22 00:06:30'),('srt','SubRip Subtitle','','text/plain','non','oui','file','2017-02-22 00:06:30'),('ssa','SubStation Alpha Subtitle','','text/plain','non','oui','file','2017-02-22 00:06:30'),('sxc','OpenOffice.org Calc','','application/vnd.sun.xml.calc','non','oui','file','2017-02-22 00:06:30'),('sxi','OpenOffice.org Impress','','application/vnd.sun.xml.impress','non','oui','file','2017-02-22 00:06:30'),('sxw','OpenOffice.org','','application/vnd.sun.xml.writer','non','oui','file','2017-02-22 00:06:30'),('tar','Tar','','application/x-tar','non','oui','file','2017-02-22 00:06:30'),('tex','LaTeX','','text/x-tex','non','oui','file','2017-02-22 00:06:30'),('tgz','TGZ','','application/x-gtar','non','oui','file','2017-02-22 00:06:30'),('torrent','BitTorrent','','application/x-bittorrent','non','oui','file','2017-02-22 00:06:30'),('ttf','TTF Font','','application/x-font-ttf','non','oui','file','2017-02-22 00:06:30'),('txt','Texte','','text/plain','non','oui','file','2017-02-22 00:06:30'),('usf','Universal Subtitle Format','','application/xml','non','oui','file','2017-02-22 00:06:30'),('vcf','vCard','','text/vcard','non','oui','file','2017-02-22 00:06:30'),('xcf','GIMP multi-layer','','application/x-xcf','non','oui','file','2017-02-22 00:06:30'),('xls','Excel','','application/vnd.ms-excel','non','oui','file','2017-02-22 00:06:30'),('xlt','Excel Template','','application/vnd.ms-excel','non','oui','file','2017-02-22 00:06:30'),('wmf','Windows Metafile','','image/x-emf','non','oui','image','2017-02-22 00:06:30'),('wpl','Windows Media Player Playlist','','application/vnd.ms-wpl','non','oui','file','2017-02-22 00:06:30'),('xspf','XSPF','','application/xspf+xml','non','oui','file','2017-02-22 00:06:30'),('xml','XML','','application/xml','non','oui','file','2017-02-22 00:06:30'),('yaml','YAML','','text/yaml','non','oui','file','2017-02-22 00:06:30'),('zip','Zip','','application/zip','non','oui','file','2017-02-22 00:06:30'),('odt','OpenDocument Text','','application/vnd.oasis.opendocument.text','non','oui','file','2017-02-22 00:06:30'),('ods','OpenDocument Spreadsheet','','application/vnd.oasis.opendocument.spreadsheet','non','oui','file','2017-02-22 00:06:30'),('odp','OpenDocument Presentation','','application/vnd.oasis.opendocument.presentation','non','oui','file','2017-02-22 00:06:30'),('odg','OpenDocument Graphics','','application/vnd.oasis.opendocument.graphics','non','oui','file','2017-02-22 00:06:30'),('odc','OpenDocument Chart','','application/vnd.oasis.opendocument.chart','non','oui','file','2017-02-22 00:06:30'),('odf','OpenDocument Formula','','application/vnd.oasis.opendocument.formula','non','oui','file','2017-02-22 00:06:30'),('odb','OpenDocument Database','','application/vnd.oasis.opendocument.database','non','oui','file','2017-02-22 00:06:30'),('odi','OpenDocument Image','','application/vnd.oasis.opendocument.image','non','oui','file','2017-02-22 00:06:30'),('odm','OpenDocument Text-master','','application/vnd.oasis.opendocument.text-master','non','oui','file','2017-02-22 00:06:30'),('ott','OpenDocument Text-template','','application/vnd.oasis.opendocument.text-template','non','oui','file','2017-02-22 00:06:30'),('ots','OpenDocument Spreadsheet-template','','application/vnd.oasis.opendocument.spreadsheet-template','non','oui','file','2017-02-22 00:06:30'),('otp','OpenDocument Presentation-template','','application/vnd.oasis.opendocument.presentation-template','non','oui','file','2017-02-22 00:06:30'),('otg','OpenDocument Graphics-template','','application/vnd.oasis.opendocument.graphics-template','non','oui','file','2017-02-22 00:06:30'),('cls','LaTeX Class','','text/x-tex','non','oui','file','2017-02-22 00:06:30'),('sty','LaTeX Style Sheet','','text/x-tex','non','oui','file','2017-02-22 00:06:30'),('docm','Word','','application/vnd.ms-word.document.macroEnabled.12','non','oui','file','2017-02-22 00:06:30'),('docx','Word','','application/vnd.openxmlformats-officedocument.wordprocessingml.document','non','oui','file','2017-02-22 00:06:30'),('dotm','Word template','','application/vnd.ms-word.template.macroEnabled.12','non','oui','file','2017-02-22 00:06:30'),('dotx','Word template','','application/vnd.openxmlformats-officedocument.wordprocessingml.template','non','oui','file','2017-02-22 00:06:30'),('potm','Powerpoint template','','application/vnd.ms-powerpoint.template.macroEnabled.12','non','oui','file','2017-02-22 00:06:30'),('potx','Powerpoint template','','application/vnd.openxmlformats-officedocument.presentationml.template','non','oui','file','2017-02-22 00:06:30'),('ppam','Powerpoint addin','','application/vnd.ms-powerpoint.addin.macroEnabled.12','non','oui','file','2017-02-22 00:06:30'),('ppsm','Powerpoint slideshow','','application/vnd.ms-powerpoint.slideshow.macroEnabled.12','non','oui','file','2017-02-22 00:06:30'),('ppsx','Powerpoint slideshow','','application/vnd.openxmlformats-officedocument.presentationml.slideshow','non','oui','file','2017-02-22 00:06:30'),('pptm','Powerpoint','','application/vnd.ms-powerpoint.presentation.macroEnabled.12','non','oui','file','2017-02-22 00:06:30'),('pptx','Powerpoint','','application/vnd.openxmlformats-officedocument.presentationml.presentation','non','oui','file','2017-02-22 00:06:30'),('xlam','Excel','','application/vnd.ms-excel.addin.macroEnabled.12','non','oui','file','2017-02-22 00:06:30'),('xlsb','Excel binary','','application/vnd.ms-excel.sheet.binary.macroEnabled.12','non','oui','file','2017-02-22 00:06:30'),('xlsm','Excel','','application/vnd.ms-excel.sheet.macroEnabled.12','non','oui','file','2017-02-22 00:06:30'),('xlsx','Excel','','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','non','oui','file','2017-02-22 00:06:30'),('xltm','Excel template','','application/vnd.ms-excel.template.macroEnabled.12','non','oui','file','2017-02-22 00:06:30'),('xltx','Excel template','','application/vnd.openxmlformats-officedocument.spreadsheetml.template','non','oui','file','2017-02-22 00:06:30'); -/*!40000 ALTER TABLE `spip_types_documents` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_urls` --- - -DROP TABLE IF EXISTS `spip_urls`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_urls` ( - `id_parent` bigint(21) NOT NULL DEFAULT '0', - `url` varchar(255) NOT NULL, - `type` varchar(25) NOT NULL DEFAULT 'article', - `id_objet` bigint(21) NOT NULL, - `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `segments` smallint(3) NOT NULL DEFAULT '1', - `perma` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`id_parent`,`url`), - KEY `type` (`type`,`id_objet`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_urls` --- - -LOCK TABLES `spip_urls` WRITE; -/*!40000 ALTER TABLE `spip_urls` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_urls` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_versions` --- - -DROP TABLE IF EXISTS `spip_versions`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_versions` ( - `id_version` bigint(21) NOT NULL DEFAULT '0', - `id_objet` bigint(21) NOT NULL DEFAULT '0', - `objet` varchar(25) NOT NULL DEFAULT '', - `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `id_auteur` varchar(23) NOT NULL DEFAULT '', - `titre_version` text NOT NULL, - `permanent` char(3) NOT NULL DEFAULT '', - `champs` text NOT NULL, - PRIMARY KEY (`id_version`,`id_objet`,`objet`), - KEY `id_version` (`id_version`), - KEY `id_objet` (`id_objet`), - KEY `objet` (`objet`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_versions` --- - -LOCK TABLES `spip_versions` WRITE; -/*!40000 ALTER TABLE `spip_versions` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_versions` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_versions_fragments` --- - -DROP TABLE IF EXISTS `spip_versions_fragments`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_versions_fragments` ( - `id_fragment` int(10) unsigned NOT NULL DEFAULT '0', - `version_min` int(10) unsigned NOT NULL DEFAULT '0', - `version_max` int(10) unsigned NOT NULL DEFAULT '0', - `id_objet` bigint(21) NOT NULL, - `objet` varchar(25) NOT NULL DEFAULT '', - `compress` tinyint(4) NOT NULL, - `fragment` longblob, - PRIMARY KEY (`id_objet`,`objet`,`id_fragment`,`version_min`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_versions_fragments` --- - -LOCK TABLES `spip_versions_fragments` WRITE; -/*!40000 ALTER TABLE `spip_versions_fragments` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_versions_fragments` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_visites` --- - -DROP TABLE IF EXISTS `spip_visites`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_visites` ( - `date` date NOT NULL, - `visites` int(10) unsigned NOT NULL DEFAULT '0', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`date`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_visites` --- - -LOCK TABLES `spip_visites` WRITE; -/*!40000 ALTER TABLE `spip_visites` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_visites` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `spip_visites_articles` --- - -DROP TABLE IF EXISTS `spip_visites_articles`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `spip_visites_articles` ( - `date` date NOT NULL, - `id_article` int(10) unsigned NOT NULL, - `visites` int(10) unsigned NOT NULL DEFAULT '0', - `maj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`date`,`id_article`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `spip_visites_articles` --- - -LOCK TABLES `spip_visites_articles` WRITE; -/*!40000 ALTER TABLE `spip_visites_articles` DISABLE KEYS */; -/*!40000 ALTER TABLE `spip_visites_articles` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2017-02-22 0:07:20 diff --git a/manifest.json b/manifest.json index ae81996..d72fd70 100644 --- a/manifest.json +++ b/manifest.json @@ -6,15 +6,15 @@ "en": "SPIP - publishing system for the Internet", "fr": "SPIP - Système de publication pour l’Internet" }, - "version": "1.1.4", + "version": "3.2.3~ynh1", "url": "http://www.spip.net/", - "license": "free", + "license": "GPL-3.0-or-later", "maintainer": { "name": "cyp", "email": "cyp@rouquin.me" }, "requirements": { - "yunohost": ">> 2.4.0" + "yunohost": ">= 3.2.2" }, "multi_instance": true, "services": [ @@ -52,32 +52,31 @@ }, "example": "johndoe" }, + { + "name": "password", + "type": "password", + "ask": { + "en": "Choose the SPIP password for the administrator", + "fr": "Choisissez un mot de passe pour l'administrateur" + } + }, { "name": "is_public", + "type": "boolean", "ask": { "en": "Is it a public SPIP site ?", "fr": "Est-ce un site public ?" }, - "choices": ["Yes", "No"], - "default": "Yes" + "default": true }, { - "name": "language", + "name": "users_status", "ask": { - "en": "Choose the application language", - "fr": "Choisissez la langue de l'application" + "en": "Choose the status of YunoHost users", + "fr": "Choisissez le status des utilisateurs de YunoHost" }, - "choices": ["en_EN", "fr_FR"], - "default": "fr_FR" - }, - { - "name": "ldap", - "ask": { - "en": "LDAP Connection", - "fr": "Connexion LDAP" - }, - "choices": ["Yes", "No"], - "default": "No" + "choices": ["Administrator", "Editor", "Visitor"], + "default": "Editor" } ] } diff --git a/scripts/.fonctions b/scripts/.fonctions deleted file mode 100644 index d9bc244..0000000 --- a/scripts/.fonctions +++ /dev/null @@ -1,204 +0,0 @@ -#!/bin/bash - -ynh_version="2.4" - -YNH_VERSION () { # Returns the version number of the Yunohost moulinette - ynh_version=$(sudo yunohost -v | grep "moulinette:" | cut -d' ' -f2 | cut -d'.' -f1,2) -} - -CHECK_VAR () { # Verifies that the variable is not empty. - # $1 = Variable to be checked - # $2 = Display text on error - test -n "$1" || (echo "$2" >&2 && false) -} - -EXIT_PROPERLY () { # Causes the script to stop in the event of an error. And clean the residue. - trap '' ERR - echo -e "\e[91m \e[1m" # Shell in light red bold - echo -e "!!\n $app install's script has encountered an error. Installation was cancelled.\n!!" >&2 - - if type -t CLEAN_SETUP > /dev/null; then # Checks the existence of the function before executing it. - CLEAN_SETUP # Call the specific cleanup function of the install script. - fi - - # Compensates the ssowat bug that does not remove the app's input in case of installation error. - sudo sed -i "\@\"$domain$path/\":@d" /etc/ssowat/conf.json - - if [ "$ynh_version" = "2.2" ]; then - /bin/bash $script_dir/remove - fi - - ynh_die -} - -TRAP_ON () { # Activate signal capture - trap EXIT_PROPERLY ERR # Capturing exit signals on error -} - -TRAP_OFF () { # Ignoring signal capture until TRAP_ON - trap '' ERR # Ignoring exit signals -} - -CHECK_USER () { # Check the validity of the user admin - # $1 = User admin variable - ynh_user_exists "$1" || (echo "Wrong admin" >&2 && false) -} - -CHECK_PATH () { # Checks / at the beginning of the path. And his absence at the end. - if [ "${path:0:1}" != "/" ]; then # If the first character is not / - path="/$path" # Add / at the beginning of path - fi - if [ "${path:${#path}-1}" == "/" ] && [ ${#path} -gt 1 ]; then # If the last character is a / and it is not the only character. - path="${path:0:${#path}-1}" # Delete last character - fi -} - -CHECK_DOMAINPATH () { # Checks the availability of the path and domain. - sudo yunohost app checkurl $domain$path -a $app -} - -CHECK_FINALPATH () { # Checks that the destination folder is not already in use. - final_path=/var/www/$app - if [ -e "$final_path" ] - then - echo "This path already contains a folder" >&2 - false - fi -} - -GENERATE_DB () { # Create a database and a dedicated user in the name of the app - # $1 = Database name - # Generates a random password. - db_user=$1 - db_pwd=$(head -n20 /dev/urandom | tr -c -d 'A-Za-z0-9' | head -c20) - CHECK_VAR "$db_pwd" "db_pwd empty" - # Uses '$ app' as user name and database - # Initializes the database and stores the mysql password. - ynh_mysql_create_db "$db_user" "$db_user" $db_pwd - ynh_app_setting_set $app mysqlpwd $db_pwd -} - -SETUP_SOURCE () { # Download source, decompress and copu into $final_path - src=$(cat ../sources/source_md5 | awk -F' ' {'print $2'}) - sudo wget -nv -i ../sources/source_url -O $src - # Checks the checksum of the downloaded source. - # md5sum -c ../sources/source_md5 --status || ynh_die "Corrupt source" - # Decompress source - if [ "$(echo ${src##*.})" == "tgz" ]; then - tar -x -f $src - elif [ "$(echo ${src##*.})" == "zip" ]; then - unzip -q $src - else - false # Unsupported archive format. - fi - # Copy file source - sudo cp -a $(cat ../sources/source_dir)/. "$final_path" - # Copy additional file and modified - if test -e "../sources/ajouts"; then - sudo cp -a ../sources/ajouts/. "$final_path" - fi -} - -POOL_FPM () { # Create the php-fpm pool configuration file and configure it. - sed -i "s@__NAMETOCHANGE__@$app@g" ../conf/php-fpm.conf - sed -i "s@__FINALPATH__@$final_path@g" ../conf/php-fpm.conf - finalphpconf=/etc/php5/fpm/pool.d/$app.conf - sudo cp ../conf/php-fpm.conf $finalphpconf - sudo chown root: $finalphpconf - finalphpini=/etc/php5/fpm/conf.d/20-$app.ini - sudo cp ../conf/php-fpm.ini $finalphpini - sudo chown root: $finalphpini - sudo systemctl reload php5-fpm -} - -STORE_MD5_CONFIG () { # Saves the checksum of the config file - # $1 = Name of the conf file for storage in settings.yml - # $2 = Full name and path of the conf file. - ynh_app_setting_set $app $1_file_md5 $(sudo md5sum "$2" | cut -d' ' -f1) -} - -CHECK_MD5_CONFIG () { # Created a backup of the config file if it was changed. - # $1 = Name of the conf file for storage in settings.yml - # $2 = Full name and path of the conf file.onf. - if [ "$(ynh_app_setting_get $app $1_file_md5)" != $(sudo md5sum "$2" | cut -d' ' -f1) ]; then - sudo cp -a "$2" "$2.backup.$(date '+%d.%m.%y_%Hh%M,%Ss')" # Si le fichier de config a été modifié, créer un backup. - fi -} - -FIND_PORT () { # Search free port - # $1 = Port number to start the search. - port=$1 - while ! sudo yunohost app checkport $port ; do - port=$((port+1)) - done - CHECK_VAR "$port" "port empty" -} - - -### REMOVE SCRIPT - -REMOVE_NGINX_CONF () { # Delete nginx configuration - if [ -e "/etc/nginx/conf.d/$domain.d/$app.conf" ]; then # Delete nginx config - echo "Delete nginx config" - sudo rm "/etc/nginx/conf.d/$domain.d/$app.conf" - sudo systemctl reload nginx - fi -} - -REMOVE_FPM_CONF () { # Delete pool php-fpm configuration - if [ -e "/etc/php5/fpm/pool.d/$app.conf" ]; then # Delete fpm config - echo "Delete fpm config" - sudo rm "/etc/php5/fpm/pool.d/$app.conf" - fi - if [ -e "/etc/php5/fpm/conf.d/20-$app.ini" ]; then # Delete php config - echo "Delete php config" - sudo rm "/etc/php5/fpm/conf.d/20-$app.ini" - fi - sudo systemctl reload php5-fpm -} - -REMOVE_LOGROTATE_CONF () { # Delete logrotate configuration - if [ -e "/etc/logrotate.d/$app" ]; then - echo "Delete logrotate config" - sudo rm "/etc/logrotate.d/$app" - fi -} - -SECURE_REMOVE () { # Deleting a folder with variable verification - chaine="$1" # The argument must be given between simple quotes '', to avoid interpreting the variables. - no_var=0 - while (echo "$chaine" | grep -q '\$') # Loop as long as there are $ in the string - do - no_var=1 - global_var=$(echo "$chaine" | cut -d '$' -f 2) # Isole the first variable found. - only_var=\$$(expr "$global_var" : '\([A-Za-z0-9_]*\)') # Isole completely the variable by adding the $ at the beginning and keeping only the name of the variable. Mostly gets rid of / and a possible path behind. - real_var=$(eval "echo ${only_var}") # `eval "echo ${var}` Allows to interpret a variable contained in a variable. - if test -z "$real_var" || [ "$real_var" = "/" ]; then - echo "Variable $only_var is empty, suppression of $chaine cancelled." >&2 - return 1 - fi - chaine=$(echo "$chaine" | sed "s@$only_var@$real_var@") # Replaces variable with its value in the string. - done - if [ "$no_var" -eq 1 ] - then - if [ -e "$chaine" ]; then - echo "Delete directory $chaine" - sudo rm -r "$chaine" - fi - return 0 - else - echo "No detected variable." >&2 - return 1 - fi -} - -REMOVE_BDD () { # Delete database and users - # $1 = Database name - # Uses '$app' as user name and database - db_user=$1 - if mysqlshow -u root -p$(sudo cat $MYSQL_ROOT_PWD_FILE) | grep -q "^| $db_user"; then - echo "Delete db" - ynh_mysql_drop_db $db_user - ynh_mysql_drop_user $db_user - fi -} diff --git a/scripts/_common.sh b/scripts/_common.sh new file mode 100644 index 0000000..3a4393f --- /dev/null +++ b/scripts/_common.sh @@ -0,0 +1,134 @@ +# Send an email to inform the administrator +# +# usage: ynh_send_readme_to_admin --app_message=app_message [--recipients=recipients] [--type=type] +# | arg: -m --app_message= - The file with the content to send to the administrator. +# | arg: -r, --recipients= - The recipients of this email. Use spaces to separate multiples recipients. - default: root +# example: "root admin@domain" +# If you give the name of a YunoHost user, ynh_send_readme_to_admin will find its email adress for you +# example: "root admin@domain user1 user2" +# | arg: -t, --type= - Type of mail, could be 'backup', 'change_url', 'install', 'remove', 'restore', 'upgrade' +ynh_send_readme_to_admin() { + # Declare an array to define the options of this helper. + declare -Ar args_array=( [m]=app_message= [r]=recipients= [t]=type= ) + local app_message + local recipients + local type + # Manage arguments with getopts + + ynh_handle_getopts_args "$@" + app_message="${app_message:-}" + recipients="${recipients:-root}" + type="${type:-install}" + + # Get the value of admin_mail_html + admin_mail_html=$(ynh_app_setting_get $app admin_mail_html) + admin_mail_html="${admin_mail_html:-0}" + + # Retrieve the email of users + find_mails () { + local list_mails="$1" + local mail + local recipients=" " + # Read each mail in argument + for mail in $list_mails + do + # Keep root or a real email address as it is + if [ "$mail" = "root" ] || echo "$mail" | grep --quiet "@" + then + recipients="$recipients $mail" + else + # But replace an user name without a domain after by its email + if mail=$(ynh_user_get_info "$mail" "mail" 2> /dev/null) + then + recipients="$recipients $mail" + fi + fi + done + echo "$recipients" + } + recipients=$(find_mails "$recipients") + + # Subject base + local mail_subject="☁️🆈🅽🅷☁️: \`$app\`" + + # Adapt the subject according to the type of mail required. + if [ "$type" = "backup" ]; then + mail_subject="$mail_subject has just been backup." + elif [ "$type" = "change_url" ]; then + mail_subject="$mail_subject has just been moved to a new URL!" + elif [ "$type" = "remove" ]; then + mail_subject="$mail_subject has just been removed!" + elif [ "$type" = "restore" ]; then + mail_subject="$mail_subject has just been restored!" + elif [ "$type" = "upgrade" ]; then + mail_subject="$mail_subject has just been upgraded!" + else # install + mail_subject="$mail_subject has just been installed!" + fi + + local mail_message="This is an automated message from your beloved YunoHost server. +Specific information for the application $app. +$(if [ -n "$app_message" ] +then + cat "$app_message" +else + echo "...No specific information..." +fi) +--- +Automatic diagnosis data from YunoHost +__PRE_TAG1__$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/services:/d')__PRE_TAG2__" + + # Store the message into a file for further modifications. + echo "$mail_message" > mail_to_send + + # If a html email is required. Apply html tags to the message. + if [ "$admin_mail_html" -eq 1 ] + then + # Insert 'br' tags at each ending of lines. + ynh_replace_string "$" "
" mail_to_send + + # Insert starting HTML tags + sed --in-place '1s@^@\n\n\n\n@' mail_to_send + + # Keep tabulations + ynh_replace_string " " "\ \ " mail_to_send + ynh_replace_string "\t" "\ \ " mail_to_send + + # Insert url links tags + ynh_replace_string "__URL_TAG1__\(.*\)__URL_TAG2__\(.*\)__URL_TAG3__" "\1" mail_to_send + + # Insert pre tags + ynh_replace_string "__PRE_TAG1__" "
" mail_to_send
+		ynh_replace_string "__PRE_TAG2__" "<\pre>" mail_to_send
+
+		# Insert finishing HTML tags
+		echo -e "\n\n" >> mail_to_send
+
+	# Otherwise, remove tags to keep a plain text.
+	else
+		# Remove URL tags
+		ynh_replace_string "__URL_TAG[1,3]__" "" mail_to_send
+		ynh_replace_string "__URL_TAG2__" ": " mail_to_send
+
+		# Remove PRE tags
+		ynh_replace_string "__PRE_TAG[1-2]__" "" mail_to_send
+	fi
+
+	# Define binary to use for mail command
+	if [ -e /usr/bin/bsd-mailx ]
+	then
+		local mail_bin=/usr/bin/bsd-mailx
+	else
+		local mail_bin=/usr/bin/mail.mailutils
+	fi
+
+	if [ "$admin_mail_html" -eq 1 ]
+	then
+		content_type="text/html"
+	else
+		content_type="text/plain"
+	fi
+
+	# Send the email to the recipients
+	cat mail_to_send | $mail_bin -a "Content-Type: $content_type; charset=UTF-8" -s "$mail_subject" "$recipients"
+}
\ No newline at end of file
diff --git a/scripts/backup b/scripts/backup
index 61018f9..1a4c268 100644
--- a/scripts/backup
+++ b/scripts/backup
@@ -1,27 +1,69 @@
 #!/bin/bash
 
-# Exit on command errors and treat unset variables as an error
-set -eu
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
 
-# Source app helpers
+#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
+source ../settings/scripts/_common.sh
 source /usr/share/yunohost/helpers
 
-# Get multi-instances specific variables
+#=================================================
+# MANAGE SCRIPT FAILURE
+#=================================================
+
+ynh_clean_setup () {
+	### Remove this function if there's nothing to clean before calling the remove script.
+	true
+}
+# Exit if an error occurs during the execution of the script
+ynh_abort_if_errors
+
+#=================================================
+# LOAD SETTINGS
+#=================================================
+ynh_print_info "Loading installation settings..."
+
 app=$YNH_APP_INSTANCE_NAME
 
-# Retrieve app settings
-domain=$(ynh_app_setting_get "$app" domain)
+final_path=$(ynh_app_setting_get $app final_path)
+domain=$(ynh_app_setting_get $app domain)
+db_name=$(ynh_app_setting_get $app db_name)
 
-# Copy the app files
-final_path="/var/www/${app}"
-ynh_backup "$final_path" "sources" 1
+#=================================================
+# STANDARD BACKUP STEPS
+#=================================================
+# BACKUP THE APP MAIN DIR
+#=================================================
+ynh_print_info "Backing up the main app directory..."
 
-# Copy the nginx conf files
-ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
-# Copy the php-fpm conf files
-ynh_backup "/etc/php5/fpm/pool.d/${app}.conf" "php-fpm.conf"
-ynh_backup "/etc/php5/fpm/conf.d/20-${app}.ini" "php-fpm.ini"
+ynh_backup "$final_path"
 
-# Backup db
-root_pwd=$(sudo cat /etc/yunohost/mysql)
-sudo su -c "mysqldump -u root -p$root_pwd --no-create-db $app > ./db.sql"
\ No newline at end of file
+#=================================================
+# BACKUP THE NGINX CONFIGURATION
+#=================================================
+ynh_print_info "Backing up nginx web server configuration..."
+
+ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
+
+#=================================================
+# BACKUP THE PHP-FPM CONFIGURATION
+#=================================================
+ynh_print_info "Backing up php-fpm configuration..."
+
+ynh_backup "/etc/php/7.0/fpm/pool.d/$app.conf"
+
+#=================================================
+# BACKUP THE MYSQL DATABASE
+#=================================================
+ynh_print_info "Backing up the MySQL database..."
+
+ynh_mysql_dump_db "$db_name" > db.sql
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
diff --git a/scripts/change_url b/scripts/change_url
new file mode 100644
index 0000000..448c3bd
--- /dev/null
+++ b/scripts/change_url
@@ -0,0 +1,101 @@
+#!/bin/bash
+
+#=================================================
+# GENERIC STARTING
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+source _common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# RETRIEVE ARGUMENTS
+#=================================================
+
+old_domain=$YNH_APP_OLD_DOMAIN
+old_path=$YNH_APP_OLD_PATH
+
+new_domain=$YNH_APP_NEW_DOMAIN
+new_path=$YNH_APP_NEW_PATH
+
+app=$YNH_APP_INSTANCE_NAME
+
+#=================================================
+# LOAD SETTINGS
+#=================================================
+ynh_print_info "Loading installation settings..."
+
+# Needed for helper "ynh_add_nginx_config"
+final_path=$(ynh_app_setting_get $app final_path)
+
+#=================================================
+# CHECK THE SYNTAX OF THE PATHS
+#=================================================
+
+test -n "$old_path" || old_path="/"
+test -n "$new_path" || new_path="/"
+new_path=$(ynh_normalize_url_path $new_path)
+old_path=$(ynh_normalize_url_path $old_path)
+
+#=================================================
+# CHECK WHICH PARTS SHOULD BE CHANGED
+#=================================================
+
+change_domain=0
+if [ "$old_domain" != "$new_domain" ]
+then
+	change_domain=1
+fi
+
+change_path=0
+if [ "$old_path" != "$new_path" ]
+then
+	change_path=1
+fi
+
+#=================================================
+# STANDARD MODIFICATIONS
+#=================================================
+# MODIFY URL IN NGINX CONF
+#=================================================
+ynh_print_info "Updating nginx web server configuration..."
+
+nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
+
+# Change the path in the nginx config file
+if [ $change_path -eq 1 ]
+then
+	# Make a backup of the original nginx config file if modified
+	ynh_backup_if_checksum_is_different "$nginx_conf_path"
+	# Set global variables for nginx helper
+	domain="$old_domain"
+	path_url="$new_path"
+	# Create a dedicated nginx config
+	ynh_add_nginx_config
+fi
+
+# Change the domain for nginx
+if [ $change_domain -eq 1 ]
+then
+	# Delete file checksum for the old conf file location
+	ynh_delete_file_checksum "$nginx_conf_path"
+	mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf
+	# Store file checksum for the new config file location
+	ynh_store_file_checksum "/etc/nginx/conf.d/$new_domain.d/$app.conf"
+fi
+
+#=================================================
+# GENERIC FINALISATION
+#=================================================
+# RELOAD NGINX
+#=================================================
+ynh_print_info "Reloading nginx web server..."
+
+systemctl reload nginx
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_print_info "Change of URL completed for $app"
diff --git a/scripts/install b/scripts/install
index ca4a052..095e922 100644
--- a/scripts/install
+++ b/scripts/install
@@ -1,139 +1,192 @@
 #!/bin/bash
 
-# Exit on command errors and treat unset variables as an error
-set -eu
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
 
-source .fonctions	# Loads the generic functions usually used in the script
-source /usr/share/yunohost/helpers # Source app helpers
+source _common.sh
+source /usr/share/yunohost/helpers
 
-CLEAN_SETUP () {
-	# Clean installation residues that are not supported by the remove script.
-	# Clean hosts
-	sudo sed -i '/#SPIP/d' /etc/hosts
+#=================================================
+# MANAGE SCRIPT FAILURE
+#=================================================
+
+ynh_clean_setup() {
+	### Remove this function if there's nothing to clean before calling the remove script.
+	true
 }
-TRAP_ON	# Active trap to stop the script if an error is detected.
+# Exit if an error occurs during the execution of the script
+ynh_abort_if_errors
+
+#=================================================
+# RETRIEVE ARGUMENTS FROM THE MANIFEST
+#=================================================
 
 domain=$YNH_APP_ARG_DOMAIN
-path=$YNH_APP_ARG_PATH
-admin_spip=$YNH_APP_ARG_ADMIN
-language=$YNH_APP_ARG_LANGUAGE
+path_url=$YNH_APP_ARG_PATH
+admin=$YNH_APP_ARG_ADMIN
+password=$YNH_APP_ARG_PASSWORD
 is_public=$YNH_APP_ARG_IS_PUBLIC
-ldap=$YNH_APP_ARG_LDAP
+users_status=$YNH_APP_ARG_USERS_STATUS
 
 app=$YNH_APP_INSTANCE_NAME
 
-CHECK_VAR "$app" "app name not set"
+#=================================================
+# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
+#=================================================
+ynh_print_info "Validating installation parameters..."
 
-CHECK_USER "$admin_spip"
+final_path=/var/www/$app
+test ! -e "$final_path" || ynh_die "This path already contains a folder"
 
-CHECK_PATH
+# Normalize the url path syntax
+path_url=$(ynh_normalize_url_path $path_url)
 
-CHECK_DOMAINPATH
+# Register (book) web path
+ynh_webpath_register $app $domain $path_url
 
-CHECK_FINALPATH
+#=================================================
+# STORE SETTINGS FROM MANIFEST
+#=================================================
+ynh_print_info "Storing installation settings..."
 
 ynh_app_setting_set $app domain $domain
-ynh_app_setting_set $app path $path
-ynh_app_setting_set $app admin $admin_spip
+ynh_app_setting_set $app path $path_url
+ynh_app_setting_set $app admin $admin
+ynh_app_setting_set $app password $password
 ynh_app_setting_set $app is_public $is_public
-ynh_app_setting_set $app language $language
-ynh_app_setting_set $app ldap $ldap
+ynh_app_setting_set $app users_status $users_status
 
-GENERATE_DB $app	# Create a database and a dedicated user in the app name
+#=================================================
+# CREATE A MYSQL DATABASE
+#=================================================
+ynh_print_info "Creating a MySQL database..."
+
+db_name=$(ynh_sanitize_dbid $app)
+ynh_app_setting_set $app db_name $db_name
+ynh_mysql_setup_db $db_name $db_name
+db_pwd=$(ynh_app_setting_get $app mysqlpwd)
+
+#=================================================
+# DOWNLOAD, CHECK AND UNPACK SOURCE
+#=================================================
+ynh_print_info "Setting up source files..."
 
-# Creates the destination directory and stores its location.
-sudo mkdir "$final_path"
 ynh_app_setting_set $app final_path $final_path
+# Download, check integrity, uncompress and patch the source from app.src
+ynh_setup_source "$final_path"
 
-# Get source
-SETUP_SOURCE
+#=================================================
+# NGINX CONFIGURATION
+#=================================================
+ynh_print_info "Configuring nginx web server..."
 
-# Set permissions spip directory
-sudo chown -R www-data: $final_path
+# Create a dedicated nginx config
+ynh_add_nginx_config
 
-echo -e "127.0.0.1 $domain #SPIP" | sudo tee -a /etc/hosts
+#=================================================
+# CREATE DEDICATED USER
+#=================================================
+ynh_print_info "Configuring system user..."
 
-# Copy nginx configuration
-sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
+# Create a system user
+ynh_system_user_create $app
 
-# Modif the variables in the nginx configuration file
-sudo sed -i "s@__PATHTOCHANGE__@$path@g" /etc/nginx/conf.d/$domain.d/$app.conf
-sudo sed -i "s@__FINALPATH__@$final_path@g" /etc/nginx/conf.d/$domain.d/$app.conf
-sudo sed -i "s@__NAMETOCHANGE__@$app@g" /etc/nginx/conf.d/$domain.d/$app.conf
+#=================================================
+# PHP-FPM CONFIGURATION
+#=================================================
+ynh_print_info "Configuring php-fpm..."
 
-if [ "$is_public" = "Yes" ];
-then
-	sudo sed -i "s@#--PRIVATE--@@g" /etc/nginx/conf.d/$domain.d/$app.conf
-fi
+# Create a dedicated php-fpm config
+ynh_add_fpm_config
 
-# Create the php-fpm pool config
-POOL_FPM
+#=================================================
+# SPECIFIC SETUP
+#=================================================
+# SETUP APPLICATION WITH CURL
+#=================================================
 
-sudo cp ../conf/connect.php $final_path/config/connect.php
-sudo cp ../conf/mes_options.php $final_path/config/mes_options.php 
+# Set right permissions for curl install
+chown -R $app: $final_path
 
-#Allow plugins installation directly from SPIP
-sudo mkdir $final_path/plugins/
-sudo mkdir $final_path/plugins/auto/
-sudo chown www-data:www-data -R $final_path/plugins/
+# Set the app as temporarily public for curl call
+ynh_print_info "Configuring SSOwat..."
+ynh_app_setting_set $app skipped_uris "/"
+# Reload SSOwat config
+yunohost app ssowatconf
 
-# Change SPIP configuration file variables
-sudo sed -i "s@__DB_USER__@$db_user@g" $final_path/config/connect.php
-sudo sed -i "s@__DB_PWD__@$db_pwd@g" $final_path/config/connect.php 
-
-db_md5=$(echo $db_pwd | md5sum | awk '{print $1}')
-db_sha=$(echo $db_pwd | openssl dgst -sha1 -hmac "key" | awk -F'= ' {'print $2'})
-language="$(echo $language | head -c 2)"
-
-# Change spip_auteurs table informations
-sudo sed -i "s@__ADMIN_SPIP__@$admin_spip@g" ../conf/sql/spip.sql
-sudo sed -i "s@__PATH__@$path@g" ../conf/sql/spip.sql
-sudo sed -i "s@__DB_USER__@$db_user@g" ../conf/sql/spip.sql
-sudo sed -i "s@__DB_PWD__@$db_md5@g" ../conf/sql/spip.sql
-sudo sed -i "s@__DOMAIN__@$domain@g" ../conf/sql/spip.sql
-sudo sed -i "s@__DB_SHA__@$db_sha@g" ../conf/sql/spip.sql
-sudo sed -i "s@__LANG_SPIP__@$language@g" ../conf/sql/spip.sql
-
-for i in 1 2 3 4 5 6 7 8
-do
-	j=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p')
-	if [ "$j" = "" ];
-	then
-		# For obscure reasons, the loop is too fast at execution
-		sleep 1
-		j=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p')
-	fi
-	sudo sed -i "s/__ALEA_ACTUEL__/$j/g" ../conf/sql/spip.sql
-	sudo sed -i "s/__ALEA_FUTUR__/$j/g" ../conf/sql/spip.sql
-done
-
-# Load the tables structure into the database.
-mysql --debug-check -u $db_user -p$db_pwd $db_user < ../conf/sql/spip.sql
-
-# Use LDAP for SPIP
-if [ "${ldap}" = "Yes" ];
-then
-	sudo cp ../conf/ldap.php $final_path/config/ldap.php
-	sudo sed -i "s/__LDAP__/ldap/g" $final_path/config/connect.php    
-	sudo mysql -e "INSERT INTO spip_meta (nom, valeur, impt) VALUES ('ldap_statut_import', '1comite', 'oui');" -u $db_user -p$db_pwd $db_user
+# Reload Nginx
+systemctl reload nginx
+ynh_print_info "Finalizing installation..."
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=chmod"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=2" "chmod=755" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "choix_db=$db_name" "tprefix=$db_name"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap1"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap2" "adresse_ldap=localhost" "port_ldap=389" "tls_ldap=no" "protocole_ldap=3"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap3" "adresse_ldap=localhost" "port_ldap=389" "tls_ldap=no" "protocole_ldap=3"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap4" "adresse_ldap=localhost" "port_ldap=389" "tls_ldap=no" "protocole_ldap=3" "base_ldap=dc=yunohost,dc=org"
 
+# statut_ldap can take: 0minirezo for Administrator, 1comite for Editor, 6forum for Visitor
+if [ $users_status = "Administrator" ]; then
+	status="0minirezo"
+elif [ $users_status = "Editor" ]; then
+	status="1comite"
 else
-	sudo sed -i "s@__LDAP__@@g" $final_path/config/connect.php 
+	status="6forum"
+fi
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap5" "adresse_ldap=localhost" "port_ldap=389" "tls_ldap=no" "protocole_ldap=3" "base_ldap=dc=yunohost,dc=org" "statut_ldap=$status" "ldap_login=sAMAccountName,uid,login,userid,cn,sn" "ldap_nom=cn" "ldap_email=mail" "ldap_bio=description"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3" "ldap_present=true"
+
+email=$(yunohost user info $admin | grep mail: | cut -d' ' -f2 | tr -d '\n')
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3b" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "sel_db=$db_name" "nom=$admin" "email=$email" "login=$admin" "pass=$password" "pass_verif=$password"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=fin"
+
+# Remove the public access
+if [ $is_public -eq 0 ]; then
+	ynh_app_setting_delete $app skipped_uris
 fi
 
-# Setup SSOwat
-ynh_app_setting_set "$app" is_public "$is_public"
-if [ "$is_public" = "Yes" ];
-then
-  ynh_app_setting_set "$app" unprotected_uris "/"
+#=================================================
+# MODIFY A CONFIG FILE
+#=================================================
+
+ynh_replace_string "'','utf8');" "'ldap.php','utf8');" $final_path/config/connect.php
+cp ../conf/mes_options.php $final_path/config/mes_options.php
+
+#=================================================
+# STORE THE CONFIG FILE CHECKSUM
+#=================================================
+
+ynh_store_file_checksum "$final_path/config/connect.php"
+
+#=================================================
+# GENERIC FINALIZATION
+#=================================================
+# ADVERTISE SERVICE IN ADMIN PANEL
+#=================================================
+
+#=================================================
+# SETUP SSOWAT
+#=================================================
+ynh_print_info "Configuring SSOwat..."
+
+# Make app public if necessary
+if [ $is_public -eq 1 ]; then
+	# unprotected_uris allows SSO credentials to be passed anyway.
+	ynh_app_setting_set $app unprotected_uris "/"
 fi
 
-# Reload SSOwat configuration
-sudo yunohost app ssowatconf
+#=================================================
+# RELOAD NGINX
+#=================================================
+ynh_print_info "Reloading nginx web server..."
 
-# Reload Nginx and regenerate SSOwat conf
-sudo systemctl reload php5-fpm
-sudo systemctl reload nginx
+systemctl reload nginx
 
-# clean hosts
-sudo sed -i '/#SPIP/d' /etc/hosts
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_print_info "Installation of $app completed"
diff --git a/scripts/remove b/scripts/remove
index 4426b8a..1f589fb 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -1,36 +1,80 @@
 #!/bin/bash
 
-# Exit on command errors and treat unset variables as an error
-set -u
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
 
-# Loads the generic functions usually used in the script
-source .fonctions
-# Source app helpers
+source _common.sh
 source /usr/share/yunohost/helpers
 
-# Get multi-instances specific variables
+#=================================================
+# LOAD SETTINGS
+#=================================================
+ynh_print_info "Loading installation settings..."
+
 app=$YNH_APP_INSTANCE_NAME
 
-# Retrieve app settings
-domain=$(ynh_app_setting_get "$app" domain)
-# with_mysql=$(ynh_app_setting_get "$app" with_mysql)
+domain=$(ynh_app_setting_get $app domain)
+db_name=$(ynh_app_setting_get $app db_name)
+db_user=$db_name
+final_path=$(ynh_app_setting_get $app final_path)
 
-# Drop MySQL database and user as needed
-#if [[ $with_mysql -eq 1 ]]; then
-dbname=$app
-dbuser=$app
-dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
-ynh_mysql_drop_db $dbname || true
-ynh_mysql_drop_user $dbuser || true
-#fi
+#=================================================
+# STANDARD REMOVE
+#=================================================
+# STOP AND REMOVE SERVICE
+#=================================================
+ynh_print_info "Stopping and removing the systemd service"
 
-# Delete app directory and configurations
-SECURE_REMOVE '/var/www/$app'	# Delete directory application
-sudo rm -f "/etc/php5/fpm/pool.d/${app}.conf"
-sudo rm -f "/etc/php5/fpm/conf.d/20-${app}.ini"
-[[ -n $domain ]] && sudo rm -f "/etc/nginx/conf.d/${domain}.d/${app}.conf"
+# Remove the dedicated systemd config
+ynh_remove_systemd_config
 
-# Reload services
-sudo systemctl reload php5-fpm
-sudo systemctl reload nginx
-sudo yunohost app ssowatconf
\ No newline at end of file
+#=================================================
+# REMOVE THE MYSQL DATABASE
+#=================================================
+ynh_print_info "Removing the MySQL database"
+
+# Remove a database if it exists, along with the associated user
+ynh_mysql_remove_db $db_user $db_name
+
+#=================================================
+# REMOVE APP MAIN DIR
+#=================================================
+ynh_print_info "Removing app main directory"
+
+# Remove the app directory securely
+ynh_secure_remove "$final_path"
+
+#=================================================
+# REMOVE NGINX CONFIGURATION
+#=================================================
+ynh_print_info "Removing nginx web server configuration"
+
+# Remove the dedicated nginx config
+ynh_remove_nginx_config
+
+#=================================================
+# REMOVE PHP-FPM CONFIGURATION
+#=================================================
+ynh_print_info "Removing php-fpm configuration"
+
+# Remove the dedicated php-fpm config
+ynh_remove_fpm_config
+
+#=================================================
+# GENERIC FINALIZATION
+#=================================================
+# REMOVE DEDICATED USER
+#=================================================
+ynh_print_info "Removing the dedicated system user"
+
+# Delete a system user
+ynh_system_user_delete $app
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_print_info "Removal of $app completed"
diff --git a/scripts/restore b/scripts/restore
index 8a50902..29987a7 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -1,77 +1,111 @@
 #!/bin/bash
-# This restore script is adapted to Yunohost >=2.4
 
-# Exit on command errors and treat unset variables as an error
-set -eu
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
 
-# Source app helpers
+#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
+source ../settings/scripts/_common.sh
 source /usr/share/yunohost/helpers
 
-# The parameter $app is the id of the app instance ex: ynhexample__2
+#=================================================
+# MANAGE SCRIPT FAILURE
+#=================================================
+
+ynh_clean_setup () {
+	#### Remove this function if there's nothing to clean before calling the remove script.
+	true
+}
+# Exit if an error occurs during the execution of the script
+ynh_abort_if_errors
+
+#=================================================
+# LOAD SETTINGS
+#=================================================
+ynh_print_info "Loading settings..."
+
 app=$YNH_APP_INSTANCE_NAME
 
-# Get old parameter of the app
 domain=$(ynh_app_setting_get $app domain)
-path=$(ynh_app_setting_get $app path)
-is_public=$(ynh_app_setting_get $app is_public)
-# with_mysql=$(ynh_app_setting_get "$app" with_mysql)
+path_url=$(ynh_app_setting_get $app path)
+final_path=$(ynh_app_setting_get $app final_path)
+db_name=$(ynh_app_setting_get $app db_name)
+
+#=================================================
+# CHECK IF THE APP CAN BE RESTORED
+#=================================================
+ynh_print_info "Validating restoration parameters..."
+
+ynh_webpath_available $domain $path_url \
+	|| ynh_die "Path not available: ${domain}${path_url}"
+test ! -d $final_path \
+	|| ynh_die "There is already a directory: $final_path "
 
 # Check domain/path availability
 sudo yunohost app checkurl "${domain}${path}" -a "$app" \
     || ynh_die "Path not available: ${domain}${path}"
 
-# Check $final_path
-final_path="/var/www/${app}"
-if [ -d $final_path ]; then
-	ynh_die "There is already a directory: $final_path"
-fi
+#=================================================
+# STANDARD RESTORATION STEPS
+#=================================================
+# RESTORE THE NGINX CONFIGURATION
+#=================================================
 
-# Check configuration files nginx
-nginx_conf="/etc/nginx/conf.d/${domain}.d/${app}.conf"
-if [ -f $nginx_conf ]; then
-	ynh_die "The NGINX configuration already exists at '${nginx_conf}'. You should safely delete it before restoring this app."
-fi
-# Check configuration files php-fpm
-phpfpm_conf="/etc/php5/fpm/pool.d/php-fpm-${app}.conf"
-if [ -f $phpfpm_conf ]; then 
-	ynh_die "The PHP FPM configuration already exists at '${phpfpm_conf}'. You should safely delete it before restoring this app."
-fi
+ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
 
-phpfpm_ini="/etc/php5/fpm/conf.d/20-${app}.ini"
-if [ -f $phpfpm_ini ]; then
-	ynh_die "The PHP FPM INI configuration already exists at '${phpfpm_ini}'. You should safely delete it before restoring this app."
-fi
+#=================================================
+# RESTORE THE APP MAIN DIR
+#=================================================
+ynh_print_info "Restoring the app main directory..."
 
-# Restore sources & data
-sudo cp -a ./sources "${final_path}"
+ynh_restore_file "$final_path"
 
-# Set permissions
-sudo chown -R www-data: "${final_path}"
+#=================================================
+# RECREATE THE DEDICATED USER
+#=================================================
+ynh_print_info "Recreating the dedicated system user..."
+
+# Create the dedicated user (if not existing)
+ynh_system_user_create $app
+
+#=================================================
+# RESTORE USER RIGHTS
+#=================================================
+
+# Restore permissions on app files
+chown -R $app: $final_path
+
+#=================================================
+# RESTORE THE PHP-FPM CONFIGURATION
+#=================================================
+
+ynh_restore_file "/etc/php/7.0/fpm/pool.d/$app.conf"
+
+#=================================================
+# SPECIFIC RESTORATION
+#=================================================
+# RESTORE THE MYSQL DATABASE
+#=================================================
+ynh_print_info "Restoring the MySQL database..."
 
-# Restore db
-# if [[ $with_mysql -eq 1 ]]; then
 db_pwd=$(ynh_app_setting_get $app mysqlpwd)
-db_user=$app
-ynh_mysql_create_db $db_user $db_user $db_pwd
-sudo su -c "mysql -u $db_user -p$db_pwd $app < ./db.sql"
-sudo rm -f "./db.sql"
-sudo sed -i "s@__DB_USER__@$db_user@g" $final_path/config/connect.php
-sudo sed -i "s@__DB_PWD__@$db_pwd@g" $final_path/config/connect.php 
-# fi
+ynh_mysql_setup_db $db_name $db_name $db_pwd
+ynh_mysql_connect_as $db_name $db_pwd $db_name < ./db.sql
 
-# Restore nginx configuration files
-sudo cp -a ./nginx.conf   "${nginx_conf}"
-# Restore php-fpm configuration files
-sudo cp -a ./php-fpm.conf "${phpfpm_conf}"
-sudo cp -a ./php-fpm.ini "${phpfpm_ini}"
+#=================================================
+# GENERIC FINALIZATION
+#=================================================
+# RELOAD NGINX AND PHP-FPM
+#=================================================
+ynh_print_info "Reloading nginx web server and php-fpm..."
 
-# Set ssowat config
-if [ "$is_public" = "No" ];
-then
-	ynh_app_setting_delete $app skipped_uris
-fi
+systemctl reload php7.0-fpm
+systemctl reload nginx
 
-# Reload services
-sudo systemctl reload php5-fpm
-sudo systemctl reload nginx
-sudo yunohost app ssowatconf
\ No newline at end of file
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_print_info "Restoration completed for $app"
diff --git a/scripts/upgrade b/scripts/upgrade
index a944f1d..c281f04 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -1,55 +1,208 @@
 #!/bin/bash
 
-# Exit on command errors and treat unset variables as an error
-set -eu
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
 
-source .fonctions	# Loads the generic functions usually used in the script
-source /usr/share/yunohost/helpers # Source YunoHost helpers
+source _common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# LOAD SETTINGS
+#=================================================
+ynh_print_info "Loading installation settings..."
 
-# See comments in install script
 app=$YNH_APP_INSTANCE_NAME
 
-# Retrieve app settings
-domain=$(ynh_app_setting_get "$app" domain)
-path=$(ynh_app_setting_get "$app" path)
-admin=$(ynh_app_setting_get "$app" admin)
-is_public=$(ynh_app_setting_get "$app" is_public)
-language=$(ynh_app_setting_get "$app" language)
+domain=$(ynh_app_setting_get $app domain)
+path_url=$(ynh_app_setting_get $app path)
+admin=$(ynh_app_setting_get $app admin)
+password=$(ynh_app_setting_get $app admin)
+is_public=$(ynh_app_setting_get $app is_public)
+final_path=$(ynh_app_setting_get $app final_path)
+users_status=$(ynh_app_setting_get $app users_status)
+db_name=$(ynh_app_setting_get $app db_name)
+db_pwd=$(ynh_app_setting_get $app mysqlpwd)
 
-CHECK_PATH	# Checks and corrects the syntax of the path.
+#=================================================
+# ENSURE DOWNWARD COMPATIBILITY
+#=================================================
+ynh_print_info "Ensuring downward compatibility..."
 
-root_pwd=$(sudo cat /etc/yunohost/mysql)
-
-final_path=/var/www/$app
-
-# Get source
-SETUP_SOURCE
-
-db_name=$app
-
-CHECK_MD5_CONFIG "connect.php" "$final_path/config/connect.php"	# Created a backup of the config file if it was changed.
-
-# Modify Nginx configuration file and copy it to Nginx conf directory
-sudo sed -i "s@__PATHTOCHANGE__@$path@g" /etc/nginx/conf.d/$domain.d/$app.conf
-sudo sed -i "s@__FINALPATH__@$final_path@g" /etc/nginx/conf.d/$domain.d/$app.conf
-sudo sed -i "s@__NAMETOCHANGE__@$app@g" /etc/nginx/conf.d/$domain.d/$app.conf
-
-if [ "$is_public" = "Yes" ];
-then
-	sudo sed -i "s@#--PRIVATE--@@g" /etc/nginx/conf.d/$domain.d/$app.conf
+# Fix is_public as a boolean value
+if [ "$is_public" = "Yes" ]; then
+	ynh_app_setting_set $app is_public 1
+	is_public=1
+elif [ "$is_public" = "No" ]; then
+	ynh_app_setting_set $app is_public 0
+	is_public=0
 fi
 
-# Create the php-fpm pool config
-POOL_FPM
-
-# Setup SSOwat
-ynh_app_setting_set "$app" is_public "$is_public"
-if [ "$is_public" = "Yes" ];
-then
-  ynh_app_setting_set "$app" unprotected_uris "/"
+# If final_path doesn't exist, create it
+if [ -z $final_path ]; then
+	final_path=/var/www/$app
+	ynh_app_setting_set $app final_path $final_path
 fi
 
-# Reload Nginx
-sudo systemctl reload php5-fpm
-sudo systemctl reload nginx
-sudo yunohost app ssowatconf
\ No newline at end of file
+# If users_status doesn't exist, create it
+if [ -z $users_status ]; then
+	users_status="Editor"
+	ynh_app_setting_set $app users_status $users_status
+fi
+
+if [ -z $password ]; then
+	# Generate random password
+	password=$(ynh_string_random 8)
+
+	echo "The new version of SPIP provide a new password. You can change it in the private area." > mail_to_send
+	echo "" >> mail_to_send
+	echo "This password is: $password" >> mail_to_send
+
+	ynh_send_readme_to_admin --app_message="mail_to_send" --type="upgrade"
+	
+	ynh_app_setting_set $app password $password
+fi
+
+#=================================================
+# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
+#=================================================
+ynh_print_info "Backing up the app before upgrading (may take a while)..."
+
+# Backup the current version of the app
+ynh_backup_before_upgrade
+ynh_clean_setup () {
+	# restore it if the upgrade fails
+	ynh_restore_upgradebackup
+}
+# Exit if an error occurs during the execution of the script
+ynh_abort_if_errors
+
+#=================================================
+# CHECK THE PATH
+#=================================================
+
+# Normalize the URL path syntax
+path_url=$(ynh_normalize_url_path $path_url)
+
+#=================================================
+# STANDARD UPGRADE STEPS
+#=================================================
+# DOWNLOAD, CHECK AND UNPACK SOURCE
+#=================================================
+ynh_print_info "Upgrading source files..."
+
+# Download, check integrity, uncompress and patch the source from app.src
+ynh_setup_source "$final_path"
+
+#=================================================
+# NGINX CONFIGURATION
+#=================================================
+ynh_print_info "Upgrading nginx web server configuration..."
+
+# Create a dedicated nginx config
+ynh_add_nginx_config
+
+#=================================================
+# CREATE DEDICATED USER
+#=================================================
+ynh_print_info "Making sure dedicated system user exists..."
+
+# Create a dedicated user (if not existing)
+ynh_system_user_create $app
+
+#=================================================
+# PHP-FPM CONFIGURATION
+#=================================================
+ynh_print_info "Upgrading php-fpm configuration..."
+
+# Create a dedicated php-fpm config
+ynh_add_fpm_config
+
+#=================================================
+# SPECIFIC UPGRADE
+#=================================================
+# SETUP APPLICATION WITH CURL
+#=================================================
+
+# Set right permissions for curl install
+chown -R $app: $final_path
+
+# Set the app as temporarily public for curl call
+ynh_app_setting_set $app skipped_uris "/"
+# Reload SSOwat config
+yunohost app ssowatconf
+
+ynh_backup_if_checksum_is_different "$final_path/config/connect.php"
+
+ynh_secure_remove "$final_path/config/connect.php"
+
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=chmod"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=2" "chmod=755" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "choix_db=$db_name" "tprefix=$db_name"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap1"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap2" "adresse_ldap=localhost" "port_ldap=389" "tls_ldap=no" "protocole_ldap=3"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap3" "adresse_ldap=localhost" "port_ldap=389" "tls_ldap=no" "protocole_ldap=3"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap4" "adresse_ldap=localhost" "port_ldap=389" "tls_ldap=no" "protocole_ldap=3" "base_ldap=dc=yunohost,dc=org"
+
+# statut_ldap can take: 0minirezo for Administrator, 1comite for Editor, 6forum for Visitor
+if [ $users_status = "Administrator" ]; then
+	status="0minirezo"
+elif [ $users_status = "Editor" ]; then
+	status="1comite"
+else
+	status="6forum"
+fi
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap5" "adresse_ldap=localhost" "port_ldap=389" "tls_ldap=no" "protocole_ldap=3" "base_ldap=dc=yunohost,dc=org" "statut_ldap=$status" "ldap_login=sAMAccountName,uid,login,userid,cn,sn" "ldap_nom=cn" "ldap_email=mail" "ldap_bio=description"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3" "ldap_present=true"
+
+email=$(yunohost user info $admin | grep mail: | cut -d' ' -f2 | tr -d '\n')
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3b" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "sel_db=$db_name" "nom=$admin" "email=$email" "login=$admin" "pass=$password" "pass_verif=$password"
+ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=fin"
+
+# Remove the public access
+if [ $is_public -eq 0 ]; then
+	ynh_app_setting_delete $app skipped_uris
+fi
+
+
+#=================================================
+# MODIFY A CONFIG FILE
+#=================================================
+
+ynh_replace_string "'','utf8');" "'ldap.php','utf8');" $final_path/config/connect.php
+cp ../conf/mes_options.php $final_path/config/mes_options.php
+
+#=================================================
+# STORE THE CONFIG FILE CHECKSUM
+#=================================================
+
+ynh_store_file_checksum "$final_path/config/connect.php"
+
+#=================================================
+# GENERIC FINALIZATION
+#=================================================
+# SETUP SSOWAT
+#=================================================
+ynh_print_info "Upgrading SSOwat configuration..."
+
+# Make app public if necessary
+if [ $is_public -eq 1 ]
+then
+	# unprotected_uris allows SSO credentials to be passed anyway
+	ynh_app_setting_set $app unprotected_uris "/"
+fi
+
+#=================================================
+# RELOAD NGINX
+#=================================================
+ynh_print_info "Reloading nginx web server..."
+
+systemctl reload nginx
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_print_info "Upgrade of $app completed"
diff --git a/sources/source_dir b/sources/source_dir
deleted file mode 100644
index b93ec7e..0000000
--- a/sources/source_dir
+++ /dev/null
@@ -1 +0,0 @@
-spip
\ No newline at end of file
diff --git a/sources/source_md5 b/sources/source_md5
deleted file mode 100644
index 2f32082..0000000
--- a/sources/source_md5
+++ /dev/null
@@ -1 +0,0 @@
-ef284a7b78591cd04f7e37382881d636  SPIP-v3.1.6.zip
\ No newline at end of file
diff --git a/sources/source_url b/sources/source_url
deleted file mode 100644
index 1705ca4..0000000
--- a/sources/source_url
+++ /dev/null
@@ -1 +0,0 @@
-http://files.spip.net/spip/archives/SPIP-v3.1.6.zip
\ No newline at end of file