~ubuntu-branches/ubuntu/hardy/gallery2/hardy-security

« back to all changes in this revision

Viewing changes to modules/members/module.inc

  • Committer: Bazaar Package Importer
  • Author(s): Michael C. Schultheiss
  • Date: 2006-04-16 16:42:35 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060416164235-8uy0u4bfjdxpge2o
Tags: 2.1.1-1
* New upstream release (Closes: #362936)
  + Bugfixes for Postgres7 (Closes: #359000, #362152)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 * $RCSfile: module.inc,v $
4
4
 *
5
5
 * Gallery - a web based photo album viewer and editor
6
 
 * Copyright (C) 2000-2005 Bharat Mediratta
 
6
 * Copyright (C) 2000-2006 Bharat Mediratta
7
7
 *
8
8
 * This program is free software; you can redistribute it and/or modify
9
9
 * it under the terms of the GNU General Public License as published by
20
20
 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  02110-1301, USA.
21
21
 */
22
22
/**
23
 
 * @version $Revision: 1.37 $ $Date: 2005/09/10 20:28:13 $
 
23
 * @version $Revision: 1.41 $ $Date: 2006/03/22 03:52:32 $
24
24
 * @package Members
25
25
 * @author Robert Balousek <rbalousek@hotmail.com>
26
26
 */
38
38
        $this->setId('members');
39
39
        $this->setName($gallery->i18n('Members'));
40
40
        $this->setDescription($gallery->i18n('Members List and Profiles'));
41
 
        $this->setVersion('1.0.0');
42
 
        $this->setGroup('gallery', $this->translate('Gallery'));
 
41
        $this->setVersion('1.0.3');
 
42
        $this->setGroup('gallery', $gallery->i18n('Gallery'));
43
43
        $this->setCallbacks('getSiteAdminViews');
44
 
        $this->setRequiredCoreApi(array(6, 0));
45
 
        $this->setRequiredModuleApi(array(2, 0));
 
44
        $this->setRequiredCoreApi(array(7, 0));
 
45
        $this->setRequiredModuleApi(array(3, 0));
46
46
    }
47
47
 
48
48
    /**
52
52
        if (!isset($currentVersion)) {
53
53
            list ($ret, $viewSelectedGroupId) =
54
54
                GalleryCoreApi::getPluginParameter('module', 'core', 'id.everybodyGroup');
55
 
            if ($ret->isError()) {
 
55
            if ($ret) {
56
56
                return $ret->wrap(__FILE__, __LINE__);
57
57
            }
58
58
 
59
59
            foreach (array('canViewMembersModule' => $viewSelectedGroupId,
60
60
                           'canViewEmailAddress' => 0) as $key => $value) {
61
61
                $ret = $this->setParameter($key, $value);
62
 
                if ($ret->isError()) {
 
62
                if ($ret) {
63
63
                    return $ret->wrap(__FILE__, __LINE__);
64
64
                }
65
65
            }
66
66
        }
67
67
 
68
 
        return GalleryStatus::success();
69
 
    }
70
 
 
71
 
    /**
72
 
     * @see GalleryModule::isRecommendedDuringInstall
73
 
     */
74
 
    function isRecommendedDuringInstall() {
75
 
        return false;
76
 
    }
77
 
 
78
 
    /**
79
 
     * @see GalleryModule::autoConfigure
80
 
     */
81
 
    function autoConfigure() {
82
 
        /* We don't require any special configuration */
83
 
        return array(GalleryStatus::success(), true);
 
68
        return null;
84
69
    }
85
70
 
86
71
    /**
87
72
     * @see GalleryModule::getSiteAdminViews
88
73
     */
89
74
    function getSiteAdminViews() {
90
 
        return array(GalleryStatus::success(),
 
75
        return array(null,
91
76
                     array(array('name' => $this->translate('Members'),
92
77
                                 'view' => 'members.AdminMembers')));
93
78
    }