Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
offline
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Open Source
offline
Commits
818884b7
Commit
818884b7
authored
Dec 05, 2018
by
Cerdic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pas besoin de fichier options, quelques petits nettoyages
parent
7ec204b5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
129 deletions
+19
-129
action/api_offline.php
action/api_offline.php
+5
-4
fabrique_offline.php
fabrique_offline.php
+0
-98
inc/offline.php
inc/offline.php
+12
-0
offline_fonctions.php
offline_fonctions.php
+2
-1
offline_options.php
offline_options.php
+0
-26
No files found.
action/api_offline.php
View file @
818884b7
...
...
@@ -31,6 +31,8 @@ function action_api_offline_dist($arg = null, $return = false, $cached_or_refres
lire_fichier
(
$f
,
$t
);
}
else
{
include_spip
(
'inc/offline'
);
$quoi
=
preg_replace
(
',\W+,'
,
'_'
,
$arg
);
$api_offline_quoi
=
charger_fonction
(
'api_offline_'
.
$quoi
,
'action'
);
$t
=
$api_offline_quoi
(
$cached_or_refresh
===
'refresh'
);
...
...
@@ -69,7 +71,7 @@ function action_api_offline_dist($arg = null, $return = false, $cached_or_refres
function
action_api_offline_install_js_dist
(
$force_refresh
=
false
)
{
include_spip
(
'inc/offline'
);
$config
=
offline_config_js
(
$force_refresh
);
$debug
=
false
;
if
(
isset
(
$config
[
'debug'
])
&&
$config
[
'debug'
])
{
...
...
@@ -96,7 +98,7 @@ function action_api_offline_install_js_dist($force_refresh = false) {
}
function
action_api_offline_sw_js_dist
(
$force_refresh
=
false
)
{
include_spip
(
'inc/offline'
);
$config
=
offline_config_js
(
$force_refresh
);
return
offline_build_jslist
(
$config
,
...
...
@@ -111,7 +113,7 @@ function action_api_offline_sw_js_dist($force_refresh = false) {
}
function
action_api_offline_uninstall_js_dist
(
$force_refresh
=
false
)
{
include_spip
(
'inc/offline'
);
$config
=
array
();
return
offline_build_jslist
(
$config
,
array
(
...
...
@@ -122,7 +124,6 @@ function action_api_offline_uninstall_js_dist($force_refresh = false) {
function
action_api_offline_urlsdownload_json_dist
()
{
include_spip
(
'inc/offline'
);
$objet
=
_request
(
'objet'
);
$id_objet
=
_request
(
'id_objet'
);
...
...
fabrique_offline.php
deleted
100644 → 0
View file @
7ec204b5
<?php
/**
* Fichier généré par la Fabrique de plugin v6
* le 2018-11-22 15:46:50
*
* Ce fichier de sauvegarde peut servir à recréer
* votre plugin avec le plugin «Fabrique» qui a servi à le créer.
*
* Bien évidemment, les modifications apportées ultérieurement
* par vos soins dans le code de ce plugin généré
* NE SERONT PAS connues du plugin «Fabrique» et ne pourront pas
* être recréées par lui !
*
* La «Fabrique» ne pourra que régénerer le code de base du plugin
* avec les informations dont il dispose.
*
**/
if
(
!
defined
(
'_ECRIRE_INC_VERSION'
))
{
return
;
}
$data
=
array
(
'fabrique'
=>
array
(
'version'
=>
6
,
),
'paquet'
=>
array
(
'prefixe'
=>
'offline'
,
'nom'
=>
'Offline'
,
'slogan'
=>
'Permettre la consultation hors-ligne'
,
'description'
=>
'Ajouter facilement des capacités de consultation hors-ligne sur un site SPIP'
,
'version'
=>
'0.1.0'
,
'auteur'
=>
'Cedric'
,
'auteur_lien'
=>
'https://nursit.com'
,
'licence'
=>
'GNU/GPL'
,
'categorie'
=>
'performance'
,
'etat'
=>
'dev'
,
'compatibilite'
=>
'[3.1.0-dev;3.3.*]'
,
'documentation'
=>
''
,
'administrations'
=>
'on'
,
'schema'
=>
'1.0.0'
,
'formulaire_config'
=>
'on'
,
'formulaire_config_titre'
=>
'Configuration du mode Offline'
,
'fichiers'
=>
array
(
0
=>
'autorisations'
,
1
=>
'fonctions'
,
2
=>
'options'
,
3
=>
'pipelines'
,
),
'inserer'
=>
array
(
'paquet'
=>
''
,
'administrations'
=>
array
(
'maj'
=>
''
,
'desinstallation'
=>
''
,
'fin'
=>
''
,
),
'base'
=>
array
(
'tables'
=>
array
(
'fin'
=>
''
,
),
),
),
'scripts'
=>
array
(
'pre_copie'
=>
''
,
'post_creation'
=>
''
,
),
'exemples'
=>
''
,
),
'objets'
=>
array
(
),
'images'
=>
array
(
'paquet'
=>
array
(
'logo'
=>
array
(
0
=>
array
(
'extension'
=>
'png'
,
'contenu'
=>
'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAABYlBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACqop2mnJbAx87CydHDytJ1foeMlZ2Vnqadpa23vcW9xMt2foZ7hIyEjJSjq7Gss7pyc3aCcGSCgYSFc2iHdWuIkpmJk5qKeW6Lem+LlJuNlp2OfnSOl56PmJ+QmaCSm6KThHqTnKSUnaWWh36XiH+XoKiYiYCYoKeZoqqaoqqbjYObo6ucjoScpKyekIeepq6fqK+fqbCfqbGgkomiq7Kjq7GjrLOkrLWkrbWlrbammZCmmZGnsLipsbmqsrmqsrqrs7qrs7ustLyttb2ttr6uopqutbuutr6vt7+vucCwucCxusKyu8OzqKKzusG0vMW1vca3vcO4v8i5wcm7sqy7wsi9s67At7HAxszBx87Dyc/IwbvIztTJztPKz9XNxsLP1NnP1NrR1tvV2t7Y3eHZ1NEFaOdyAAAAIHRSTlMAAgYKDA4QFhwiKjI2PEJIpbPh4eHj4+Pj4+Pn5+fn5yizNUwAAAGOSURBVDhPhZJnW8IwGEVrhFSkiHuP69aiCChDUXEAKuLAvVBEUZy4+P+mQ4qND55v7bnpe5NGECpA5uurKthAIHAXsPwhBjSmiwWPx27lPb40Bgr3aZeNcBqfGR2kN0dFzjd14uNEB4MSNQUobrLHeNnReAE3gUrIXGwhv66Sh3mCQGocODuI43pJ4ZoPqIm9nSUchRhHXIAkEtUskdwIIeb1emPmAEncHvYrieiKD8GJiWBZgO2fKH61nypTImE35BHZCBA0N0L1bOdKIuSXMQzjGCiymQ4w76ghWlPfVBfUB/0D78ic9UH1elO3bBwTwfPVG873epVXpaa/Bjycnr5iP9le1lSSSgMEEblUKvWIrWib0ZRS4z+IuEwycliLtJaaliNiO65wiZVQD3jPAtFllV0s+Lr5f8wCYZ0o/O4W8IFF+HVmIY/DfI3IYrEA7w/l+9ehc+z+YlIDTonvOONJbw5Bw2GjZk9mnlxjQ846FX65IFgbXM46ySaqcMsZllq77U/xQ5XFWsH+zze/WFrEm3dilAAAAABJRU5ErkJggg=='
,
),
),
),
'objets'
=>
array
(
),
),
);
inc/offline.php
View file @
818884b7
...
...
@@ -9,6 +9,18 @@
* @package SPIP\Offline\Inc
*/
// cette constante est pris en compte dans le nom du cache
// la changer pour invalider tous les caches existants et forcer un refresh du serviceworker
if
(
!
defined
(
'_OFFLINE_CACHE_VERSION'
))
{
define
(
'_OFFLINE_CACHE_VERSION'
,
0
);
}
// cette constante est pris en compte dans le nom du cache
// la changer pour invalider tous les caches existants et forcer un refresh du serviceworker
if
(
!
defined
(
'_OFFLINE_DEBUG'
))
{
define
(
'_OFFLINE_DEBUG'
,
false
);
}
/**
* calculer le hash du cache qui determine sa version
* @param $version_editoriale
...
...
offline_fonctions.php
View file @
818884b7
...
...
@@ -98,7 +98,8 @@ function offline_inserer_head($page_html, $insert) {
/**
* #BOUTON_TELECHARGER_OFFLINE{rubrique,#ID_RUBRIQUE,'Télécharger cette documentation','Téléchargement non disponible'}
* @param $p
* @param Champ $p
* @return Champ
*/
function
balise_BOUTON_TELECHARGER_OFFLINE_dist
(
$p
)
{
...
...
offline_options.php
deleted
100644 → 0
View file @
7ec204b5
<?php
/**
* Options au chargement du plugin Offline
*
* @plugin Offline
* @copyright 2018
* @author Cedric
* @licence GNU/GPL
* @package SPIP\Offline\Options
*/
if
(
!
defined
(
'_ECRIRE_INC_VERSION'
))
{
return
;
}
// cette constante est pris en compte dans le nom du cache
// la changer pour invalider tous les caches existants et forcer un refresh du serviceworker
if
(
!
defined
(
'_OFFLINE_CACHE_VERSION'
))
{
define
(
'_OFFLINE_CACHE_VERSION'
,
0
);
}
// cette constante est pris en compte dans le nom du cache
// la changer pour invalider tous les caches existants et forcer un refresh du serviceworker
if
(
!
defined
(
'_OFFLINE_DEBUG'
))
{
define
(
'_OFFLINE_DEBUG'
,
false
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment