Repository navigation
Expand file tree
/
Copy pathautoinstall.php
More file actions
52 lines (49 loc) · 1.84 KB
/
Copy pathautoinstall.php
File metadata and controls
52 lines (49 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/*
* Revisions Plugin 0.2.5
* File: autoinstall.php
* Purpose: Geeklog installation metadata and compatibility hooks
* Copyright (C) 2026
* Author: Ben hostellerie DOT org AT gmail DOT com
* License: GNU General Public License, version 2 or later (see LICENSE).
* Target: Geeklog 2.2.2; PHP 5.6.40 and later.
*/
/**
* Describe Geeklog groups, features and plugin-owned tables.
* @param string $pi_name Plugin name.
* @return array Plugin installation specification.
*/
function plugin_autoinstall_revisions($pi_name)
{
return array(
'info' => array('pi_name'=>'revisions','pi_display_name'=>'Revisions','pi_version'=>'0.2.5','pi_gl_version'=>'2.2.2','pi_homepage'=>'https://github.com/hostellerie/revisions'),
'groups' => array('Revisions Admin'=>'Manage editorial revisions'),
'features' => array('revisions.admin'=>'Manage revision history'),
'mappings' => array('revisions.admin'=>array('Revisions Admin')),
'tables' => array('revisions_baseline','revisions_history')
);
}
/**
* Check PHP and Geeklog minimum versions.
* @param string $pi_name Plugin name.
* @return bool True if compatible.
*/
function plugin_compatible_with_this_version_revisions($pi_name)
{
return version_compare(PHP_VERSION,'5.6.40','>=') && (!defined('VERSION') || version_compare(VERSION,'2.2.2','>='));
}
/**
* Geeklog 2.2.2 calls this after creating the plugin tables and registering it.
* Seed all eligible existing Static Pages so tracking is on from installation.
*/
/**
* Start tracking eligible existing Static Pages after installation.
* @param string $pi_name Plugin name.
* @return bool True when initial discovery succeeds.
*/
function plugin_postinstall_revisions($pi_name)
{
global $_CONF;
require_once $_CONF['path'] . 'plugins/revisions/functions.inc';
return REVISIONS_seedAllPages() !== false;
}