File: horde.php

package info (click to toggle)
php-horde 5.2.1%2Bdebian0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 12,196 kB
  • sloc: php: 11,089; xml: 6,460; sh: 96; makefile: 33; sql: 1
file content (57 lines) | stat: -rw-r--r-- 1,460 bytes parent folder | download | duplicates (2)
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
53
54
55
56
57
<?php
/**
 * Horde post-install script.
 *
 * Copyright 2011-2014 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (LGPL-2). If you
 * did not receive this file, see http://www.horde.org/licenses/lgpl.
 *
 * @author    Michael Slusarz <slusarz@horde.org>
 * @category  Horde
 * @copyright 2011-2014 Horde LLC (http://www.horde.org/)
 * @license   http://www.horde.org/licenses/lgpl LGPL
 * @package   Horde
 */

/**
 * @author    Michael Slusarz <slusarz@horde.org>
 * @category  Horde
 * @copyright 2011-2014 Horde LLC (http://www.horde.org/)
 * @license   http://www.horde.org/licenses/lgpl LGPL
 * @package   Horde
 */
class install_horde_postinstall
{
    /**
     * Init postinstall task.
     *
     * @param PEAR_Config $config       Config object.
     * @param PEAR_PackageFile_v2 $pkg  Package object.
     * @param string $version           Last version installed.
     *
     * @returns boolean  Success.
     */
    public function init($config, $pkg, $version)
    {
        return true;
    }

    /**
     * Run task after prompt.
     *
     * @param array $info   Parameter array.
     * @param string $name  Postinstall phase.
     */
    public function run($info, $phase)
    {
        switch ($phase) {
        case 'first':
            if (strtolower($info['clear_cache']) == 'y') {
                passthru('../bin/horde-clear-cache -f');
            }
            break;
        }
    }

}