mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-09-01 18:48:17 +00:00
Compare commits
No commits in common. "master" and "r0.9.7.2" have entirely different histories.
12
.cil
12
.cil
@ -1,12 +0,0 @@
|
||||
UseGit: 1
|
||||
StatusStrict: 1
|
||||
StatusOpenList: New
|
||||
StatusOpenList: InProgress
|
||||
StatusClosedList: Finished
|
||||
DefaultNewStatus: New
|
||||
LabelStrict: 1
|
||||
LabelAllowedList: Type-Enhancement
|
||||
LabelAllowedList: Type-Defect
|
||||
LabelAllowedList: Priority-High
|
||||
LabelAllowedList: Priority-Medium
|
||||
LabelAllowedList: Priority-Low
|
||||
34
.gitignore
vendored
34
.gitignore
vendored
@ -9,40 +9,8 @@ rscds.bfproject
|
||||
davical.bfproject
|
||||
locale
|
||||
built-docs
|
||||
built-locale
|
||||
built-po
|
||||
.settings
|
||||
*~
|
||||
testing/dumps
|
||||
testing/regression.conf
|
||||
subdav
|
||||
docs/website/api
|
||||
htdocs/api
|
||||
htdocs/jq
|
||||
htdocs/test.php
|
||||
htdocs/testfiles
|
||||
inc/test-RRULE-v2.php
|
||||
perms-perf.base
|
||||
random_crap
|
||||
testing/tests/x-*
|
||||
testing/tests/local
|
||||
testing/timing.stats*
|
||||
testing/report.xml
|
||||
.sync-cache
|
||||
.buildpath
|
||||
.cvsignore
|
||||
.project
|
||||
testing/tests/*/diffs
|
||||
testing/tests/*/results
|
||||
testing/tests/*/initial.dbdump
|
||||
testing/*-dumps
|
||||
testing/*.ics
|
||||
*.swp
|
||||
davical.spec
|
||||
docs/translation.pdf
|
||||
zonedb/tzcode
|
||||
zonedb/tzdata
|
||||
zonedb/vtimezones
|
||||
zonedb/*.tar.gz
|
||||
.idea
|
||||
*.orig
|
||||
zonedb/releases
|
||||
|
||||
180
.gitlab-ci.yml
180
.gitlab-ci.yml
@ -1,180 +0,0 @@
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- testall
|
||||
- testldap
|
||||
- testldapmemcache
|
||||
|
||||
build:
|
||||
stage: build
|
||||
image: debian:unstable
|
||||
script:
|
||||
- apt-get -y update
|
||||
- bash -c 'mkdir -p /usr/share/man/man{0..10}'
|
||||
- apt-get -y install build-essential curl devscripts fakeroot dh-exec jdupes doxygen graphviz php-cli phpunit rst2pdf
|
||||
- mv debian/changelog debian/changelog.old
|
||||
- >
|
||||
cat
|
||||
<(echo "davical ($(cat VERSION)-99~git$(date +"%Y%m%d")-$(git rev-parse --short $CI_COMMIT_SHA)) unstable; urgency=medium")
|
||||
<(echo "")
|
||||
<(echo " * Build on CI")
|
||||
<(echo "")
|
||||
<(echo " -- ${GITLAB_USER_NAME} <${GITLAB_USER_EMAIL}> $(date -R)")
|
||||
<(echo "")
|
||||
debian/changelog.old
|
||||
>debian/changelog
|
||||
- rm debian/changelog.old
|
||||
- curl 'https://gitlab.com/davical-project/awl/-/archive/master/awl-master.tar.gz' | tar zxf -
|
||||
- mv awl-master /usr/share/awl/
|
||||
- debuild -us -uc -b -d
|
||||
- 'mv ../davical_*_all.deb ./davical.deb'
|
||||
artifacts:
|
||||
paths:
|
||||
- '*.deb'
|
||||
|
||||
test:
|
||||
stage: test
|
||||
image: debian:unstable
|
||||
artifacts:
|
||||
paths:
|
||||
- testing/report.xml
|
||||
- apache2_log/*
|
||||
- davical_log/*
|
||||
reports:
|
||||
junit: testing/report.xml
|
||||
when:
|
||||
always
|
||||
script:
|
||||
- testing/gitlab_ci_script.sh
|
||||
- cd testing && su testrunner -c 'IS_CI=yes ALLSUITES="regression-suite binding carddav scheduling webui ischedule" ./run_regressions.sh all x'
|
||||
after_script:
|
||||
- testing/gitlab_ci_after_script.sh build
|
||||
|
||||
|
||||
test_bullseye_carddavclientinterop:
|
||||
stage: testall
|
||||
image: debian:bullseye
|
||||
artifacts:
|
||||
paths:
|
||||
- testing/report.xml
|
||||
- carddavclient-master/testreports/unit/results.html
|
||||
- apache2_log/*
|
||||
- davical_log/*
|
||||
- carddavclient-master/testreports/interop/*
|
||||
reports:
|
||||
junit:
|
||||
- testing/report.xml
|
||||
- carddavclient-master/testreports/unit/results.html
|
||||
when:
|
||||
always
|
||||
script:
|
||||
- testing/gitlab_ci_script.sh interop
|
||||
# Needed to create the regression database. Could be replaced by a basic suite.
|
||||
- cd testing && su testrunner -c 'IS_CI=yes ./run_regressions.sh regression-suite x'
|
||||
- cd ../carddavclient-master && vendor/bin/phpunit -c tests/Interop/phpunit.xml --no-coverage
|
||||
after_script:
|
||||
- testing/gitlab_ci_after_script.sh
|
||||
|
||||
|
||||
build_bullseye_latestphp:
|
||||
stage: testall
|
||||
image: php:apache-bullseye
|
||||
script:
|
||||
- apt-get -y update
|
||||
- bash -c 'mkdir -p /usr/share/man/man{0..10}'
|
||||
- apt-get -y install build-essential devscripts fakeroot dh-exec jdupes doxygen graphviz rst2pdf
|
||||
- mv debian/changelog debian/changelog.old
|
||||
- >
|
||||
cat
|
||||
<(echo "davical ($(cat VERSION)-99~git$(date +"%Y%m%d")-$(git rev-parse --short $CI_COMMIT_SHA)) unstable; urgency=medium")
|
||||
<(echo "")
|
||||
<(echo " * Build on CI")
|
||||
<(echo "")
|
||||
<(echo " -- ${GITLAB_USER_NAME} <${GITLAB_USER_EMAIL}> $(date -R)")
|
||||
<(echo "")
|
||||
debian/changelog.old
|
||||
>debian/changelog
|
||||
- rm debian/changelog.old
|
||||
- curl 'https://gitlab.com/davical-project/awl/-/archive/master/awl-master.tar.gz' | tar zxf -
|
||||
- mv awl-master /usr/share/awl/
|
||||
- curl -o /usr/bin/phpunit -L https://phar.phpunit.de/phpunit-9.phar
|
||||
- chmod +x /usr/bin/phpunit
|
||||
- debuild --prepend-path=/usr/local/bin -us -uc -b -d
|
||||
- 'mv ../davical_*_all.deb ./davical.deb'
|
||||
artifacts:
|
||||
paths:
|
||||
- '*.deb'
|
||||
|
||||
test_bullseye_latestphp:
|
||||
stage: testall
|
||||
image: php:apache-bullseye
|
||||
artifacts:
|
||||
paths:
|
||||
- testing/report.xml
|
||||
- apache2_log/*
|
||||
- davical_log/*
|
||||
reports:
|
||||
junit: testing/report.xml
|
||||
when:
|
||||
always
|
||||
script:
|
||||
- testing/gitlab_ci_script.sh
|
||||
- cd testing && su testrunner -c 'IS_CI=yes ALLSUITES="regression-suite binding carddav scheduling webui ischedule" ./run_regressions.sh all x'
|
||||
after_script:
|
||||
- testing/gitlab_ci_after_script.sh
|
||||
|
||||
test_memcache:
|
||||
stage: testall
|
||||
image: debian:unstable
|
||||
artifacts:
|
||||
paths:
|
||||
- testing/report.xml
|
||||
- apache2_log/*
|
||||
- davical_log/*
|
||||
reports:
|
||||
junit: testing/report.xml
|
||||
when:
|
||||
always
|
||||
script:
|
||||
- testing/gitlab_ci_script.sh memcache
|
||||
- cd testing && su testrunner -c 'IS_CI=yes ALLSUITES="regression-suite binding carddav scheduling webui ischedule" ./run_regressions.sh all x'
|
||||
after_script:
|
||||
- testing/gitlab_ci_after_script.sh
|
||||
|
||||
test_ldap:
|
||||
stage: testldap
|
||||
image: debian:unstable
|
||||
artifacts:
|
||||
paths:
|
||||
- testing/report.xml
|
||||
- apache2_log/*
|
||||
- davical_log/*
|
||||
reports:
|
||||
junit: testing/report.xml
|
||||
when:
|
||||
always
|
||||
script:
|
||||
- testing/gitlab_ci_script.sh ldap
|
||||
- cd testing && su testrunner -c 'IS_CI=yes ALLSUITES="ldap" ./run_regressions.sh all x'
|
||||
after_script:
|
||||
- testing/gitlab_ci_after_script.sh
|
||||
|
||||
# Only test if the memcache and LDAP tests pass
|
||||
test_memcache_and_ldap:
|
||||
stage: testldapmemcache
|
||||
image: debian:unstable
|
||||
artifacts:
|
||||
paths:
|
||||
- testing/report.xml
|
||||
- apache2_log/*
|
||||
- davical_log/*
|
||||
- davical_conf/*
|
||||
reports:
|
||||
junit: testing/report.xml
|
||||
when:
|
||||
always
|
||||
script:
|
||||
- testing/gitlab_ci_script.sh ldap_memcache_auth
|
||||
- cd testing && su testrunner -c 'IS_CI=yes ALLSUITES="ldap ldap_memcache" ./run_regressions.sh all x'
|
||||
after_script:
|
||||
- testing/gitlab_ci_after_script.sh
|
||||
@ -1,8 +0,0 @@
|
||||
[davical.messagespot]
|
||||
file_filter = po/<lang>.po
|
||||
source_file = po/messages.pot
|
||||
source_lang = en
|
||||
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
527
COPYING
527
COPYING
@ -1,17 +1,3 @@
|
||||
In general, DAViCal is licensed under the GPL v2, however some parts
|
||||
of DAViCal inherit licenses from other projects where the source code
|
||||
builds upon the work of others.
|
||||
|
||||
In particular:
|
||||
scripts/po/extract.pl is licensed under the LGPL v2.1
|
||||
inc/check_UTF-8.php is licensed under NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
||||
The following licenses are included in this file:
|
||||
|
||||
- GPL 2.0
|
||||
- LGPL 2.1
|
||||
|
||||
================================================================
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
@ -351,516 +337,3 @@ proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
||||
================================================================
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations
|
||||
below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it
|
||||
becomes a de-facto standard. To achieve this, non-free programs must
|
||||
be allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control
|
||||
compilation and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at least
|
||||
three years, to give the same user the materials specified in
|
||||
Subsection 6a, above, for a charge no more than the cost of
|
||||
performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply, and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License
|
||||
may add an explicit geographical distribution limitation excluding those
|
||||
countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms
|
||||
of the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library.
|
||||
It is safest to attach them to the start of each source file to most
|
||||
effectively convey the exclusion of warranty; and each file should
|
||||
have at least the "copyright" line and a pointer to where the full
|
||||
notice is found.
|
||||
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
your school, if any, to sign a "copyright disclaimer" for the library,
|
||||
if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James
|
||||
Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
================================================================
|
||||
|
||||
83
CREDITS
83
CREDITS
@ -18,85 +18,4 @@ And a big thank you to the translators:
|
||||
|
||||
Many other people have contributed bug reports, fixes and
|
||||
in many small ways. These are acknowledged in the changelog
|
||||
and version control history:
|
||||
|
||||
Aiko Barz <aiko@deepco.de>
|
||||
Andreas Haerter <ah@foundata.com>
|
||||
Andrew McMillan <debian@mcmillan.net.nz>
|
||||
Andrew Ruthven <andrew@etc.gen.nz>
|
||||
Antoine <ahuret@skilld.fr>
|
||||
Athos Ribeiro <athoscribeiro@gmail.com>
|
||||
Aurelien Requiem <aurelien@menfin.net>
|
||||
Benoît Bleuzé <benoit.bleuze@gmail.com>
|
||||
Bill McGonigle <bill-gitlab.com-20170608@bfccomputing.com>
|
||||
Chris S <chris@abacuscc.org>
|
||||
Christian Kier <kier@isip.uni-luebeck.de>
|
||||
Christoph Anton Mitterer <calestyo@scientia.net>
|
||||
CSchulz <christian@schulz.re>
|
||||
Cyprian Guerra <cyprian.guerra@gmail.com>
|
||||
Cyril Giraud <cgiraud@free.fr>
|
||||
Daniel Aleksandersen <code@daniel.priv.no>
|
||||
Danny de Weille <info@hackdefense.com>
|
||||
DAViCal Administrator <davical@fry.dotcal.com>
|
||||
Dávid Takács <david.takacs@cafeopen.eu>
|
||||
Dirk Bauer <dirk.bauer@iserv.eu>
|
||||
Émile Morel <emorel@quarkslab.com>
|
||||
Emmanuel Seyman <eseyman@edd.fr>
|
||||
eppesuig <giuseppe@sguazz.it>
|
||||
Eric Wagner <eric.wagner@htwsaar.de>
|
||||
fbiete@gmail.com <fbiete@gmail.com>
|
||||
Felix Möller <mail@felixmoeller.de>
|
||||
Florian Schlichting <fsfs@debian.org>
|
||||
Francois Marier <francois@debian.org>
|
||||
Francois Perichon <francois.perichon@univ-lille2.fr>
|
||||
Frank Steinberg <steinberg@ibr.cs.tu-bs.de>
|
||||
Henri Sivonen <hsivonen@iki.fi>
|
||||
Jamie McClymont <jamiemcclymont@catalyst.net.nz>
|
||||
Jan Hicken <jan.hicken@posteo.de>
|
||||
Jan Losinski <losinskij@gmail.com>
|
||||
Ján Máté <jan.mate@inf-it.com>
|
||||
Jason Alavaliant <alavaliant@gmail.com>
|
||||
Jean-Baptiste Guerraz <jbguerraz@skilld.fr>
|
||||
Jens Zahner <jens.zahner@servicereisen.de>
|
||||
Jeppe Bob Dyrby <jeppe.dyrby@gmail.com>
|
||||
Jeroen van Disseldorp <jdizzl@xs4all.nl>
|
||||
Jim Fenton <fenton@bluepopcorn.net>
|
||||
Jim Hague <jim.hague@acm.org>
|
||||
Klaus M Pfeiffer <kmp+gitlab@kmp.or.at>
|
||||
lebarjack <lebarjack@agenda.univ-lille2.fr>
|
||||
Leho Kraav <leho@kraav.com>
|
||||
linda.fliss <linda.fliss@iserv.eu>
|
||||
Marc <github@mleuser.de>
|
||||
Masahiro Mikami <ZBN15427@nifty.com>
|
||||
Matthias Althaus <contact@althaus.it>
|
||||
Matthias Beyer <matthias@ib-fb.de>
|
||||
Matthias Mohr <Matthias@Mohrenclan.de>
|
||||
Maxime Delorme <mdelorme@tennaxia.com>
|
||||
Michael Trausch <mike@trausch.us>
|
||||
Milan Crha <mcrha@redhat.com>
|
||||
Milan Medlik <milan@morphoss.com>
|
||||
Niels van Gijzen <n.van.gijzen@gmail.com>
|
||||
Nishanth Aravamudan <nish.aravamudan@canonical.com>
|
||||
Nomad Arton <pch13@myzel.net>
|
||||
Patrick Näf Moser <patrick@moser-naef.ch>
|
||||
Paul Kallnbach <p.kallnbach@gorilla-computing.de>
|
||||
Paul Waite <85040614+paulwaite87@users.noreply.github.com>
|
||||
Paul Willoughby <paulw@nationalfitness.com>
|
||||
Peter Schaefer-Hutter <pschaefer@users.sourceforge.net>
|
||||
Philipp Matthias Hahn <pmhahn@pmhahn.de>
|
||||
Pierre Giraud <pierre.giraud@dalibo.com>
|
||||
Piotr Filip <6465816-piotrfilip@users.noreply.gitlab.com>
|
||||
Raphael Hertzog <debian@mcmillan.net.nz>
|
||||
Rick Verdoes <info@hackdefense.com>
|
||||
Rik Theys <Rik.Theys@esat.kuleuven.be>
|
||||
Rob Ostensen <caveman+davical@caveman.name>
|
||||
ruliane <ruliane+github@ruliane.net>
|
||||
Sarenet S.A.U Egoitz Aurrekoetxea <egoitz@sarenet.es>
|
||||
Scott Balneaves <sbalneav@alburg.net>
|
||||
Scott Savarese <root@infra1.scottsavarese.com>
|
||||
Stonewall Jackson <stonewall@sacredheartsc.com>
|
||||
Till Schäfer <till2.schaefer@tu-dortmund.de>
|
||||
Tobias Brox <tobias@redpill-linpro.com>
|
||||
Vincent Van Houtte <vvh@synergylaw.be>
|
||||
wmbr <w-m-b-r@t-online.de>
|
||||
Wolfgang Herget <wolfgang@r007.de>
|
||||
and version control history.
|
||||
|
||||
35
INSTALL
35
INSTALL
@ -14,22 +14,11 @@ DAViCal and all the dependencies.
|
||||
Skip to the "Database Setup" part if you have done that already.
|
||||
|
||||
|
||||
Gentoo Users
|
||||
------------
|
||||
|
||||
DAVical is in the Sunrise overlay. You will have to add this overlay,
|
||||
following the instructions on https://overlays.gentoo.org/proj/sunrise.
|
||||
|
||||
You can then use emerge to install DAVical and its dependencies.
|
||||
|
||||
emerge davical
|
||||
|
||||
|
||||
Other Linux Users
|
||||
-----------------
|
||||
|
||||
You will need to download the latest versions of the davical and awl packages
|
||||
from the DAViCal site. See https://www.davical.org/ for more information.
|
||||
from the sourceforge download page for davical (the sf.net project is 'rscds').
|
||||
|
||||
You will need to untar these. Preferably you will untar them from within
|
||||
the "/usr/share" directory and everything will be in it's expected location
|
||||
@ -62,10 +51,7 @@ Getting Help
|
||||
The best place to get help is on IRC. The official DAViCal
|
||||
IRC channel is #davical on irc.oftc.net
|
||||
|
||||
The starting point for further help should be the DAViCal website
|
||||
at https://www.davical.org/ and from there you might visit the wiki
|
||||
which contains a fair amount of information about configuring
|
||||
DAViCal in a variety of different circumstances.
|
||||
There is also a mailing list, and forums on Sourceforge.
|
||||
|
||||
|
||||
Pre-requisites
|
||||
@ -78,8 +64,8 @@ a number of years.
|
||||
|
||||
The following other software is also needed:
|
||||
Apache: 1.3.x or 2.x.x
|
||||
PHP: 5.4 or greater (along with the PDO and PostgreSQL extensions)
|
||||
PostgreSQL: 8.2 or greater
|
||||
PHP: 5.0 or greater
|
||||
PostgreSQL: 8.1 or greater
|
||||
|
||||
The PostgreSQL database may be installed on a server other
|
||||
than the web server, and that kind of situation is recommended
|
||||
@ -93,18 +79,7 @@ other application I will happily accept patches to make it do
|
||||
that, but I am pretty sure it won't work that way out of the
|
||||
box.
|
||||
|
||||
Several helper programs are needed to setup and upgrade davical:
|
||||
Perl with DBI and DBD-Pg
|
||||
Debian: aptitude install libdbi-perl libdbd-pg-perl
|
||||
Gentoo: emerge dev-perl/DBI dev-perl/DBD-Pg
|
||||
|
||||
Yaml
|
||||
Debian: aptitude install libyaml-perl
|
||||
Gentoo: emerge dev-perl/yaml
|
||||
|
||||
pwgen (not mandatory)
|
||||
Debian: aptitude install pwgen
|
||||
Gentoo: app-admin/pwgen
|
||||
|
||||
Database Setup
|
||||
==============
|
||||
@ -224,7 +199,7 @@ to use this, and the docs for that are elsewhere.
|
||||
|
||||
See:
|
||||
|
||||
https://wiki.davical.org/
|
||||
http://wiki.davical.org/
|
||||
|
||||
Which is the place where documentation will generally be kept up to
|
||||
date the most.
|
||||
|
||||
89
Makefile
89
Makefile
@ -1,88 +1,41 @@
|
||||
#!/usr/bin/make -f
|
||||
#
|
||||
#
|
||||
|
||||
package := davical
|
||||
majorversion := $(shell sed -n 's:\([0-9\.]*\)[-a-f0-9-]*:\1:p' VERSION)
|
||||
gitrev := 0
|
||||
version := $(majorversion)
|
||||
issnapshot := 0
|
||||
snapshot : gitrev = $(shell git rev-parse --short HEAD)
|
||||
snapshot : version = $(majorversion)-git$(gitrev)
|
||||
snapshot : issnapshot = 1
|
||||
package=davical
|
||||
version=$(shell cat VERSION)
|
||||
|
||||
.PHONY: nodocs
|
||||
nodocs: htdocs/always.php built-locale
|
||||
all: inc/always.php built-docs built-po
|
||||
|
||||
.PHONY: all
|
||||
all: htdocs/always.php built-docs built-locale
|
||||
built-docs: docs/api/phpdoc.ini htdocs/*.php inc/*.php
|
||||
phpdoc -c docs/api/phpdoc.ini || echo "NOTICE: Failed to build optional API docs"
|
||||
touch built-docs
|
||||
|
||||
built-docs: docs/phpdoc.ini docs/Doxyfile inc/*.php docs/translation.rst
|
||||
doxygen docs/Doxyfile || apigen generate --quiet --title=DAViCal --todo --tree --deprecated -s inc --exclude caldav-client.php -d docs/api || phpdoc -c docs/phpdoc.ini || echo "NOTICE: Failed to build API docs"
|
||||
rst2pdf docs/translation.rst || echo "NOTICE: Failed to build ReST docs"
|
||||
touch $@
|
||||
|
||||
built-locale: po/*.po
|
||||
for LOCALE in `ls po/*.po | cut -f2 -d/ | cut -f1 -d.` ; do \
|
||||
[ "$${LOCALE}" = "en" ] && continue; \
|
||||
mkdir -p locale/$${LOCALE}/LC_MESSAGES; \
|
||||
msgfmt po/$${LOCALE}.po -o locale/$${LOCALE}/LC_MESSAGES/davical.mo; \
|
||||
done
|
||||
touch $@
|
||||
built-po: built-docs inc/always.php scripts/po/rebuild-translations.sh scripts/po/extract.pl po/*.po
|
||||
scripts/po/rebuild-translations.sh
|
||||
touch built-po
|
||||
|
||||
#
|
||||
# Insert the current version number into always.php
|
||||
#
|
||||
htdocs/always.php: inc/always.php.in scripts/build-always.sh VERSION
|
||||
scripts/build-always.sh <$< >$@
|
||||
|
||||
#
|
||||
# recreate translations
|
||||
#
|
||||
.PHONY: translations
|
||||
translations:
|
||||
scripts/po/rebuild-translations.sh
|
||||
inc/always.php: VERSION inc/always.php.in
|
||||
sed -e "/^ *.c->version_string *= *'[^']*' *;/ s/^ *.c->version_string *= *'[^']*' *;/\$$c->version_string = '`head -n1 VERSION`';/" <inc/always.php.in >inc/always.php
|
||||
|
||||
#
|
||||
# Build a release .tar.gz file in the directory above us
|
||||
#
|
||||
.PHONY: release
|
||||
release: built-docs VERSION
|
||||
release: built-docs
|
||||
-ln -s . $(package)-$(version)
|
||||
sed 's:@@VERSION@@:$(majorversion):' davical.spec.in | \
|
||||
sed 's:@@ISSNAPSHOT@@:$(issnapshot):' | \
|
||||
sed 's:@@GITREV@@:$(gitrev):' > davical.spec
|
||||
echo "git ls-files |grep -v '.git'|sed -e s:^:$(package)-$(version)/:"
|
||||
tar czf ../$(package)-$(version).tar.gz \
|
||||
--no-recursion --dereference $(package)-$(version) \
|
||||
$(shell git ls-files |grep -v '.git'|sed -e s:^:$(package)-$(version)/:) \
|
||||
$(shell find $(package)-$(version)/docs/api/ ! -name "phpdoc.ini" ) \
|
||||
davical.spec
|
||||
$(shell find $(package)-$(version)/docs/api/ ! -name "phpdoc.ini" )
|
||||
rm $(package)-$(version)
|
||||
|
||||
.PHONY: snapshot
|
||||
snapshot: release
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
@for PHP in htdocs/*.php inc/*.php; do php -l $${PHP} | grep -v 'No syntax errors detected' >> test-syntax; done; \
|
||||
if [ -s test-syntax ]; then \
|
||||
cat test-syntax >&2; \
|
||||
rm test-syntax; \
|
||||
exit 1; \
|
||||
else \
|
||||
rm test-syntax; \
|
||||
echo "OK (Syntax checked)"; \
|
||||
exit 0; \
|
||||
fi
|
||||
# run phpunit tests
|
||||
phpunit --do-not-cache-result testing/phpunit
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
rm -f built-docs built-locale
|
||||
rm -rf docs/api locale
|
||||
-rm -rf testing/tests/*/diffs testing/tests/*/results testing/tests/*/initial.dbdump
|
||||
rm -f built-docs built-po
|
||||
-find . -name "*~" -delete
|
||||
rm -f docs/translation.pdf
|
||||
rm -f davical.spec
|
||||
|
||||
clean-all: clean
|
||||
-find docs/api/* ! -name "phpdoc.ini" ! -name ".gitignore" -delete
|
||||
|
||||
.PHONY: all clean release
|
||||
|
||||
13
README
13
README
@ -1,20 +1,15 @@
|
||||
DAViCal CalDAV Server by Andrew McMillan.
|
||||
|
||||
For documentation you are best advised to visit the DAViCal
|
||||
website at https://www.davical.org/ or search our general mailing
|
||||
list at https://lists.sourceforge.net/mailman/listinfo/davical-general
|
||||
|
||||
There's lots of useful information at https://wiki.davical.org/ as well,
|
||||
and if you want access to update that contact us on IRC (#davical on OFTC,
|
||||
be patient and stick around for a while) or send an e-mail
|
||||
to <wiki-access@davical.org>.
|
||||
For documentation you are best advised to visit the sourceforge pages
|
||||
or to start searching from http://davical.org/ and see where you end
|
||||
up.
|
||||
|
||||
Good luck!
|
||||
|
||||
Andrew McMillan
|
||||
|
||||
-----------------------------------------------
|
||||
Copyright: 2006-2011 Andrew McMillan <andrew@mcmillan.net.nz>
|
||||
Copyright: 2006-2008 Andrew McMillan <andrew@catalyst.net.nz>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
14
TODO
14
TODO
@ -3,17 +3,13 @@ Desirable
|
||||
- more translations of the administration interface
|
||||
- translations of the website.
|
||||
- the ability to see a better list of event data in the admin interface
|
||||
- allow a specific CalDAV access permission to delegate free/busy viewability.
|
||||
- rename everything to "DAViCal"
|
||||
|
||||
Important
|
||||
- Add ability to delete users & collections
|
||||
- Expose the Admin option to maintenance by admins.
|
||||
- Implement support for the ACL method
|
||||
- Implement support for updating the acl via PROPPATCH
|
||||
- Implement the DAV::acl-principal-prop-set report from RFC3744
|
||||
- Implement the DAV::principal-match report from RFC3744
|
||||
- Implement the DAV::principal-search-property-set report from RFC3744
|
||||
- Fix the relationships code so relationships are controlled by the person
|
||||
affected (or the admin).
|
||||
- Implement draft-desruisseaux-caldav-sched specifications.
|
||||
|
||||
Minor
|
||||
- Check for read-acl privilege to PROPFIND acl
|
||||
- Check for read-current-user-privilege-set to PROPFIND current user privs.
|
||||
- Remove the dependency on the 'general' user from the testing scripts.
|
||||
|
||||
@ -1,56 +0,0 @@
|
||||
# DAViCal Calendar Server
|
||||
|
||||
Alias /davical /usr/share/davical/htdocs
|
||||
|
||||
<Directory /usr/share/davical/htdocs>
|
||||
DirectoryIndex index.php
|
||||
AllowOverride None
|
||||
# for Apache from 2.4 use
|
||||
Require all granted
|
||||
# for Apache before 2.4 use
|
||||
#Order allow,deny
|
||||
#Allow from all
|
||||
|
||||
# These are usually not necessary (set correctly by default)
|
||||
#AcceptPathInfo On
|
||||
#php_value include_path /usr/share/php/awl/inc
|
||||
#php_value magic_quotes_gpc 0
|
||||
#php_value register_globals 0
|
||||
#php_value error_reporting "E_ALL & ~E_NOTICE"
|
||||
#php_value default_charset "utf-8"
|
||||
|
||||
# Some people want this. YMMV.
|
||||
#php_admin_value open_basedir /usr/share/awl/inc/:/usr/share/davical/:/etc/davical/
|
||||
|
||||
# All content for our UI should be served locally.
|
||||
<FilesMatch "(admin|help|iSchedule|index|metrics|public|setup|tools|upgrade).php">
|
||||
Header set Content-Security-Policy "default-src 'none'; img-src 'self' data:; media-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline' data:; font-src 'self' data:; object-src 'self'; base-uri 'self'; connect-src 'self'; form-action 'self'; frame-ancestors 'self'"
|
||||
</FilesMatch>
|
||||
</Directory>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
|
||||
# PT is important if you are using an alias, it implies L
|
||||
# Redirect /.well-known URLs
|
||||
RewriteRule ^/\.well-known/(.*)$ /davical/caldav.php/.well-known/$1 [NC,PT]
|
||||
# Optionally: redirect /principals/users/ as well
|
||||
RewriteRule ^/principals/users/(.*)$ /davical/caldav.php/$1 [NC,PT]
|
||||
RewriteRule ^/principals/resources/(.*)$ /davical/caldav.php/$1 [NC,PT]
|
||||
RewriteRule ^/calendars/__uids__/(.*)$ /davical/caldav.php/$1 [NC,PT]
|
||||
RewriteRule ^/addressbooks/__uids__/(.*)$ /davical/caldav.php/$1 [NC,PT]
|
||||
|
||||
# Optionally: Put DAViCal in the root
|
||||
# NOTE: this will break other applications that rely on mod_rewrite!
|
||||
#
|
||||
# Not if it's the root URL. You might want to comment this out if you
|
||||
# want to use an explicit /index.php for getting to the admin pages.
|
||||
#RewriteCond %{REQUEST_URI} !^/$
|
||||
#RewriteCond %{REQUEST_URI} !^/davical/$
|
||||
#
|
||||
# Not if it explicitly specifies a .php program, html page, stylesheet or image
|
||||
#RewriteCond %{REQUEST_URI} !\.(php|html|css|js|png|gif|jpg|ico)
|
||||
#
|
||||
# Everything else gets rewritten to /caldav.php/...
|
||||
#RewriteRule ^(.*)$ /davical/caldav.php$1 [NC,L]
|
||||
</IfModule>
|
||||
@ -1,34 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* The configuration settings detailed here should probably not appear in most
|
||||
* people's configuration files, but they can be useful to assist with debugging
|
||||
* problems. When reporting an issue in the bug tracker or on the mailing list,
|
||||
* and you need other people's help to understand what's going wrong, please
|
||||
* include a debug log of the failing request with $c->dbg["ALL"] set, possibly
|
||||
* also using $c->dbg_filter on busy servers.
|
||||
* most people's configuration files, but they can be useful to have available
|
||||
* to assist with debugging problems.
|
||||
*/
|
||||
|
||||
/**
|
||||
* if this is set then any e-mail that would normally be sent by DAViCal will be
|
||||
* sent to this e-mail address for debugging.
|
||||
*/
|
||||
//$c->debug_email = 'davical@example.com'
|
||||
//$c->debug_email
|
||||
|
||||
|
||||
/**
|
||||
* If you want to see debug messages in the PHP error log you can set to 1 one
|
||||
* or several of these variables (there are many more).
|
||||
* If you want to see every possible log message then $c->dbg["ALL"] can be set,
|
||||
* and then individual components can be set to 0 to selectively ignore them.
|
||||
* If you want to debug you have to set to 1 one of this variable
|
||||
* and then you can look at the error log of PHP for example :
|
||||
* $c->dbg["ALL"] = 1;
|
||||
* and then tail -f /var/log/apache2/error_log (or wherever PHP errors are logged).
|
||||
*
|
||||
* To follow the log, try
|
||||
* tail -f /var/log/apache2/error_log (or wherever your PHP errors are logged)
|
||||
*
|
||||
* To add your own debug logging using a printf syntax, use
|
||||
* dbg_error_log( 'MyComponent', 'At this point, first is %s and second is %s', $first_string, $second_string );
|
||||
* in the code a line like this:
|
||||
* dbg_error_log( "Login", "blabla %s blalba %s",first_string, second_string );
|
||||
* will produce in apache error log and if $c->dbg['Login'] ==1 : "blabla first_string blalba second_string"
|
||||
* using format rules as for printf and related functions.
|
||||
*/
|
||||
// $c->dbg["ALL"] = 1;
|
||||
// $c->dbg['i18n'] = 0;
|
||||
// $c->dbg["request"] = 1; // The request headers & content
|
||||
// $c->dbg['response'] = 1; // The response headers & content
|
||||
// $c->dbg["component"] = 1;
|
||||
@ -48,19 +43,6 @@
|
||||
// $c->dbg['vevent'] = 1;
|
||||
// $c->dbg['rrule'] = 1;
|
||||
|
||||
|
||||
/**
|
||||
* Even on a moderately busy server, turning on debug logging for everyone can
|
||||
* produce a lot of output in a short time that makes it hard to find the
|
||||
* relevant lines. Debug filtering limits logging to certain IP addresses or
|
||||
* usernames. (config values are arrays)
|
||||
*/
|
||||
// $c->dbg_filter["remoteIP"][] = '192.168.1.20';
|
||||
// $c->dbg_filter["remoteIP"][] = '192.168.1.21';
|
||||
// $c->dbg_filter["authenticatedUser"][] = 'peter';
|
||||
// $c->dbg_filter["authenticatedUser"][] = 'john';
|
||||
|
||||
|
||||
/**
|
||||
* default is 'davical' used to prefix debugging messages but will only need to change
|
||||
* if you are running multiple DAViCal servers logging into the same place.
|
||||
|
||||
@ -8,9 +8,6 @@
|
||||
#
|
||||
# This file should be called 'administration.yml' in the config directory.
|
||||
#
|
||||
# Make sure field-separating whitespace does not contain any ^I (tab)
|
||||
# characters. The YAML parser will trip over them ungracefully.
|
||||
#
|
||||
|
||||
##
|
||||
## The database username for connecting with sufficient rights to create
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -9,11 +9,11 @@
|
||||
|
||||
/**
|
||||
* Set automatically according to $_SERVER['SCRIPT_NAME']
|
||||
* It will be used to set the address of each tab of the web interface,
|
||||
* It will be used to set the adress of each tab of the web interface,
|
||||
* to set the relative address of images and so forth. You probably should
|
||||
* not change it unless you know why you want to.
|
||||
*/
|
||||
// $c->base_url = 'http://example.com/davical';
|
||||
// $c->base_url
|
||||
|
||||
/**
|
||||
* Automatically set according to $_SERVER['DOCUMENT_ROOT'], but could be overridden
|
||||
@ -24,29 +24,16 @@
|
||||
/**
|
||||
* Used to set the timeouts applying to the LOCK method.
|
||||
*/
|
||||
// $c->default_lock_timeout = 900;
|
||||
// $c->maximum_lock_timeout = 8640000;
|
||||
// $c->default_lock_timeout;
|
||||
// $c->maximum_lock_timeout;
|
||||
|
||||
/**
|
||||
* If set, DAViCal will store each unique time zone used in any calendar to speed
|
||||
* default = true;
|
||||
* If set, RSCDS will store each unique time zone used in any calendar to speed
|
||||
* future timezone interpretation.
|
||||
* Default = true;
|
||||
*/
|
||||
// $c->save_time_zone_defs = true;
|
||||
// $c->save_time_zone_defs;
|
||||
|
||||
/**
|
||||
* If there is some timezone which shows up with a name that is not understood
|
||||
* by DAViCal, you can add a translation for it into this list
|
||||
*/
|
||||
// $c->timezone_translations = array( 'Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London' => 'Europe/London' );
|
||||
|
||||
/**
|
||||
* It is possible that you have installed DAViCal in a non-standard manner, and
|
||||
* DAViCal can't find it's locale files, or you want it to use some different
|
||||
* ones that you're writing to submit to the developers (yes please!).
|
||||
* Default: ../locale
|
||||
*/
|
||||
// $c->locale_path = '/path/to/davical/locale/files';
|
||||
|
||||
/**
|
||||
* Internal variable used to contain arrays of stylesheets or javascripts
|
||||
@ -57,33 +44,6 @@
|
||||
// $c->scripts = array();
|
||||
// $c->stylesheets = array();
|
||||
|
||||
/**
|
||||
* Where the up.gif and down.gif are located
|
||||
* */
|
||||
// $c->images = $c->base_url . '/images';
|
||||
|
||||
/**
|
||||
* PostgreSQL supports multiple namespaces (schemas) within a single database,
|
||||
* allowing you to have (e.g.) two tables with the same name. This setting
|
||||
* allows you to control the search path so that you can have the DAViCal
|
||||
* tables in a different schema.
|
||||
* Note that there is no support in DAViCal for putting the tables into a
|
||||
* non-default schema in the first place.
|
||||
*/
|
||||
// $c->db_schema = 'schema1,schema2';
|
||||
|
||||
/**
|
||||
* Whether to replace query parameters with appropriately escaped substitutions
|
||||
* in AWL, or leave it to the database to "prepare" the query.
|
||||
* Default: true (do it in AWL)
|
||||
*/
|
||||
// $c->expand_pdo_parameters = true;
|
||||
|
||||
/**
|
||||
* The recursion depth when expanding group memberships to resolve effective
|
||||
* permissions. Default: 2
|
||||
*/
|
||||
// $c->permission_scan_depth = 2;
|
||||
|
||||
/**
|
||||
* Internal variable to display page's title
|
||||
@ -91,7 +51,8 @@
|
||||
*/
|
||||
// Usually internally assigned, but you may want to set it to something meaningful
|
||||
// if you are writing your own pages within the admin interface.
|
||||
// $c->page_title = 'DAViCal CalDAV Server';
|
||||
// $c->page_title;
|
||||
|
||||
|
||||
/**
|
||||
* Internal array variable to hold error messages to be displayed on top of page
|
||||
@ -99,13 +60,34 @@
|
||||
*/
|
||||
// Usually internally assigned, but you may want to append meaningful messages
|
||||
// to this array if you are writing your own pages within the admin interface.
|
||||
//$c->messages[] = 'Hello World!';
|
||||
//$c->messages;
|
||||
|
||||
|
||||
/**
|
||||
* These 6 next properties are extracted automatically from the Changelog
|
||||
* used to give informtion for debugging
|
||||
*/
|
||||
// Internally assigned
|
||||
// $c->code_debian,
|
||||
// $c->code_major,
|
||||
// $c->code_minor,
|
||||
// $c->code_patch,
|
||||
// $c->code_pkgver,
|
||||
// $c->code_version,
|
||||
/**
|
||||
* Used internally to know the revision of the database schema and display
|
||||
* in HTTP error anwser in the header
|
||||
*/
|
||||
// Internally assigned
|
||||
// $c->schema_major
|
||||
// $c->schema_minor
|
||||
// $c->schema_patch
|
||||
// $c->schema_version
|
||||
|
||||
/**
|
||||
* This property is used to enforce regular ordering of query results so
|
||||
* that the regression test output is deterministically ordered. In
|
||||
* real life this is not important, and it is a performance hit, so it
|
||||
* should not usually be enabled anywhere else.
|
||||
*/
|
||||
// $c->strict_result_ordering = false;
|
||||
// $c->strict_result_ordering = boolean;
|
||||
|
||||
@ -1,64 +0,0 @@
|
||||
%define issnapshot @@ISSNAPSHOT@@
|
||||
%define gitrev @@GITREV@@
|
||||
|
||||
%if 0%{issnapshot}
|
||||
%define snapshotversionstring .%{gitrev}git
|
||||
%define snapshotpackagestring -git%{gitrev}
|
||||
%endif
|
||||
|
||||
Name: davical
|
||||
Summary: CalDAV Server
|
||||
Version: @@VERSION@@
|
||||
Release: 1%{?snapshotversionstring}%{?dist}
|
||||
Group: System Environment/Daemons
|
||||
License: GPL and LGPL
|
||||
Source: http://debian.mcmillan.net.nz/packages/davical/davical-%{version}%{?snapshotpackagestring}.tar.gz
|
||||
|
||||
URL: http://davical.org/
|
||||
BuildArch: noarch
|
||||
BuildRequires: php-awl
|
||||
BuildRequires: sed
|
||||
Requires: php php-gettext php-pgsql
|
||||
Requires: postgresql postgresql-server
|
||||
Requires: php-awl
|
||||
Requires: perl-YAML
|
||||
Requires: perl-DBD-Pg
|
||||
|
||||
%description
|
||||
The DAViCal CalDAV Server is designed to trivially store
|
||||
CalDAV calendars, such as those from Evolution, Sunbird/Lightning,
|
||||
Mulberry, iCal, iPhone or SOHO Organizer, in a central location,
|
||||
providing shared calendars, free/busy publication and a basic
|
||||
administration interface.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n "davical-%{version}%{?snapshotpackagestring}"
|
||||
|
||||
%build
|
||||
sed -i "s#set_include_path('../inc:../htdocs:/usr/share/awl/inc');#set_include_path('/usr/share/davical/inc:/usr/share/davical/htdocs:/usr/share/php/awl/inc');#" scripts/sync-remote-caldav.php
|
||||
sed -i 's:../../awl/inc:%{_datadir}/php/awl/inc:' htdocs/always.php
|
||||
sed -i 's:AWL_LOCATION="../awl":AWL_LOCATION="%{_datadir}/php/awl":' scripts/po/rebuild-translations.sh
|
||||
make
|
||||
|
||||
%install
|
||||
install -D -p -m 755 scripts/sync-remote-caldav.php %{buildroot}/%{_bindir}/sync-remote-caldav
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/%{name}
|
||||
cp -a dba htdocs locale inc %{buildroot}/%{_datadir}/%{name}
|
||||
|
||||
install -D -p -m 644 config/example-config.php %{buildroot}/%{_sysconfdir}/%{name}/config.php
|
||||
|
||||
install -D -p -m 644 config/apache-davical.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/davical.conf
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_datadir}/%{name}/*
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/config.php
|
||||
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
|
||||
%{_bindir}/sync-remote-caldav
|
||||
%doc README ChangeLog
|
||||
|
||||
%changelog
|
||||
* Tue Feb 22 2011 Felix Möller <mail@felixmoeller.de> - 0.9.9.4
|
||||
- Initial Version of DAViCal package
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# This file is used by update-davical-database to set the correct
|
||||
# This file is used by update-rscds-database to set the correct
|
||||
# permissions for the application user. In newer installations
|
||||
# the application user will probably be called app_davical (and
|
||||
# the administrative user will be called dba_davical) but in
|
||||
@ -30,24 +30,11 @@ GRANT SELECT,INSERT,UPDATE,DELETE
|
||||
ON role_member
|
||||
ON session
|
||||
ON tmp_password
|
||||
ON dav_resource
|
||||
ON group_member
|
||||
ON principal
|
||||
ON privilege
|
||||
ON relationship_type
|
||||
ON sync_tokens
|
||||
ON sync_changes
|
||||
ON grants
|
||||
ON dav_principal
|
||||
ON access_ticket
|
||||
ON dav_binding
|
||||
ON calendar_alarm
|
||||
ON calendar_attendee
|
||||
ON addressbook_resource
|
||||
ON addressbook_address_adr
|
||||
ON addressbook_address_tel
|
||||
ON addressbook_address_email
|
||||
ON timezones
|
||||
ON tz_aliases
|
||||
ON tz_localnames
|
||||
|
||||
GRANT SELECT,UPDATE
|
||||
ON relationship_type_rt_id_seq
|
||||
@ -55,32 +42,16 @@ GRANT SELECT,UPDATE
|
||||
ON usr_user_no_seq
|
||||
ON roles_role_no_seq
|
||||
ON session_session_id_seq
|
||||
ON dav_resource_type_resource_type_id_seq
|
||||
ON principal_principal_id_seq
|
||||
ON principal_type_principal_type_id_seq
|
||||
ON sync_tokens_sync_token_seq
|
||||
ON timezones_our_tzno_seq
|
||||
ON metrics_count_acl
|
||||
ON metrics_count_bind
|
||||
ON metrics_count_delete
|
||||
ON metrics_count_delticket
|
||||
ON metrics_count_get
|
||||
ON metrics_count_head
|
||||
ON metrics_count_lock
|
||||
ON metrics_count_mkcalendar
|
||||
ON metrics_count_mkcol
|
||||
ON metrics_count_mkticket
|
||||
ON metrics_count_move
|
||||
ON metrics_count_options
|
||||
ON metrics_count_post
|
||||
ON metrics_count_propfind
|
||||
ON metrics_count_proppatch
|
||||
ON metrics_count_put
|
||||
ON metrics_count_report
|
||||
ON metrics_count_unknown
|
||||
ON metrics_count_unlock
|
||||
|
||||
GRANT SELECT,INSERT
|
||||
ON time_zone
|
||||
|
||||
GRANT SELECT
|
||||
ON supported_locales
|
||||
ON awl_db_revision
|
||||
ON dav_resource_type
|
||||
ON principal_type
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
-- Some base data to prime the database...
|
||||
-- Some sample data to prime the database...
|
||||
|
||||
-- FIXME: Only insert the rows if they are not there already.
|
||||
INSERT INTO roles ( role_no, role_name ) VALUES( 1, 'Admin');
|
||||
@ -9,34 +9,25 @@ INSERT INTO roles ( role_no, role_name ) VALUES( 4, 'Resource');
|
||||
-- Set the insert sequence to the next number, with a minimum of 10
|
||||
SELECT setval('roles_role_no_seq', (SELECT 10 UNION SELECT role_no FROM roles ORDER BY 1 DESC LIMIT 1) );
|
||||
|
||||
INSERT INTO principal_type (principal_type_id, principal_type_desc) VALUES( 1, 'Person' );
|
||||
INSERT INTO principal_type (principal_type_id, principal_type_desc) VALUES( 2, 'Resource' );
|
||||
INSERT INTO principal_type (principal_type_id, principal_type_desc) VALUES( 3, 'Group' );
|
||||
|
||||
-- Create the administrator record.
|
||||
INSERT INTO usr ( user_no, active, email_ok, updated, username, password, fullname, email )
|
||||
VALUES ( 1, TRUE, current_date, current_date, 'admin', '**nimda', 'DAViCal Administrator', 'calendars@example.net' );
|
||||
INSERT INTO principal ( principal_id, type_id, user_no, displayname, default_privileges )
|
||||
VALUES ( 1, 1, 1, 'DAViCal Administrator', 0::BIT(24) );
|
||||
VALUES ( 1, TRUE, current_date, current_date, 'admin', '**nimda', 'Calendar Administrator', 'calendars@example.net' );
|
||||
|
||||
INSERT INTO role_member (user_no, role_no) VALUES(1, 1);
|
||||
|
||||
-- Set the insert sequence to the next number, with a minimum of 1000
|
||||
SELECT setval('usr_user_no_seq', (SELECT 1000 UNION SELECT user_no FROM usr ORDER BY 1 DESC LIMIT 1) );
|
||||
|
||||
-- Set the usr & dav_id sequence to the next number, with a minimum of 1000
|
||||
SELECT setval('usr_user_no_seq', 1000 );
|
||||
SELECT setval('dav_id_seq', 1000 );
|
||||
INSERT INTO relationship_type ( rt_id, rt_name, confers )
|
||||
VALUES( 1, 'Administers', 'A' );
|
||||
|
||||
INSERT INTO relationship_type ( rt_id, rt_name, confers, bit_confers )
|
||||
VALUES( 1, 'Administers', 'A', privilege_to_bits('DAV::all') );
|
||||
INSERT INTO relationship_type ( rt_id, rt_name, confers )
|
||||
VALUES( 2, 'Can read/write to', 'RW' );
|
||||
|
||||
INSERT INTO relationship_type ( rt_id, rt_name, confers, bit_confers )
|
||||
VALUES( 2, 'Can read/write to', 'RW', privilege_to_bits( ARRAY['DAV::read','DAV::write']) );
|
||||
INSERT INTO relationship_type ( rt_id, rt_name, confers )
|
||||
VALUES( 3, 'Can read from', 'R' );
|
||||
|
||||
INSERT INTO relationship_type ( rt_id, rt_name, confers, bit_confers )
|
||||
VALUES( 3, 'Can read from', 'R', privilege_to_bits( 'DAV::read') );
|
||||
|
||||
INSERT INTO relationship_type ( rt_id, rt_name, confers, bit_confers )
|
||||
VALUES( 4, 'Can see free/busy time of', 'F', privilege_to_bits( 'caldav:read-free-busy') );
|
||||
INSERT INTO relationship_type ( rt_id, rt_name, confers )
|
||||
VALUES( 4, 'Can see free/busy time of', 'F' );
|
||||
|
||||
|
||||
-- Set the insert sequence to the next number, with a minimum of 1000
|
||||
|
||||
@ -1,371 +0,0 @@
|
||||
CREATE or REPLACE FUNCTION legacy_privilege_to_bits( TEXT ) RETURNS BIT(24) AS $$
|
||||
DECLARE
|
||||
in_priv ALIAS FOR $1;
|
||||
out_bits BIT(24);
|
||||
BEGIN
|
||||
out_bits := 0::BIT(24);
|
||||
IF in_priv ~* 'A' THEN
|
||||
out_bits = ~ out_bits;
|
||||
RETURN out_bits;
|
||||
END IF;
|
||||
|
||||
-- The CALDAV:read-free-busy privilege MUST be aggregated in the DAV:read privilege.
|
||||
-- 1 DAV:read
|
||||
-- 512 CalDAV:read-free-busy
|
||||
-- 4096 CALDAV:schedule-query-freebusy
|
||||
IF in_priv ~* 'R' THEN
|
||||
out_bits := out_bits | 4609::BIT(24);
|
||||
END IF;
|
||||
|
||||
-- DAV:write => DAV:write MUST contain DAV:bind, DAV:unbind, DAV:write-properties and DAV:write-content
|
||||
-- 2 DAV:write-properties
|
||||
-- 4 DAV:write-content
|
||||
-- 64 DAV:bind
|
||||
-- 128 DAV:unbind
|
||||
IF in_priv ~* 'W' THEN
|
||||
out_bits := out_bits | 198::BIT(24);
|
||||
END IF;
|
||||
|
||||
-- 64 DAV:bind
|
||||
IF in_priv ~* 'B' THEN
|
||||
out_bits := out_bits | 64::BIT(24);
|
||||
END IF;
|
||||
|
||||
-- 128 DAV:unbind
|
||||
IF in_priv ~* 'U' THEN
|
||||
out_bits := out_bits | 128::BIT(24);
|
||||
END IF;
|
||||
|
||||
-- 512 CalDAV:read-free-busy
|
||||
-- 4096 CALDAV:schedule-query-freebusy
|
||||
IF in_priv ~* 'F' THEN
|
||||
out_bits := out_bits | 4608::BIT(24);
|
||||
END IF;
|
||||
|
||||
RETURN out_bits;
|
||||
END
|
||||
$$
|
||||
LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
-- This legacy conversion function will eventually be removed, once all logic
|
||||
-- has been converted to use bitmaps, or to use the bits_to_priv() output.
|
||||
--
|
||||
-- NOTE: Round-trip through this and then back through legacy_privilege_to_bits
|
||||
-- function is lossy! Through legacy_privilege_to_bits() and back through
|
||||
-- this one is not.
|
||||
--
|
||||
CREATE or REPLACE FUNCTION bits_to_legacy_privilege( BIT(24) ) RETURNS TEXT AS $$
|
||||
DECLARE
|
||||
in_bits ALIAS FOR $1;
|
||||
out_priv TEXT;
|
||||
BEGIN
|
||||
out_priv := '';
|
||||
IF in_bits = (~ 0::BIT(24)) THEN
|
||||
out_priv = 'A';
|
||||
RETURN out_priv;
|
||||
END IF;
|
||||
|
||||
-- The CALDAV:read-free-busy privilege MUST be aggregated in the DAV:read privilege.
|
||||
-- 1 DAV:read
|
||||
-- 512 CalDAV:read-free-busy
|
||||
-- 4096 CALDAV:schedule-query-freebusy
|
||||
IF (in_bits & 4609::BIT(24)) != 0::BIT(24) THEN
|
||||
IF (in_bits & 1::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := 'R';
|
||||
ELSE
|
||||
out_priv := 'F';
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
-- DAV:write => DAV:write MUST contain DAV:bind, DAV:unbind, DAV:write-properties and DAV:write-content
|
||||
-- 2 DAV:write-properties
|
||||
-- 4 DAV:write-content
|
||||
-- 64 DAV:bind
|
||||
-- 128 DAV:unbind
|
||||
IF (in_bits & 198::BIT(24)) != 0::BIT(24) THEN
|
||||
IF (in_bits & 6::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || 'W';
|
||||
ELSE
|
||||
IF (in_bits & 64::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || 'B';
|
||||
END IF;
|
||||
IF (in_bits & 128::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || 'U';
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
RETURN out_priv;
|
||||
END
|
||||
$$
|
||||
LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
CREATE or REPLACE FUNCTION get_permissions( INT, INT ) RETURNS TEXT AS $$
|
||||
DECLARE
|
||||
in_from ALIAS FOR $1;
|
||||
in_to ALIAS FOR $2;
|
||||
out_confers TEXT;
|
||||
bit_confers BIT(24);
|
||||
group_role_no INT;
|
||||
tmp_txt TEXT;
|
||||
dbg TEXT DEFAULT '';
|
||||
r RECORD;
|
||||
counter INT;
|
||||
BEGIN
|
||||
-- Self can always have full access
|
||||
IF in_from = in_to THEN
|
||||
RETURN 'A';
|
||||
END IF;
|
||||
|
||||
-- dbg := 'S-';
|
||||
SELECT bits_to_legacy_privilege(r1.confers) INTO out_confers FROM relationship r1
|
||||
WHERE r1.from_user = in_from AND r1.to_user = in_to AND NOT usr_is_role(r1.to_user,'Group');
|
||||
IF FOUND THEN
|
||||
RETURN dbg || out_confers;
|
||||
END IF;
|
||||
-- RAISE NOTICE 'No simple relationships between % and %', in_from, in_to;
|
||||
|
||||
SELECT bit_or(r1.confers & r2.confers) INTO bit_confers
|
||||
FROM relationship r1
|
||||
JOIN relationship r2 ON r1.to_user=r2.from_user
|
||||
WHERE r1.from_user=in_from AND r2.to_user=in_to
|
||||
AND r2.from_user IN (SELECT user_no FROM roles LEFT JOIN role_member USING(role_no) WHERE role_name='Group');
|
||||
IF bit_confers != 0::BIT(24) THEN
|
||||
RETURN dbg || bits_to_legacy_privilege(bit_confers);
|
||||
END IF;
|
||||
|
||||
RETURN '';
|
||||
-- RAISE NOTICE 'No complex relationships between % and %', in_from, in_to;
|
||||
|
||||
SELECT bits_to_legacy_privilege(r1.confers) INTO out_confers FROM relationship r1 LEFT OUTER JOIN relationship r2 ON(r1.to_user = r2.to_user)
|
||||
WHERE r1.from_user = in_from AND r2.from_user = in_to AND r1.from_user != r2.from_user
|
||||
AND NOT EXISTS( SELECT 1 FROM relationship r3 WHERE r3.from_user = r1.to_user ) ;
|
||||
|
||||
IF FOUND THEN
|
||||
-- dbg := 'H-';
|
||||
-- RAISE NOTICE 'Permissions to shared group % ', out_confers;
|
||||
RETURN dbg || out_confers;
|
||||
END IF;
|
||||
|
||||
-- RAISE NOTICE 'No common group relationships between % and %', in_from, in_to;
|
||||
|
||||
RETURN '';
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
|
||||
CREATE or REPLACE FUNCTION get_group_role_no() RETURNS INT AS $$
|
||||
SELECT role_no FROM roles WHERE role_name = 'Group'
|
||||
$$ LANGUAGE sql IMMUTABLE;
|
||||
|
||||
CREATE or REPLACE FUNCTION has_legacy_privilege( INT, TEXT, INT ) RETURNS BOOLEAN AS $$
|
||||
DECLARE
|
||||
in_from ALIAS FOR $1;
|
||||
in_legacy_privilege ALIAS FOR $2;
|
||||
in_to ALIAS FOR $3;
|
||||
in_confers BIT(24);
|
||||
group_role_no INT;
|
||||
BEGIN
|
||||
-- Self can always have full access
|
||||
IF in_from = in_to THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
|
||||
SELECT get_group_role_no() INTO group_role_no;
|
||||
SELECT legacy_privilege_to_bits(in_legacy_privilege) INTO in_confers;
|
||||
|
||||
IF EXISTS(SELECT 1 FROM relationship WHERE from_user = in_from AND to_user = in_to
|
||||
AND (in_confers & confers) = in_confers
|
||||
AND NOT EXISTS(SELECT 1 FROM role_member WHERE to_user = user_no AND role_no = group_role_no) ) THEN
|
||||
-- A direct relationship from A to B that grants sufficient
|
||||
-- RAISE NOTICE 'Permissions directly granted';
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
|
||||
IF EXISTS( SELECT 1 FROM relationship r1 JOIN relationship r2 ON r1.to_user=r2.from_user
|
||||
WHERE (in_confers & r1.confers & r2.confers) = in_confers
|
||||
AND r1.from_user=in_from AND r2.to_user=in_to
|
||||
AND r2.from_user IN (SELECT user_no FROM role_member WHERE role_no=group_role_no) ) THEN
|
||||
-- An indirect relationship from A to B via group G that grants sufficient
|
||||
-- RAISE NOTICE 'Permissions mediated via group';
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
|
||||
IF EXISTS( SELECT 1 FROM relationship r1 JOIN relationship r2 ON r1.to_user=r2.to_user
|
||||
WHERE (in_confers & r1.confers & r2.confers) = in_confers
|
||||
AND r1.from_user=in_from AND r2.from_user=in_to
|
||||
AND r2.to_user IN (SELECT user_no FROM role_member WHERE role_no=group_role_no)
|
||||
AND NOT EXISTS(SELECT 1 FROM relationship WHERE from_user=r2.to_user) ) THEN
|
||||
-- An indirect reflexive relationship from both A & B to group G which grants sufficient
|
||||
-- RAISE NOTICE 'Permissions to shared group';
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
|
||||
-- RAISE NOTICE 'No common group relationships between % and %', in_from, in_to;
|
||||
|
||||
RETURN FALSE;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
|
||||
-- Given a verbose DAV: or CalDAV: privilege name return the bitmask
|
||||
CREATE or REPLACE FUNCTION privilege_to_bits( TEXT ) RETURNS BIT(24) AS $$
|
||||
DECLARE
|
||||
raw_priv ALIAS FOR $1;
|
||||
in_priv TEXT;
|
||||
BEGIN
|
||||
in_priv := trim(lower(regexp_replace(raw_priv, '^.*:', '')));
|
||||
IF in_priv = 'all' THEN
|
||||
RETURN ~ 0::BIT(24);
|
||||
END IF;
|
||||
|
||||
RETURN (CASE
|
||||
WHEN in_priv = 'read' THEN 4609 -- 1 + 512 + 4096
|
||||
WHEN in_priv = 'write' THEN 198 -- 2 + 4 + 64 + 128
|
||||
WHEN in_priv = 'write-properties' THEN 2
|
||||
WHEN in_priv = 'write-content' THEN 4
|
||||
WHEN in_priv = 'unlock' THEN 8
|
||||
WHEN in_priv = 'read-acl' THEN 16
|
||||
WHEN in_priv = 'read-current-user-privilege-set' THEN 32
|
||||
WHEN in_priv = 'bind' THEN 64
|
||||
WHEN in_priv = 'unbind' THEN 128
|
||||
WHEN in_priv = 'write-acl' THEN 256
|
||||
WHEN in_priv = 'read-free-busy' THEN 4608 -- 512 + 4096
|
||||
WHEN in_priv = 'schedule-deliver' THEN 7168 -- 1024 + 2048 + 4096
|
||||
WHEN in_priv = 'schedule-deliver-invite' THEN 1024
|
||||
WHEN in_priv = 'schedule-deliver-reply' THEN 2048
|
||||
WHEN in_priv = 'schedule-query-freebusy' THEN 4096
|
||||
WHEN in_priv = 'schedule-send' THEN 57344 -- 8192 + 16384 + 32768
|
||||
WHEN in_priv = 'schedule-send-invite' THEN 8192
|
||||
WHEN in_priv = 'schedule-send-reply' THEN 16384
|
||||
WHEN in_priv = 'schedule-send-freebusy' THEN 32768
|
||||
ELSE 0 END)::BIT(24);
|
||||
END
|
||||
$$
|
||||
LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
|
||||
-- Given an array of verbose DAV: or CalDAV: privilege names return the bitmask
|
||||
CREATE or REPLACE FUNCTION privilege_to_bits( TEXT[] ) RETURNS BIT(24) AS $$
|
||||
DECLARE
|
||||
raw_privs ALIAS FOR $1;
|
||||
in_priv TEXT;
|
||||
out_bits BIT(24);
|
||||
i INT;
|
||||
all BIT(24);
|
||||
start INT;
|
||||
finish INT;
|
||||
BEGIN
|
||||
out_bits := 0::BIT(24);
|
||||
all := ~ out_bits;
|
||||
SELECT array_lower(raw_privs,1) INTO start;
|
||||
SELECT array_upper(raw_privs,1) INTO finish;
|
||||
FOR i IN start .. finish LOOP
|
||||
SELECT out_bits | privilege_to_bits(raw_privs[i]) INTO out_bits;
|
||||
IF out_bits = all THEN
|
||||
RETURN all;
|
||||
END IF;
|
||||
END LOOP;
|
||||
RETURN out_bits;
|
||||
END
|
||||
$$
|
||||
LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
|
||||
-- This legacy conversion function will eventually be removed, once all logic
|
||||
-- has been converted to use bitmaps, or to use the bits_to_priv() output.
|
||||
--
|
||||
-- NOTE: Round-trip through this and then back through privilege_to_bits
|
||||
-- function is lossy! Through privilege_to_bits() and back through
|
||||
-- this one is not.
|
||||
--
|
||||
CREATE or REPLACE FUNCTION bits_to_privilege( BIT(24) ) RETURNS TEXT[] AS $$
|
||||
DECLARE
|
||||
in_bits ALIAS FOR $1;
|
||||
out_priv TEXT[];
|
||||
BEGIN
|
||||
out_priv := ARRAY[]::text[];
|
||||
IF in_bits = (~ 0::BIT(24)) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:all'];
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 513::BIT(24)) != 0::BIT(24) THEN
|
||||
IF (in_bits & 1::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:read'];
|
||||
END IF;
|
||||
IF (in_bits & 512::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:read-free-busy'];
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 198::BIT(24)) != 0::BIT(24) THEN
|
||||
IF (in_bits & 198::BIT(24)) = 198::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:write'];
|
||||
ELSE
|
||||
IF (in_bits & 2::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:write-properties'];
|
||||
END IF;
|
||||
IF (in_bits & 4::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:write-content'];
|
||||
END IF;
|
||||
IF (in_bits & 64::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:bind'];
|
||||
END IF;
|
||||
IF (in_bits & 128::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:unbind'];
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 8::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:unlock'];
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 16::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:read-acl'];
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 32::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:read-current-user-privilege-set'];
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 256::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:write-acl'];
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 7168::BIT(24)) != 0::BIT(24) THEN
|
||||
IF (in_bits & 7168::BIT(24)) = 7168::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-deliver'];
|
||||
ELSE
|
||||
IF (in_bits & 1024::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-deliver-invite'];
|
||||
END IF;
|
||||
IF (in_bits & 2048::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-deliver-reply'];
|
||||
END IF;
|
||||
IF (in_bits & 4096::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-query-freebusy'];
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 57344::BIT(24)) != 0::BIT(24) THEN
|
||||
IF (in_bits & 57344::BIT(24)) = 57344::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-send'];
|
||||
ELSE
|
||||
IF (in_bits & 8192::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-send-invite'];
|
||||
END IF;
|
||||
IF (in_bits & 16384::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-send-reply'];
|
||||
END IF;
|
||||
IF (in_bits & 32768::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-send-freebusy'];
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
RETURN out_priv;
|
||||
END
|
||||
$$
|
||||
LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
File diff suppressed because it is too large
Load Diff
@ -10,50 +10,41 @@ DBADIR="`dirname \"$0\"`"
|
||||
|
||||
INSTALL_NOTE_FN="`mktemp -t tmp.XXXXXXXXXX`"
|
||||
|
||||
testawldir() {
|
||||
[ -f "${1}/dba/awl-tables.sql" ]
|
||||
}
|
||||
|
||||
# Candidate locations of the AWL directory
|
||||
awldirs="${DBADIR}/../../awl
|
||||
/usr/share/awl
|
||||
/usr/share/php/awl
|
||||
/usr/local/share/awl"
|
||||
|
||||
# Disable globbing and use newline as seperator
|
||||
set -f; IFS='
|
||||
'
|
||||
for d in $awldirs ; do
|
||||
if [ -f "${d}/dba/awl-tables.sql" ] ; then
|
||||
AWLDIR="${d}"
|
||||
break
|
||||
#
|
||||
# Attempt to locate the AWL directory
|
||||
AWLDIR="${DBADIR}/../../awl"
|
||||
if ! testawldir "${AWLDIR}"; then
|
||||
AWLDIR="/usr/share/awl"
|
||||
if ! testawldir "${AWLDIR}"; then
|
||||
AWLDIR="/usr/local/share/awl"
|
||||
if ! testawldir "${AWLDIR}"; then
|
||||
echo "Unable to find AWL libraries"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Renable file globbing and reset seperator
|
||||
set +f; unset IFS
|
||||
|
||||
if [ -z "${AWLDIR}" ] ; then
|
||||
echo "Unable to find AWL libraries"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
AWL_DBAUSER="${3:-davical_dba}"
|
||||
AWL_APPUSER="${4:-davical_app}"
|
||||
|
||||
# set -x
|
||||
export AWL_DBAUSER=davical_dba
|
||||
export AWL_APPUSER=davical_app
|
||||
|
||||
# Get the major version for PostgreSQL
|
||||
export DBVERSION="`psql -qXAt ${PSQLOPTS} -c "SELECT version();" template1 | cut -f2 -d' ' | cut -f1-2 -d'.'`"
|
||||
export DBVERSION="`psql -qAt -c "SELECT version();" template1 | cut -f2 -d' ' | cut -f1-2 -d'.'`"
|
||||
|
||||
install_note() {
|
||||
cat >>"${INSTALL_NOTE_FN}"
|
||||
}
|
||||
|
||||
db_users() {
|
||||
psql -qXAt ${PSQLOPTS} -c "SELECT usename FROM pg_user;" template1
|
||||
psql -qAt -c "SELECT usename FROM pg_user;" template1
|
||||
}
|
||||
|
||||
create_db_user() {
|
||||
if ! db_users | grep "^${1}$" >/dev/null ; then
|
||||
psql -qXAt ${PSQLOPTS} -c "CREATE USER ${1} NOCREATEDB NOCREATEROLE;" template1
|
||||
psql -qAt -c "CREATE USER ${1} NOCREATEDB NOCREATEROLE;" template1
|
||||
cat <<EONOTE | install_note
|
||||
* You will need to edit the PostgreSQL pg_hba.conf to allow the
|
||||
'${1}' database user access to the 'davical' database.
|
||||
@ -63,23 +54,21 @@ EONOTE
|
||||
}
|
||||
|
||||
create_plpgsql_language() {
|
||||
if ! psql ${DBA} -qXAt ${PSQLOPTS} -c "SELECT lanname FROM pg_language;" "${DBNAME}" | grep "^plpgsql$" >/dev/null; then
|
||||
createlang ${PSQLOPTS} plpgsql "${DBNAME}"
|
||||
if ! psql ${DBA} -qAt -c "SELECT lanname FROM pg_language;" "${DBNAME}" | grep "^plpgsql$" >/dev/null; then
|
||||
createlang plpgsql "${DBNAME}"
|
||||
fi
|
||||
}
|
||||
|
||||
try_db_user() {
|
||||
[ "XtestX`psql -U "${1}" -qXAt ${PSQLOPTS} -c \"SELECT usename FROM pg_user;\" \"${DBNAME}\" 2>/dev/null`" != "XtestX" ]
|
||||
[ "XtestX`psql -U "${1}" -qAt -c \"SELECT usename FROM pg_user;\" \"${DBNAME}\" 2>/dev/null`" != "XtestX" ]
|
||||
}
|
||||
|
||||
# Hide all the annoying NOTICE... messages
|
||||
export PGOPTIONS='--client-min-messages=warning'
|
||||
|
||||
create_db_user "${AWL_DBAUSER}"
|
||||
create_db_user "${AWL_APPUSER}"
|
||||
|
||||
# FIXME: Need to check that the database was actually created.
|
||||
if ! createdb --encoding UTF8 --template template0 --owner "${AWL_DBAUSER}" ${PSQLOPTS} "${DBNAME}" ; then
|
||||
if ! createdb --encoding UTF8 --template template0 --owner "${AWL_DBAUSER}" "${DBNAME}" ; then
|
||||
echo "Unable to create database"
|
||||
exit 1
|
||||
fi
|
||||
@ -111,7 +100,7 @@ as a user with full permissions to access the local PostgreSQL database.
|
||||
If your PostgreSQL database is non-standard then you will need to set the PGHOST,
|
||||
PGPORT and/or PGCLUSTER environment variables before running this script again.
|
||||
|
||||
See: https://wiki.davical.org/index.php/Problems_and_Solutions#No_Database_Rights
|
||||
See: http://wiki.davical.org/w/Install_Errors/No_Database_Rights
|
||||
|
||||
EOFAILURE
|
||||
exit 1
|
||||
@ -124,40 +113,28 @@ create_plpgsql_language
|
||||
|
||||
#
|
||||
# Load the AWL base tables and schema management tables
|
||||
psql -qXAt ${PSQLOPTS} ${DBA} -f "${AWLDIR}/dba/awl-tables.sql" "${DBNAME}" 2>&1
|
||||
psql -qXAt ${PSQLOPTS} ${DBA} -f "${AWLDIR}/dba/schema-management.sql" "${DBNAME}" 2>&1
|
||||
psql -qAt ${DBA} -f "${AWLDIR}/dba/awl-tables.sql" "${DBNAME}" 2>&1 | egrep -v "(^CREATE |^GRANT|^BEGIN|^COMMIT| NOTICE: )"
|
||||
psql -qAt ${DBA} -f "${AWLDIR}/dba/schema-management.sql" "${DBNAME}" 2>&1 | egrep -v "(^CREATE |^GRANT|^BEGIN|^COMMIT| NOTICE: |^t$)"
|
||||
|
||||
#
|
||||
# Load the DAViCal tables
|
||||
psql -qXAt ${PSQLOPTS} ${DBA} -f "${DBADIR}/davical.sql" "${DBNAME}" 2>&1
|
||||
psql -qAt ${DBA} -f "${DBADIR}/davical.sql" "${DBNAME}" 2>&1 | egrep -v "(^CREATE |^GRANT|^BEGIN|^COMMIT| NOTICE: |^t$)"
|
||||
|
||||
#
|
||||
# Set permissions for the application DB user on the database.
|
||||
if ! ${DBADIR}/update-davical-database ${DBAOPTS} --dbuser "${AWL_DBAUSER}" --dbname "${DBNAME}" --appuser "${AWL_APPUSER}" --nopatch --owner "${AWL_DBAUSER}" ; then
|
||||
# Set permissions for the application DB user on the database
|
||||
if ! ${DBADIR}/update-davical-database --dbname "${DBNAME}" --appuser "${AWL_APPUSER}" --nopatch --owner "${AWL_DBAUSER}" ; then
|
||||
cat <<EOFAILURE
|
||||
* * * * ERROR * * * *
|
||||
The database administration utility failed. This may be due to database
|
||||
permissions for the davical_dba user, or because the Perl DBD::Pg or YAML
|
||||
libraries are not available.
|
||||
The database administration utility failed. This is usually due to the Perl YAML
|
||||
or the Perl DBD::Pg libraries not being available.
|
||||
|
||||
Check that your pg_hba.conf allows the davical_dba user to connect to the
|
||||
database (and make sure you've reloaded PostgreSQL since changing that).
|
||||
|
||||
Also see: https://wiki.davical.org/index.php/Problems_and_Solutions
|
||||
See: http://wiki.davical.org/w/Install_Errors/No_Perl_YAML
|
||||
|
||||
EOFAILURE
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
# Load the required base data
|
||||
psql -qXAt ${PSQLOPTS} ${DBA} -f "${DBADIR}/base-data.sql" "${DBNAME}" | grep -E -v '^10'
|
||||
|
||||
|
||||
# Apply any patches.
|
||||
if ! ${DBADIR}/update-davical-database ${DBAOPTS} --dbuser "${AWL_DBAUSER}" --dbname "${DBNAME}" --appuser "${AWL_APPUSER}" --owner "${AWL_DBAUSER}" ; then
|
||||
echo "Failed to patch database"
|
||||
exit 1;
|
||||
fi
|
||||
psql -qAt ${DBA} -f "${DBADIR}/base-data.sql" "${DBNAME}" | egrep -v '^10'
|
||||
|
||||
#
|
||||
# We can override the admin password generation for regression testing predictability
|
||||
@ -172,7 +149,7 @@ if [ "$ADMINPW" = "" ] ; then
|
||||
# OK. They didn't supply one, and pwgen didn't work, so we hack something
|
||||
# together from /dev/random ...
|
||||
export LC_ALL=C
|
||||
ADMINPW="`dd if=/dev/urandom bs=512 count=1 2>/dev/null | tr -c -d 'a-km-zA-HJ-NP-Y0-9' | cut -c2-9`"
|
||||
ADMINPW="`dd if=/dev/urandom bs=512 count=1 2>/dev/null | tr -c -d "a-km-zA-HJ-NP-Y0-9" | cut -c2-9`"
|
||||
fi
|
||||
|
||||
if [ "$ADMINPW" = "" ] ; then
|
||||
@ -181,7 +158,7 @@ if [ "$ADMINPW" = "" ] ; then
|
||||
ADMINPW="please change this password"
|
||||
fi
|
||||
|
||||
psql -qX ${PSQLOPTS} ${DBA} -c "UPDATE usr SET password = '**${ADMINPW}' WHERE user_no = 1;" "${DBNAME}"
|
||||
psql -q -c "UPDATE usr SET password = '**${ADMINPW}' WHERE user_no = 1;" "${DBNAME}"
|
||||
|
||||
echo "NOTE"
|
||||
echo "===="
|
||||
@ -189,9 +166,9 @@ cat "${INSTALL_NOTE_FN}"
|
||||
rm "${INSTALL_NOTE_FN}"
|
||||
|
||||
cat <<FRIENDLY
|
||||
* The password for the 'admin' user has been set to '${ADMINPW}'
|
||||
* The password for the 'admin' user has been set to '${ADMINPW}'"
|
||||
|
||||
Thanks for trying DAViCal! Check the configuration in /etc/davical/config.php.
|
||||
For help, look at our website and wiki, or visit #davical on irc.oftc.net.
|
||||
Thanks for trying DAViCal! Check in /usr/share/doc/davical/examples/ for
|
||||
some configuration examples. For help, visit #davical on irc.oftc.net.
|
||||
|
||||
FRIENDLY
|
||||
|
||||
380
dba/davical.sql
380
dba/davical.sql
@ -1,99 +1,8 @@
|
||||
-- DAViCal CalDAV Server - Database Schema
|
||||
-- Really Simple CalDAV Store - Database Schema
|
||||
--
|
||||
|
||||
|
||||
-- Given a verbose DAV: or CalDAV: privilege name return the bitmask
|
||||
CREATE or REPLACE FUNCTION privilege_to_bits( TEXT ) RETURNS BIT(24) AS $$
|
||||
DECLARE
|
||||
raw_priv ALIAS FOR $1;
|
||||
in_priv TEXT;
|
||||
BEGIN
|
||||
in_priv := trim(lower(regexp_replace(raw_priv, '^.*:', '')));
|
||||
IF in_priv = 'all' THEN
|
||||
RETURN ~ 0::BIT(24);
|
||||
END IF;
|
||||
|
||||
RETURN (CASE
|
||||
WHEN in_priv = 'read' THEN 4609 -- 1 + 512 + 4096
|
||||
WHEN in_priv = 'write' THEN 198 -- 2 + 4 + 64 + 128
|
||||
WHEN in_priv = 'write-properties' THEN 2
|
||||
WHEN in_priv = 'write-content' THEN 4
|
||||
WHEN in_priv = 'unlock' THEN 8
|
||||
WHEN in_priv = 'read-acl' THEN 16
|
||||
WHEN in_priv = 'read-current-user-privilege-set' THEN 32
|
||||
WHEN in_priv = 'bind' THEN 64
|
||||
WHEN in_priv = 'unbind' THEN 128
|
||||
WHEN in_priv = 'write-acl' THEN 256
|
||||
WHEN in_priv = 'read-free-busy' THEN 4608 -- 512 + 4096
|
||||
WHEN in_priv = 'schedule-deliver' THEN 7168 -- 1024 + 2048 + 4096
|
||||
WHEN in_priv = 'schedule-deliver-invite' THEN 1024
|
||||
WHEN in_priv = 'schedule-deliver-reply' THEN 2048
|
||||
WHEN in_priv = 'schedule-query-freebusy' THEN 4096
|
||||
WHEN in_priv = 'schedule-send' THEN 57344 -- 8192 + 16384 + 32768
|
||||
WHEN in_priv = 'schedule-send-invite' THEN 8192
|
||||
WHEN in_priv = 'schedule-send-reply' THEN 16384
|
||||
WHEN in_priv = 'schedule-send-freebusy' THEN 32768
|
||||
ELSE 0 END)::BIT(24);
|
||||
END
|
||||
$$
|
||||
LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
-- Given an array of verbose DAV: or CalDAV: privilege names return the bitmask
|
||||
CREATE or REPLACE FUNCTION privilege_to_bits( TEXT[] ) RETURNS BIT(24) AS $$
|
||||
DECLARE
|
||||
raw_privs ALIAS FOR $1;
|
||||
in_priv TEXT;
|
||||
out_bits BIT(24);
|
||||
i INT;
|
||||
allprivs BIT(24);
|
||||
start INT;
|
||||
finish INT;
|
||||
BEGIN
|
||||
out_bits := 0::BIT(24);
|
||||
allprivs := ~ out_bits;
|
||||
SELECT array_lower(raw_privs,1) INTO start;
|
||||
SELECT array_upper(raw_privs,1) INTO finish;
|
||||
FOR i IN start .. finish LOOP
|
||||
SELECT out_bits | privilege_to_bits(raw_privs[i]) INTO out_bits;
|
||||
IF out_bits = allprivs THEN
|
||||
RETURN allprivs;
|
||||
END IF;
|
||||
END LOOP;
|
||||
RETURN out_bits;
|
||||
END
|
||||
$$
|
||||
LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
|
||||
-- This sequence is used in a number of places so that any DAV resource will have a unique ID
|
||||
CREATE SEQUENCE dav_id_seq;
|
||||
|
||||
|
||||
-- Used by the timezone server, but we also load it with random timezones
|
||||
-- from events, if we don't already have those definitions.
|
||||
CREATE TABLE timezones (
|
||||
our_tzno SERIAL PRIMARY KEY,
|
||||
tzid TEXT UNIQUE NOT NULL,
|
||||
olson_name TEXT,
|
||||
active BOOLEAN,
|
||||
last_modified TIMESTAMP DEFAULT current_timestamp,
|
||||
etag TEXT,
|
||||
vtimezone TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE tz_aliases (
|
||||
our_tzno INT8 REFERENCES timezones(our_tzno),
|
||||
tzalias TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE tz_localnames (
|
||||
our_tzno INT8 REFERENCES timezones(our_tzno),
|
||||
locale TEXT NOT NULL,
|
||||
localised_name TEXT NOT NULL,
|
||||
preferred BOOLEAN DEFAULT TRUE
|
||||
);
|
||||
|
||||
|
||||
-- Something that can look like a filesystem hierarchy where we store stuff
|
||||
CREATE TABLE collection (
|
||||
user_no INT references usr(user_no) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
@ -107,16 +16,8 @@ CREATE TABLE collection (
|
||||
public_events_only BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
publicly_readable BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
collection_id INT8 PRIMARY KEY DEFAULT nextval('dav_id_seq'),
|
||||
default_privileges BIT(24),
|
||||
is_addressbook BOOLEAN DEFAULT FALSE,
|
||||
resourcetypes TEXT DEFAULT '<DAV::collection/>',
|
||||
schedule_transp TEXT DEFAULT 'opaque',
|
||||
timezone TEXT REFERENCES timezones(tzid) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||
description TEXT DEFAULT '',
|
||||
UNIQUE(user_no,dav_name)
|
||||
);
|
||||
ALTER TABLE collection ADD CONSTRAINT unique_path UNIQUE (dav_name);
|
||||
CREATE INDEX collection_dav_name_idx ON collection (dav_name);
|
||||
|
||||
|
||||
-- The main event. Where we store the things the calendar throws at us.
|
||||
@ -131,12 +32,18 @@ CREATE TABLE caldav_data (
|
||||
logged_user INT references usr(user_no) ON UPDATE CASCADE ON DELETE SET DEFAULT DEFERRABLE,
|
||||
dav_id INT8 UNIQUE DEFAULT nextval('dav_id_seq'),
|
||||
collection_id INT8 REFERENCES collection(collection_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
weak_etag TEXT DEFAULT NULL,
|
||||
|
||||
PRIMARY KEY ( user_no, dav_name )
|
||||
);
|
||||
CREATE INDEX caldav_data_collection_id_fkey ON caldav_data(collection_id);
|
||||
CREATE INDEX caldav_data_dav_name_idx ON caldav_data (dav_name);
|
||||
|
||||
-- Not particularly needed, perhaps, except as a way to collect
|
||||
-- a bunch of valid iCalendar time zone specifications... :-)
|
||||
CREATE TABLE time_zone (
|
||||
tz_id TEXT PRIMARY KEY,
|
||||
tz_locn TEXT,
|
||||
tz_spec TEXT
|
||||
);
|
||||
|
||||
|
||||
-- The parsed calendar item. Here we have pulled those events/todos/journals apart somewhat.
|
||||
@ -151,9 +58,7 @@ CREATE TABLE calendar_item (
|
||||
last_modified TIMESTAMP,
|
||||
dtstamp TIMESTAMP,
|
||||
dtstart TIMESTAMP WITH TIME ZONE,
|
||||
dtstart_orig TIMESTAMP WITH TIME ZONE,
|
||||
dtend TIMESTAMP WITH TIME ZONE,
|
||||
dtend_orig TIMESTAMP WITH TIME ZONE,
|
||||
due TIMESTAMP WITH TIME ZONE,
|
||||
summary TEXT,
|
||||
location TEXT,
|
||||
@ -164,14 +69,12 @@ CREATE TABLE calendar_item (
|
||||
rrule TEXT,
|
||||
url TEXT,
|
||||
percent_complete NUMERIC(7,2),
|
||||
tz_id TEXT REFERENCES timezones( tzid ),
|
||||
tz_id TEXT REFERENCES time_zone( tz_id ),
|
||||
status TEXT,
|
||||
completed TIMESTAMP WITH TIME ZONE,
|
||||
dav_id INT8 UNIQUE,
|
||||
collection_id INT8 REFERENCES collection(collection_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
first_instance_start TIMESTAMP WITH TIME ZONE DEFAULT NULL,
|
||||
last_instance_end TIMESTAMP WITH TIME ZONE DEFAULT NULL,
|
||||
|
||||
|
||||
-- Cascade updates / deletes from the caldav_data table
|
||||
CONSTRAINT caldav_exists FOREIGN KEY ( user_no, dav_name )
|
||||
REFERENCES caldav_data ( user_no, dav_name )
|
||||
@ -180,7 +83,6 @@ CREATE TABLE calendar_item (
|
||||
PRIMARY KEY ( user_no, dav_name )
|
||||
);
|
||||
CREATE INDEX calendar_item_collection_id_fkey ON calendar_item(collection_id);
|
||||
CREATE INDEX calendar_item_dav_name_idx ON calendar_item (dav_name);
|
||||
|
||||
|
||||
-- Each user can be related to each other user. This mechanism can also
|
||||
@ -190,8 +92,7 @@ CREATE TABLE relationship_type (
|
||||
rt_name TEXT,
|
||||
rt_togroup BOOLEAN,
|
||||
confers TEXT DEFAULT 'RW',
|
||||
rt_fromgroup BOOLEAN,
|
||||
bit_confers BIT(24) DEFAULT privilege_to_bits(ARRAY['DAV::read','DAV::write'])
|
||||
rt_fromgroup BOOLEAN
|
||||
);
|
||||
|
||||
|
||||
@ -199,7 +100,6 @@ CREATE TABLE relationship (
|
||||
from_user INT REFERENCES usr (user_no) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
to_user INT REFERENCES usr (user_no) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
rt_id INT REFERENCES relationship_type (rt_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
confers BIT(24) DEFAULT privilege_to_bits(ARRAY['DAV::read','DAV::write']),
|
||||
|
||||
PRIMARY KEY ( from_user, to_user, rt_id )
|
||||
);
|
||||
@ -236,41 +136,43 @@ CREATE TABLE freebusy_ticket (
|
||||
);
|
||||
|
||||
|
||||
|
||||
CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS $$
|
||||
CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS '
|
||||
DECLARE
|
||||
BEGIN
|
||||
|
||||
IF TG_OP = 'DELETE' THEN
|
||||
IF TG_OP = ''DELETE'' THEN
|
||||
-- Just let the ON DELETE CASCADE handle this case
|
||||
RETURN OLD;
|
||||
END IF;
|
||||
|
||||
IF NEW.dav_id IS NULL THEN
|
||||
NEW.dav_id = nextval('dav_id_seq');
|
||||
NEW.dav_id = nextval(''dav_id_seq'');
|
||||
END IF;
|
||||
|
||||
IF TG_OP = 'UPDATE' THEN
|
||||
IF OLD.dav_id != NEW.dav_id OR OLD.collection_id != NEW.collection_id
|
||||
OR OLD.user_no != NEW.user_no OR OLD.dav_name != NEW.dav_name THEN
|
||||
UPDATE calendar_item SET dav_id = NEW.dav_id, user_no = NEW.user_no,
|
||||
collection_id = NEW.collection_id, dav_name = NEW.dav_name
|
||||
WHERE dav_name = OLD.dav_name OR dav_id = OLD.dav_id;
|
||||
IF TG_OP = ''UPDATE'' THEN
|
||||
IF OLD.dav_id = NEW.dav_id THEN
|
||||
-- Nothing to do
|
||||
RETURN NEW;
|
||||
END IF;
|
||||
RETURN NEW;
|
||||
END IF;
|
||||
|
||||
UPDATE calendar_item SET dav_id = NEW.dav_id, user_no = NEW.user_no,
|
||||
collection_id = NEW.collection_id, dav_name = NEW.dav_name
|
||||
WHERE dav_name = NEW.dav_name OR dav_id = NEW.dav_id;
|
||||
IF TG_RELNAME = ''caldav_data'' THEN
|
||||
UPDATE calendar_item SET dav_id = NEW.dav_id WHERE user_no = NEW.user_no AND dav_name = NEW.dav_name;
|
||||
ELSE
|
||||
UPDATE caldav_data SET dav_id = NEW.dav_id WHERE user_no = NEW.user_no AND dav_name = NEW.dav_name;
|
||||
END IF;
|
||||
|
||||
RETURN NEW;
|
||||
|
||||
END
|
||||
$$ LANGUAGE plpgsql;
|
||||
' LANGUAGE 'plpgsql';
|
||||
|
||||
CREATE TRIGGER caldav_data_sync_dav_id AFTER INSERT OR UPDATE ON caldav_data
|
||||
FOR EACH ROW EXECUTE PROCEDURE sync_dav_id();
|
||||
|
||||
CREATE TRIGGER calendar_item_sync_dav_id AFTER INSERT OR UPDATE ON calendar_item
|
||||
FOR EACH ROW EXECUTE PROCEDURE sync_dav_id();
|
||||
|
||||
|
||||
-- Only needs SELECT access by website.
|
||||
CREATE TABLE principal_type (
|
||||
@ -281,15 +183,13 @@ CREATE TABLE principal_type (
|
||||
|
||||
-- web needs SELECT,INSERT,UPDATE,DELETE
|
||||
CREATE TABLE principal (
|
||||
principal_id INT8 DEFAULT nextval('dav_id_seq') PRIMARY KEY,
|
||||
principal_id SERIAL PRIMARY KEY,
|
||||
type_id INT8 NOT NULL REFERENCES principal_type(principal_type_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE,
|
||||
user_no INT8 NULL REFERENCES usr(user_no) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
displayname TEXT,
|
||||
default_privileges BIT(24)
|
||||
active BOOLEAN
|
||||
);
|
||||
|
||||
ALTER TABLE principal ADD CONSTRAINT unique_user UNIQUE (user_no);
|
||||
|
||||
|
||||
-- Allowing identification of group members.
|
||||
CREATE TABLE group_member (
|
||||
@ -300,203 +200,39 @@ CREATE UNIQUE INDEX group_member_pk ON group_member(group_id,member_id);
|
||||
CREATE INDEX group_member_sk ON group_member(member_id);
|
||||
|
||||
|
||||
CREATE TABLE grants (
|
||||
by_principal INT8 REFERENCES principal(principal_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
by_collection INT8 REFERENCES collection(collection_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
to_principal INT8 REFERENCES principal(principal_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
privileges BIT(24),
|
||||
is_group BOOLEAN
|
||||
) WITHOUT OIDS;
|
||||
CREATE UNIQUE INDEX grants_pk1 ON grants(by_principal,to_principal);
|
||||
CREATE UNIQUE INDEX grants_pk2 ON grants(by_collection,to_principal);
|
||||
|
||||
|
||||
CREATE TABLE sync_tokens (
|
||||
sync_token SERIAL PRIMARY KEY,
|
||||
collection_id INT8 REFERENCES collection(collection_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
modification_time TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp
|
||||
);
|
||||
CREATE INDEX sync_tokens_collection_idx ON sync_tokens (collection_id);
|
||||
|
||||
|
||||
CREATE TABLE sync_changes (
|
||||
sync_time TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp,
|
||||
collection_id INT8 REFERENCES collection(collection_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
sync_status INT,
|
||||
dav_id INT8, -- can't REFERENCES calendar_item(dav_id) ON DELETE SET NULL ON UPDATE RESTRICT
|
||||
dav_name TEXT
|
||||
);
|
||||
CREATE INDEX sync_processing_index ON sync_changes( collection_id, dav_id, sync_time );
|
||||
|
||||
-- Revision 1.2.7 endeth here.
|
||||
|
||||
CREATE TABLE access_ticket (
|
||||
ticket_id TEXT PRIMARY KEY,
|
||||
dav_owner_id INT8 NOT NULL REFERENCES principal(principal_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
privileges BIT(24),
|
||||
target_collection_id INT8 NOT NULL REFERENCES collection(collection_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
target_resource_id INT8 REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
expires TIMESTAMP
|
||||
-- Only needs SELECT access by website. dav_resource_type will be 'principal', 'collection', 'CalDAV:calendar' and so forth.
|
||||
CREATE TABLE dav_resource_type (
|
||||
resource_type_id SERIAL PRIMARY KEY,
|
||||
dav_resource_type TEXT,
|
||||
resource_type_desc TEXT
|
||||
);
|
||||
|
||||
|
||||
-- At this point we only support binding collections
|
||||
CREATE TABLE dav_binding (
|
||||
bind_id INT8 DEFAULT nextval('dav_id_seq') PRIMARY KEY,
|
||||
bound_source_id INT8 REFERENCES collection(collection_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
access_ticket_id TEXT REFERENCES access_ticket(ticket_id) ON UPDATE CASCADE ON DELETE SET NULL,
|
||||
dav_owner_id INT8 NOT NULL REFERENCES principal(principal_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
parent_container TEXT NOT NULL,
|
||||
dav_name TEXT UNIQUE NOT NULL,
|
||||
dav_displayname TEXT,
|
||||
external_url TEXT,
|
||||
type TEXT
|
||||
CREATE TABLE dav_resource (
|
||||
dav_id INT8 PRIMARY KEY DEFAULT nextval('dav_id_seq'),
|
||||
dav_name TEXT,
|
||||
resource_type_id INT8 REFERENCES dav_resource_type(resource_type_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE,
|
||||
owner_id INT8 REFERENCES principal(principal_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE addressbook_resource (
|
||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE PRIMARY KEY,
|
||||
version TEXT,
|
||||
uid TEXT,
|
||||
nickname TEXT,
|
||||
fn TEXT, -- fullname
|
||||
n TEXT, -- Name Surname;First names
|
||||
note TEXT,
|
||||
org TEXT,
|
||||
url TEXT,
|
||||
fburl TEXT,
|
||||
caladruri TEXT,
|
||||
caluri TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE addressbook_address_adr (
|
||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
count INT,
|
||||
type TEXT,
|
||||
box_no TEXT,
|
||||
unit_no TEXT,
|
||||
street_address TEXT,
|
||||
locality TEXT,
|
||||
region TEXT,
|
||||
postcode TEXT,
|
||||
country TEXT,
|
||||
property TEXT, -- The full text of the property
|
||||
UNIQUE (dav_id, count)
|
||||
);
|
||||
|
||||
CREATE TABLE addressbook_address_tel (
|
||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
count INT,
|
||||
type TEXT,
|
||||
tel TEXT,
|
||||
property TEXT, -- The full text of the property
|
||||
UNIQUE (dav_id, count)
|
||||
);
|
||||
|
||||
CREATE TABLE addressbook_address_email (
|
||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
count INT,
|
||||
type TEXT,
|
||||
email TEXT,
|
||||
property TEXT, -- The full text of the property
|
||||
UNIQUE (dav_id, count)
|
||||
CREATE TABLE privilege (
|
||||
granted_to_id INT8 REFERENCES principal(principal_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
resource_id INT8 REFERENCES dav_resource(dav_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
granted_by_id INT8 REFERENCES principal(principal_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE,
|
||||
can_read BOOLEAN,
|
||||
can_write BOOLEAN,
|
||||
can_write_properties BOOLEAN,
|
||||
can_write_content BOOLEAN,
|
||||
can_unlock BOOLEAN,
|
||||
can_read_acl BOOLEAN,
|
||||
can_read_current_user_privilege_set BOOLEAN,
|
||||
can_write_acl BOOLEAN,
|
||||
can_bind BOOLEAN,
|
||||
can_unbind BOOLEAN,
|
||||
can_read_free_busy BOOLEAN,
|
||||
PRIMARY KEY (granted_to_id, resource_id)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE calendar_alarm (
|
||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
count INT,
|
||||
action TEXT,
|
||||
trigger TEXT,
|
||||
summary TEXT,
|
||||
description TEXT,
|
||||
next_trigger TIMESTAMP WITH TIME ZONE,
|
||||
component TEXT, -- The full text of the component
|
||||
trigger_state CHAR DEFAULT 'N', -- 'N' => 'New/Needs setting', 'A' = 'Active', 'O' = 'Old'
|
||||
UNIQUE (dav_id, count)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE calendar_attendee_email_status (
|
||||
email_status_id INT8 PRIMARY KEY,
|
||||
description TEXT NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO calendar_attendee_email_status (email_status_id, description)
|
||||
VALUES
|
||||
(1, 'waiting for invitation to be sent'),
|
||||
(2, 'invitation has been sent'),
|
||||
(3, 'waiting for schedule change to be sent'),
|
||||
(4, 'schedule change has been sent'),
|
||||
(11, 'attendee has accepted'),
|
||||
(12, 'attendee indicated maybe'),
|
||||
(13, 'attendee has refused')
|
||||
;
|
||||
|
||||
CREATE TABLE calendar_attendee (
|
||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
status TEXT,
|
||||
partstat TEXT,
|
||||
cn TEXT,
|
||||
attendee TEXT,
|
||||
role TEXT,
|
||||
rsvp BOOLEAN,
|
||||
property TEXT, -- The full text of the property
|
||||
attendee_state TEXT, -- Internal DAViCal processing state
|
||||
weak_etag TEXT, -- The week_etag applying for this attendee state
|
||||
email_status INT REFERENCES calendar_attendee_email_status(email_status_id) DEFAULT 1 NOT NULL,
|
||||
is_remote BOOLEAN DEFAULT false,
|
||||
PRIMARY KEY ( dav_id, attendee )
|
||||
);
|
||||
|
||||
|
||||
CREATE or REPLACE FUNCTION real_path_exists( TEXT ) RETURNS BOOLEAN AS $$
|
||||
DECLARE
|
||||
in_path ALIAS FOR $1;
|
||||
tmp BOOLEAN;
|
||||
BEGIN
|
||||
IF in_path = '/' THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
IF in_path ~ '^/[^/]+/$' THEN
|
||||
SELECT TRUE INTO tmp FROM usr WHERE username = substring( in_path from 2 for length(in_path) - 2);
|
||||
IF FOUND THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
ELSE
|
||||
IF in_path ~ '^/.*/$' THEN
|
||||
SELECT TRUE INTO tmp FROM collection WHERE dav_name = in_path;
|
||||
IF FOUND THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
RETURN FALSE;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql ;
|
||||
|
||||
ALTER TABLE dav_binding ADD CONSTRAINT "dav_name_does_not_exist"
|
||||
CHECK (NOT real_path_exists(dav_name));
|
||||
|
||||
-- We create a bunch of counters for reporting basic statistics
|
||||
CREATE SEQUENCE metrics_count_get;
|
||||
CREATE SEQUENCE metrics_count_put;
|
||||
CREATE SEQUENCE metrics_count_propfind;
|
||||
CREATE SEQUENCE metrics_count_proppatch;
|
||||
CREATE SEQUENCE metrics_count_report;
|
||||
CREATE SEQUENCE metrics_count_head;
|
||||
CREATE SEQUENCE metrics_count_options;
|
||||
CREATE SEQUENCE metrics_count_post;
|
||||
CREATE SEQUENCE metrics_count_mkcalendar;
|
||||
CREATE SEQUENCE metrics_count_mkcol;
|
||||
CREATE SEQUENCE metrics_count_delete;
|
||||
CREATE SEQUENCE metrics_count_move;
|
||||
CREATE SEQUENCE metrics_count_acl;
|
||||
CREATE SEQUENCE metrics_count_lock;
|
||||
CREATE SEQUENCE metrics_count_unlock;
|
||||
CREATE SEQUENCE metrics_count_mkticket;
|
||||
CREATE SEQUENCE metrics_count_delticket;
|
||||
CREATE SEQUENCE metrics_count_bind;
|
||||
CREATE SEQUENCE metrics_count_unknown;
|
||||
|
||||
SELECT new_db_revision(1,3,5, 'Maj' );
|
||||
SELECT new_db_revision(1,2,5, 'Mai' );
|
||||
|
||||
@ -46,7 +46,7 @@ CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS '
|
||||
RETURN NEW;
|
||||
|
||||
END
|
||||
' LANGUAGE plpgsql;
|
||||
' LANGUAGE 'plpgsql';
|
||||
|
||||
CREATE TRIGGER caldav_data_sync_dav_id AFTER INSERT OR UPDATE ON caldav_data
|
||||
FOR EACH ROW EXECUTE PROCEDURE sync_dav_id();
|
||||
|
||||
@ -48,7 +48,7 @@ CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS '
|
||||
RETURN NEW;
|
||||
|
||||
END
|
||||
' LANGUAGE plpgsql;
|
||||
' LANGUAGE 'plpgsql';
|
||||
|
||||
CREATE TRIGGER caldav_data_sync_dav_id AFTER INSERT OR UPDATE ON caldav_data
|
||||
FOR EACH ROW EXECUTE PROCEDURE sync_dav_id();
|
||||
|
||||
@ -42,7 +42,7 @@ CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS '
|
||||
RETURN NEW;
|
||||
|
||||
END
|
||||
' LANGUAGE plpgsql;
|
||||
' LANGUAGE 'plpgsql';
|
||||
|
||||
-- CREATE TRIGGER caldav_data_sync_dav_id AFTER INSERT OR UPDATE ON caldav_data
|
||||
-- FOR EACH ROW EXECUTE PROCEDURE sync_dav_id();
|
||||
|
||||
@ -1,68 +0,0 @@
|
||||
|
||||
-- Minor fix: Ensure the target of a binding is unique
|
||||
-- Minor enhancement: Add columns for earliest start / latest end for improved pre-selection
|
||||
-- Add columns to support remote binds
|
||||
|
||||
-- Just in case these constraints got added manually, so we won't fail
|
||||
-- if there is an existing one.
|
||||
ALTER TABLE principal DROP CONSTRAINT unique_user CASCADE;
|
||||
ALTER TABLE collection DROP CONSTRAINT unique_path CASCADE;
|
||||
|
||||
CREATE or REPLACE FUNCTION real_path_exists( TEXT ) RETURNS BOOLEAN AS $$
|
||||
DECLARE
|
||||
in_path ALIAS FOR $1;
|
||||
tmp BOOLEAN;
|
||||
BEGIN
|
||||
IF in_path = '/' THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
IF in_path ~ '^/[^/]+/$' THEN
|
||||
SELECT TRUE INTO tmp FROM usr WHERE username = substring( in_path from 2 for length(in_path) - 2);
|
||||
IF FOUND THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
ELSE
|
||||
IF in_path ~ '^/.*/$' THEN
|
||||
SELECT TRUE INTO tmp FROM collection WHERE dav_name = in_path;
|
||||
IF FOUND THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
RETURN FALSE;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql ;
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,2,9);
|
||||
|
||||
ALTER TABLE dav_binding ADD UNIQUE( dav_name );
|
||||
|
||||
-- New fields for Rob Ostensen's remote binding setup
|
||||
ALTER TABLE dav_binding ADD COLUMN external_url TEXT;
|
||||
ALTER TABLE dav_binding ADD COLUMN type TEXT;
|
||||
|
||||
ALTER TABLE principal ADD CONSTRAINT unique_user UNIQUE (user_no);
|
||||
|
||||
-- Ensure we don't refer to any newer, duplicated collections
|
||||
UPDATE caldav_data SET collection_id = (SELECT min(c2.collection_id) FROM collection c1, collection c2
|
||||
WHERE c1.dav_name = c2.dav_name AND c1.collection_id = caldav_data.collection_id)
|
||||
WHERE collection_id > (SELECT min(c2.collection_id) FROM collection c1, collection c2
|
||||
WHERE c1.dav_name = c2.dav_name AND c1.collection_id = caldav_data.collection_id);
|
||||
-- Ensure the newer duplicated collections don't exist any longer
|
||||
DELETE FROM collection WHERE collection_id > (SELECT min(collection_id) FROM collection c2 WHERE c2.dav_name = collection.dav_name);
|
||||
-- Ensure we can't add more duplicates in the future
|
||||
ALTER TABLE collection ADD CONSTRAINT unique_path UNIQUE (dav_name);
|
||||
|
||||
ALTER TABLE dav_binding ADD CONSTRAINT "dav_name_does_not_exist"
|
||||
CHECK (NOT real_path_exists(dav_name));
|
||||
|
||||
-- We will use these to improve our selection criteria in future, but for now we will leave them null
|
||||
ALTER TABLE calendar_item ADD COLUMN first_instance_start TIMESTAMP WITHOUT TIME ZONE DEFAULT NULL;
|
||||
ALTER TABLE calendar_item ADD COLUMN last_instance_end TIMESTAMP WITHOUT TIME ZONE DEFAULT NULL;
|
||||
|
||||
SELECT new_db_revision(1,2,10, 'Octobre' );
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
|
||||
@ -1,96 +0,0 @@
|
||||
|
||||
-- Minor fix: Ensure the target of a binding is unique
|
||||
-- Minor enhancement: Add columns for earliest start / latest end for improved pre-selection
|
||||
-- Add columns to support remote binds
|
||||
-- Fix for upgrading: Provide version of check_db_revision() function
|
||||
|
||||
CREATE or REPLACE FUNCTION check_db_revision( INT, INT, INT ) RETURNS BOOLEAN AS '
|
||||
DECLARE
|
||||
major ALIAS FOR $1;
|
||||
minor ALIAS FOR $2;
|
||||
patch ALIAS FOR $3;
|
||||
matching INT;
|
||||
BEGIN
|
||||
SELECT COUNT(*) INTO matching FROM awl_db_revision
|
||||
WHERE (schema_major = major AND schema_minor = minor AND schema_patch > patch)
|
||||
OR (schema_major = major AND schema_minor > minor)
|
||||
OR (schema_major > major)
|
||||
;
|
||||
IF matching >= 1 THEN
|
||||
RAISE EXCEPTION ''Database revisions after %.%.% have already been applied.'', major, minor, patch;
|
||||
RETURN FALSE;
|
||||
END IF;
|
||||
SELECT COUNT(*) INTO matching FROM awl_db_revision
|
||||
WHERE schema_major = major AND schema_minor = minor AND schema_patch = patch;
|
||||
IF matching >= 1 THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
RAISE EXCEPTION ''Database has not been upgraded to %.%.%'', major, minor, patch;
|
||||
RETURN FALSE;
|
||||
END;
|
||||
' LANGUAGE plpgsql;
|
||||
|
||||
|
||||
-- Just in case these constraints got added manually, so we won't fail
|
||||
-- if there is an existing one.
|
||||
ALTER TABLE principal DROP CONSTRAINT unique_user CASCADE;
|
||||
ALTER TABLE collection DROP CONSTRAINT unique_path CASCADE;
|
||||
|
||||
CREATE or REPLACE FUNCTION real_path_exists( TEXT ) RETURNS BOOLEAN AS $$
|
||||
DECLARE
|
||||
in_path ALIAS FOR $1;
|
||||
tmp BOOLEAN;
|
||||
BEGIN
|
||||
IF in_path = '/' THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
IF in_path ~ '^/[^/]+/$' THEN
|
||||
SELECT TRUE INTO tmp FROM usr WHERE username = substring( in_path from 2 for length(in_path) - 2);
|
||||
IF FOUND THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
ELSE
|
||||
IF in_path ~ '^/.*/$' THEN
|
||||
SELECT TRUE INTO tmp FROM collection WHERE dav_name = in_path;
|
||||
IF FOUND THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
RETURN FALSE;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql ;
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,2,9);
|
||||
|
||||
ALTER TABLE dav_binding ADD UNIQUE( dav_name );
|
||||
|
||||
-- New fields for Rob Ostensen's remote binding setup
|
||||
ALTER TABLE dav_binding ADD COLUMN external_url TEXT;
|
||||
ALTER TABLE dav_binding ADD COLUMN type TEXT;
|
||||
|
||||
ALTER TABLE principal ADD CONSTRAINT unique_user UNIQUE (user_no);
|
||||
|
||||
-- Ensure we don't refer to any newer, duplicated collections
|
||||
UPDATE caldav_data SET collection_id = (SELECT min(c2.collection_id) FROM collection c1, collection c2
|
||||
WHERE c1.dav_name = c2.dav_name AND c1.collection_id = caldav_data.collection_id)
|
||||
WHERE collection_id > (SELECT min(c2.collection_id) FROM collection c1, collection c2
|
||||
WHERE c1.dav_name = c2.dav_name AND c1.collection_id = caldav_data.collection_id);
|
||||
-- Ensure the newer duplicated collections don't exist any longer
|
||||
DELETE FROM collection WHERE collection_id > (SELECT min(collection_id) FROM collection c2 WHERE c2.dav_name = collection.dav_name);
|
||||
-- Ensure we can't add more duplicates in the future
|
||||
ALTER TABLE collection ADD CONSTRAINT unique_path UNIQUE (dav_name);
|
||||
|
||||
ALTER TABLE dav_binding ADD CONSTRAINT "dav_name_does_not_exist"
|
||||
CHECK (NOT real_path_exists(dav_name));
|
||||
|
||||
-- We will use these to improve our selection criteria in future, but for now we will leave them null
|
||||
ALTER TABLE calendar_item ADD COLUMN first_instance_start TIMESTAMP WITHOUT TIME ZONE DEFAULT NULL;
|
||||
ALTER TABLE calendar_item ADD COLUMN last_instance_end TIMESTAMP WITHOUT TIME ZONE DEFAULT NULL;
|
||||
|
||||
SELECT new_db_revision(1,2,10, 'Octobre' );
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
|
||||
@ -1,49 +0,0 @@
|
||||
|
||||
-- Minor enhancement: Add columns to time_zone table to support timezone protocol changes.
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,2,10);
|
||||
|
||||
CREATE TABLE timezones (
|
||||
our_tzno SERIAL PRIMARY KEY,
|
||||
tzid TEXT UNIQUE NOT NULL,
|
||||
olson_name TEXT,
|
||||
active BOOLEAN,
|
||||
last_modified TIMESTAMP DEFAULT current_timestamp,
|
||||
etag TEXT,
|
||||
vtimezone TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE tz_aliases (
|
||||
our_tzno INT8 REFERENCES timezones(our_tzno),
|
||||
tzalias TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE tz_localnames (
|
||||
our_tzno INT8 REFERENCES timezones(our_tzno),
|
||||
locale TEXT NOT NULL,
|
||||
localised_name TEXT NOT NULL,
|
||||
preferred BOOLEAN DEFAULT TRUE
|
||||
);
|
||||
|
||||
|
||||
-- Let's assume that all timezone definitions currently present are old, and
|
||||
-- we can find newer ones. We don't really want the service feeding them out
|
||||
-- so we'll mark them inactive as well.
|
||||
INSERT INTO timezones (tzid, olson_name, active, last_modified, vtimezone, etag )
|
||||
SELECT tz_id, tz_locn, false, '1970-01-01T00:00:00Z', tz_spec, 'import' FROM time_zone;
|
||||
INSERT INTO tz_aliases (our_tzno, tzalias)
|
||||
SELECT timezones.our_tzno, tz_locn FROM time_zone LEFT JOIN timezones ON (tz_id = tzid)
|
||||
WHERE tz_locn IS NOT NULL AND tz_locn != '';
|
||||
|
||||
DROP TABLE time_zone CASCADE;
|
||||
ALTER TABLE calendar_item ADD CONSTRAINT "calendar_item_tz_id_fkey" FOREIGN KEY (tz_id) REFERENCES timezones(tzid)
|
||||
ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE;
|
||||
ALTER TABLE collection ADD CONSTRAINT "collection_timezone_fkey" FOREIGN KEY (timezone) REFERENCES timezones(tzid)
|
||||
ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE;
|
||||
|
||||
SELECT new_db_revision(1,2,11, 'Novembre' );
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
|
||||
-- Apply database indexes in support of Issue #31 Database performance improvements
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,2,11);
|
||||
|
||||
-- These two indexes improves performance of the stored function write_sync_change(), which is called on every calendar item update
|
||||
CREATE INDEX sync_tokens_collection_idx ON sync_tokens (collection_id);
|
||||
CREATE INDEX caldav_data_dav_name_idx ON caldav_data (dav_name);
|
||||
|
||||
-- Improves performance of the stored function sync_dav_id(), which is called via a trigger on any insert or update on caldav_data
|
||||
CREATE INDEX calendar_item_dav_name_idx ON calendar_item (dav_name);
|
||||
|
||||
-- Speeds up construction of CalDAVRequest, in particular when DaviCAL attempts to determine the "correct" URL for a calendar collection
|
||||
CREATE INDEX collection_dav_name_idx ON collection (dav_name);
|
||||
|
||||
|
||||
SELECT new_db_revision(1,2,12, 'Decembre' );
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
|
||||
@ -42,7 +42,7 @@ CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS '
|
||||
RETURN NEW;
|
||||
|
||||
END
|
||||
' LANGUAGE plpgsql;
|
||||
' LANGUAGE 'plpgsql';
|
||||
|
||||
-- CREATE TRIGGER caldav_data_sync_dav_id AFTER INSERT OR UPDATE ON caldav_data
|
||||
-- FOR EACH ROW EXECUTE PROCEDURE sync_dav_id();
|
||||
|
||||
@ -42,7 +42,7 @@ CREATE or REPLACE FUNCTION sync_dav_id ( ) RETURNS TRIGGER AS '
|
||||
RETURN NEW;
|
||||
|
||||
END
|
||||
' LANGUAGE plpgsql;
|
||||
' LANGUAGE 'plpgsql';
|
||||
|
||||
-- CREATE TRIGGER caldav_data_sync_dav_id AFTER INSERT OR UPDATE ON caldav_data
|
||||
-- FOR EACH ROW EXECUTE PROCEDURE sync_dav_id();
|
||||
|
||||
@ -1,573 +0,0 @@
|
||||
|
||||
-- This database update converts the permissions into a bitmap stored
|
||||
-- as an integer to make calculation of merged permissions simpler
|
||||
-- through simple binary 'AND'
|
||||
|
||||
CREATE or REPLACE FUNCTION legacy_privilege_to_bits( TEXT ) RETURNS BIT(24) AS $$
|
||||
DECLARE
|
||||
in_priv ALIAS FOR $1;
|
||||
out_bits BIT(24);
|
||||
BEGIN
|
||||
out_bits := 0::BIT(24);
|
||||
IF in_priv ~* 'A' THEN
|
||||
out_bits = ~ out_bits;
|
||||
RETURN out_bits;
|
||||
END IF;
|
||||
|
||||
-- The CALDAV:read-free-busy privilege MUST be aggregated in the DAV:read privilege.
|
||||
-- 1 DAV:read
|
||||
-- 512 CalDAV:read-free-busy
|
||||
-- 4096 CALDAV:schedule-query-freebusy
|
||||
IF in_priv ~* 'R' THEN
|
||||
out_bits := out_bits | 4609::BIT(24);
|
||||
END IF;
|
||||
|
||||
-- DAV:write => DAV:write MUST contain DAV:bind, DAV:unbind, DAV:write-properties and DAV:write-content
|
||||
-- 2 DAV:write-properties
|
||||
-- 4 DAV:write-content
|
||||
-- 64 DAV:bind
|
||||
-- 128 DAV:unbind
|
||||
IF in_priv ~* 'W' THEN
|
||||
out_bits := out_bits | 198::BIT(24);
|
||||
END IF;
|
||||
|
||||
-- 64 DAV:bind
|
||||
IF in_priv ~* 'B' THEN
|
||||
out_bits := out_bits | 64::BIT(24);
|
||||
END IF;
|
||||
|
||||
-- 128 DAV:unbind
|
||||
IF in_priv ~* 'U' THEN
|
||||
out_bits := out_bits | 128::BIT(24);
|
||||
END IF;
|
||||
|
||||
-- 512 CalDAV:read-free-busy
|
||||
-- 4096 CALDAV:schedule-query-freebusy
|
||||
IF in_priv ~* 'F' THEN
|
||||
out_bits := out_bits | 4608::BIT(24);
|
||||
END IF;
|
||||
|
||||
RETURN out_bits;
|
||||
END
|
||||
$$
|
||||
LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
-- This legacy conversion function will eventually be removed, once all logic
|
||||
-- has been converted to use bitmaps, or to use the bits_to_priv() output.
|
||||
--
|
||||
-- NOTE: Round-trip through this and then back through legacy_privilege_to_bits
|
||||
-- function is lossy! Through legacy_privilege_to_bits() and back through
|
||||
-- this one is not.
|
||||
--
|
||||
CREATE or REPLACE FUNCTION bits_to_legacy_privilege( BIT(24) ) RETURNS TEXT AS $$
|
||||
DECLARE
|
||||
in_bits ALIAS FOR $1;
|
||||
out_priv TEXT;
|
||||
BEGIN
|
||||
out_priv := '';
|
||||
IF in_bits = (~ 0::BIT(24)) THEN
|
||||
out_priv = 'A';
|
||||
RETURN out_priv;
|
||||
END IF;
|
||||
|
||||
-- The CALDAV:read-free-busy privilege MUST be aggregated in the DAV:read privilege.
|
||||
-- 1 DAV:read
|
||||
-- 512 CalDAV:read-free-busy
|
||||
-- 4096 CALDAV:schedule-query-freebusy
|
||||
IF (in_bits & 4609::BIT(24)) != 0::BIT(24) THEN
|
||||
IF (in_bits & 1::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := 'R';
|
||||
ELSE
|
||||
out_priv := 'F';
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
-- DAV:write => DAV:write MUST contain DAV:bind, DAV:unbind, DAV:write-properties and DAV:write-content
|
||||
-- 2 DAV:write-properties
|
||||
-- 4 DAV:write-content
|
||||
-- 64 DAV:bind
|
||||
-- 128 DAV:unbind
|
||||
IF (in_bits & 198::BIT(24)) != 0::BIT(24) THEN
|
||||
IF (in_bits & 6::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || 'W';
|
||||
ELSE
|
||||
IF (in_bits & 64::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || 'B';
|
||||
END IF;
|
||||
IF (in_bits & 128::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || 'U';
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
RETURN out_priv;
|
||||
END
|
||||
$$
|
||||
LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
CREATE or REPLACE FUNCTION get_permissions( INT, INT ) RETURNS TEXT AS $$
|
||||
DECLARE
|
||||
in_from ALIAS FOR $1;
|
||||
in_to ALIAS FOR $2;
|
||||
out_confers TEXT;
|
||||
bit_confers BIT(24);
|
||||
group_role_no INT;
|
||||
tmp_txt TEXT;
|
||||
dbg TEXT DEFAULT '';
|
||||
r RECORD;
|
||||
counter INT;
|
||||
BEGIN
|
||||
-- Self can always have full access
|
||||
IF in_from = in_to THEN
|
||||
RETURN 'A';
|
||||
END IF;
|
||||
|
||||
-- dbg := 'S-';
|
||||
SELECT bits_to_legacy_privilege(r1.confers) INTO out_confers FROM relationship r1
|
||||
WHERE r1.from_user = in_from AND r1.to_user = in_to AND NOT usr_is_role(r1.to_user,'Group');
|
||||
IF FOUND THEN
|
||||
RETURN dbg || out_confers;
|
||||
END IF;
|
||||
-- RAISE NOTICE 'No simple relationships between % and %', in_from, in_to;
|
||||
|
||||
SELECT bit_or(r1.confers & r2.confers) INTO bit_confers
|
||||
FROM relationship r1
|
||||
JOIN relationship r2 ON r1.to_user=r2.from_user
|
||||
WHERE r1.from_user=in_from AND r2.to_user=in_to
|
||||
AND r2.from_user IN (SELECT user_no FROM roles LEFT JOIN role_member USING(role_no) WHERE role_name='Group');
|
||||
IF bit_confers != 0::BIT(24) THEN
|
||||
RETURN dbg || bits_to_legacy_privilege(bit_confers);
|
||||
END IF;
|
||||
|
||||
RETURN '';
|
||||
-- RAISE NOTICE 'No complex relationships between % and %', in_from, in_to;
|
||||
|
||||
SELECT bits_to_legacy_privilege(r1.confers) INTO out_confers FROM relationship r1 LEFT OUTER JOIN relationship r2 ON(r1.to_user = r2.to_user)
|
||||
WHERE r1.from_user = in_from AND r2.from_user = in_to AND r1.from_user != r2.from_user
|
||||
AND NOT EXISTS( SELECT 1 FROM relationship r3 WHERE r3.from_user = r1.to_user ) ;
|
||||
|
||||
IF FOUND THEN
|
||||
-- dbg := 'H-';
|
||||
-- RAISE NOTICE 'Permissions to shared group % ', out_confers;
|
||||
RETURN dbg || out_confers;
|
||||
END IF;
|
||||
|
||||
-- RAISE NOTICE 'No common group relationships between % and %', in_from, in_to;
|
||||
|
||||
RETURN '';
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
|
||||
CREATE or REPLACE FUNCTION get_group_role_no() RETURNS INT AS $$
|
||||
SELECT role_no FROM roles WHERE role_name = 'Group'
|
||||
$$ LANGUAGE sql IMMUTABLE;
|
||||
|
||||
CREATE or REPLACE FUNCTION has_legacy_privilege( INT, TEXT, INT ) RETURNS BOOLEAN AS $$
|
||||
DECLARE
|
||||
in_from ALIAS FOR $1;
|
||||
in_legacy_privilege ALIAS FOR $2;
|
||||
in_to ALIAS FOR $3;
|
||||
in_confers BIT(24);
|
||||
group_role_no INT;
|
||||
BEGIN
|
||||
-- Self can always have full access
|
||||
IF in_from = in_to THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
|
||||
SELECT get_group_role_no() INTO group_role_no;
|
||||
SELECT legacy_privilege_to_bits(in_legacy_privilege) INTO in_confers;
|
||||
|
||||
IF EXISTS(SELECT 1 FROM relationship WHERE from_user = in_from AND to_user = in_to
|
||||
AND (in_confers & confers) = in_confers
|
||||
AND NOT EXISTS(SELECT 1 FROM role_member WHERE to_user = user_no AND role_no = group_role_no) ) THEN
|
||||
-- A direct relationship from A to B that grants sufficient
|
||||
-- RAISE NOTICE 'Permissions directly granted';
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
|
||||
IF EXISTS( SELECT 1 FROM relationship r1 JOIN relationship r2 ON r1.to_user=r2.from_user
|
||||
WHERE (in_confers & r1.confers & r2.confers) = in_confers
|
||||
AND r1.from_user=in_from AND r2.to_user=in_to
|
||||
AND r2.from_user IN (SELECT user_no FROM role_member WHERE role_no=group_role_no) ) THEN
|
||||
-- An indirect relationship from A to B via group G that grants sufficient
|
||||
-- RAISE NOTICE 'Permissions mediated via group';
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
|
||||
IF EXISTS( SELECT 1 FROM relationship r1 JOIN relationship r2 ON r1.to_user=r2.to_user
|
||||
WHERE (in_confers & r1.confers & r2.confers) = in_confers
|
||||
AND r1.from_user=in_from AND r2.from_user=in_to
|
||||
AND r2.to_user IN (SELECT user_no FROM role_member WHERE role_no=group_role_no)
|
||||
AND NOT EXISTS(SELECT 1 FROM relationship WHERE from_user=r2.to_user) ) THEN
|
||||
-- An indirect reflexive relationship from both A & B to group G which grants sufficient
|
||||
-- RAISE NOTICE 'Permissions to shared group';
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
|
||||
-- RAISE NOTICE 'No common group relationships between % and %', in_from, in_to;
|
||||
|
||||
RETURN FALSE;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
|
||||
-- Given a verbose DAV: or CalDAV: privilege name return the bitmask
|
||||
CREATE or REPLACE FUNCTION privilege_to_bits( TEXT ) RETURNS BIT(24) AS $$
|
||||
DECLARE
|
||||
raw_priv ALIAS FOR $1;
|
||||
in_priv TEXT;
|
||||
BEGIN
|
||||
in_priv := trim(lower(regexp_replace(raw_priv, '^.*:', '')));
|
||||
IF in_priv = 'all' THEN
|
||||
RETURN ~ 0::BIT(24);
|
||||
END IF;
|
||||
|
||||
RETURN (CASE
|
||||
WHEN in_priv = 'read' THEN 1
|
||||
WHEN in_priv = 'write' THEN 198 -- 2 + 4 + 64 + 128
|
||||
WHEN in_priv = 'write-properties' THEN 2
|
||||
WHEN in_priv = 'write-content' THEN 4
|
||||
WHEN in_priv = 'unlock' THEN 8
|
||||
WHEN in_priv = 'read-acl' THEN 16
|
||||
WHEN in_priv = 'read-current-user-privilege-set' THEN 32
|
||||
WHEN in_priv = 'bind' THEN 64
|
||||
WHEN in_priv = 'unbind' THEN 128
|
||||
WHEN in_priv = 'write-acl' THEN 256
|
||||
WHEN in_priv = 'read-free-busy' THEN 512
|
||||
WHEN in_priv = 'schedule-deliver' THEN 7168 -- 1024 + 2048 + 4096
|
||||
WHEN in_priv = 'schedule-deliver-invite' THEN 1024
|
||||
WHEN in_priv = 'schedule-deliver-reply' THEN 2048
|
||||
WHEN in_priv = 'schedule-query-freebusy' THEN 4096
|
||||
WHEN in_priv = 'schedule-send' THEN 57344 -- 8192 + 16384 + 32768
|
||||
WHEN in_priv = 'schedule-send-invite' THEN 8192
|
||||
WHEN in_priv = 'schedule-send-reply' THEN 16384
|
||||
WHEN in_priv = 'schedule-send-freebusy' THEN 32768
|
||||
ELSE 0 END)::BIT(24);
|
||||
END
|
||||
$$
|
||||
LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
|
||||
-- Given an array of verbose DAV: or CalDAV: privilege names return the bitmask
|
||||
CREATE or REPLACE FUNCTION privilege_to_bits( TEXT[] ) RETURNS BIT(24) AS $$
|
||||
DECLARE
|
||||
raw_privs ALIAS FOR $1;
|
||||
in_priv TEXT;
|
||||
out_bits BIT(24);
|
||||
i INT;
|
||||
all_privs BIT(24);
|
||||
start INT;
|
||||
finish INT;
|
||||
BEGIN
|
||||
out_bits := 0::BIT(24);
|
||||
all_privs := ~ out_bits;
|
||||
SELECT array_lower(raw_privs,1) INTO start;
|
||||
SELECT array_upper(raw_privs,1) INTO finish;
|
||||
FOR i IN start .. finish LOOP
|
||||
SELECT out_bits | privilege_to_bits(raw_privs[i]) INTO out_bits;
|
||||
IF out_bits = 65535::BIT(24) THEN
|
||||
RETURN all_privs;
|
||||
END IF;
|
||||
END LOOP;
|
||||
RETURN out_bits;
|
||||
END
|
||||
$$
|
||||
LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
|
||||
-- This legacy conversion function will eventually be removed, once all logic
|
||||
-- has been converted to use bitmaps, or to use the bits_to_priv() output.
|
||||
--
|
||||
-- NOTE: Round-trip through this and then back through privilege_to_bits
|
||||
-- function is lossy! Through privilege_to_bits() and back through
|
||||
-- this one is not.
|
||||
--
|
||||
CREATE or REPLACE FUNCTION bits_to_privilege( BIT(24) ) RETURNS TEXT[] AS $$
|
||||
DECLARE
|
||||
in_bits ALIAS FOR $1;
|
||||
out_priv TEXT[];
|
||||
BEGIN
|
||||
IF in_bits = (~ 0::BIT(24)) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:all'];
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 513::BIT(24)) != 0::BIT(24) THEN
|
||||
IF (in_bits & 1::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:read'];
|
||||
END IF;
|
||||
IF (in_bits & 512::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:read-free-busy'];
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 198::BIT(24)) != 0::BIT(24) THEN
|
||||
IF (in_bits & 198::BIT(24)) = 198::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:write'];
|
||||
ELSE
|
||||
IF (in_bits & 2::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:write-properties'];
|
||||
END IF;
|
||||
IF (in_bits & 4::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:write-content'];
|
||||
END IF;
|
||||
IF (in_bits & 64::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:bind'];
|
||||
END IF;
|
||||
IF (in_bits & 128::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:unbind'];
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 8::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:unlock'];
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 16::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:read-acl'];
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 32::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:read-current-user-privilege-set'];
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 256::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['DAV:write-acl'];
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 7168::BIT(24)) != 0::BIT(24) THEN
|
||||
IF (in_bits & 7168::BIT(24)) = 7168::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-deliver'];
|
||||
ELSE
|
||||
IF (in_bits & 1024::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-deliver-invite'];
|
||||
END IF;
|
||||
IF (in_bits & 2048::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-deliver-reply'];
|
||||
END IF;
|
||||
IF (in_bits & 4096::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-query-freebusy'];
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
IF (in_bits & 57344::BIT(24)) != 0::BIT(24) THEN
|
||||
IF (in_bits & 57344::BIT(24)) = 57344::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-send'];
|
||||
ELSE
|
||||
IF (in_bits & 8192::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-send-invite'];
|
||||
END IF;
|
||||
IF (in_bits & 16384::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-send-reply'];
|
||||
END IF;
|
||||
IF (in_bits & 32768::BIT(24)) != 0::BIT(24) THEN
|
||||
out_priv := out_priv || ARRAY['caldav:schedule-send-freebusy'];
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
RETURN out_priv;
|
||||
END
|
||||
$$
|
||||
LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,2,5);
|
||||
|
||||
|
||||
-- DAV Privileges implementation
|
||||
--
|
||||
-- RFC 3744 - DAV ACLs
|
||||
-- 1 DAV:read
|
||||
-- DAV:write (aggregate = 198 = write-properties & write-content & bind & unbind)
|
||||
-- 2 DAV:write-properties
|
||||
-- 4 DAV:write-content
|
||||
-- 8 DAV:unlock
|
||||
-- 16 DAV:read-acl
|
||||
-- 32 DAV:read-current-user-privilege-set
|
||||
-- 64 DAV:bind
|
||||
-- 128 DAV:unbind
|
||||
-- 256 DAV:write-acl
|
||||
|
||||
-- RFC 4791 - CalDAV
|
||||
-- 512 CalDAV:read-free-busy
|
||||
|
||||
-- RFC ???? - Scheduling Extensions for CalDAV
|
||||
-- CALDAV:schedule-deliver (aggregate) => 7168
|
||||
-- 1024 CALDAV:schedule-deliver-invite
|
||||
-- 2048 CALDAV:schedule-deliver-reply
|
||||
-- 4096 CALDAV:schedule-query-freebusy
|
||||
-- CALDAV:schedule-send (aggregate) => 57344
|
||||
-- 8192 CALDAV:schedule-send-invite
|
||||
-- 16384 CALDAV:schedule-send-reply
|
||||
-- 32768 CALDAV:schedule-send-freebusy
|
||||
|
||||
-- RFC 3744 - DAV ACLs
|
||||
-- DAV:all => all of the above and any new ones someone might invent!
|
||||
|
||||
-- DAV:read-acl MUST NOT contain DAV:read, DAV:write, DAV:write-acl, DAV:write-properties, DAV:write-content, or DAV:read-current-user-privilege-set.
|
||||
-- DAV:write-acl MUST NOT contain DAV:write, DAV:read, DAV:read-acl, DAV:read-current-user-privilege-set.
|
||||
-- DAV:read-current-user-privilege-set MUST NOT contain DAV:write, DAV:read, DAV:read-acl, or DAV:write-acl.
|
||||
-- DAV:write MUST NOT contain DAV:read, DAV:read-acl, or DAV:read-current-user-privilege-set.
|
||||
-- DAV:read MUST NOT contain DAV:write, DAV:write-acl, DAV:write-properties, or DAV:write-content.
|
||||
-- DAV:write-acl COULD contain DAV:write-properties DAV:write-content DAV:unlock DAV:bind DAV:unbind BUT why would it?
|
||||
|
||||
-- DAV:write => DAV:bind, DAV:unbind, DAV:write-properties and DAV:write-content
|
||||
|
||||
-- RFC 4791 - CalDAV
|
||||
-- The CALDAV:read-free-busy privilege MUST be aggregated in the DAV:read privilege.
|
||||
|
||||
-- RFC ???? - Scheduling Extensions for CalDAV
|
||||
-- DAV:all MUST contain CALDAV:schedule-send and CALDAV:schedule-deliver
|
||||
-- CALDAV:schedule-send MUST contain CALDAV:schedule-send-invite, CALDAV:schedule-send-reply, and CALDAV:schedule-send-freebusy;
|
||||
-- CALDAV:schedule-deliver MUST contain CALDAV:schedule-deliver-invite, CALDAV:schedule-deliver-reply, and CALDAV:schedule-query-freebusy.
|
||||
|
||||
|
||||
-- Me!!!
|
||||
-- CalDAV:read-free-busy privilege SHOULD contain CALDAV:schedule-query-freebusy
|
||||
-- => DAV:read privilege SHOULD contain CALDAV:schedule-query-freebusy
|
||||
-- We do this outside of these privileges though.
|
||||
|
||||
|
||||
-- This legacy conversion function will eventually be removed, once all logic
|
||||
-- has been converted to use bitmaps, or to use the bits_to_priv() output.
|
||||
CREATE or REPLACE FUNCTION legacy_privilege_to_bits( TEXT ) RETURNS BIT(24) AS $$
|
||||
DECLARE
|
||||
in_priv ALIAS FOR $1;
|
||||
out_bits BIT(24);
|
||||
BEGIN
|
||||
out_bits := 0::BIT(24);
|
||||
IF in_priv ~* 'A' THEN
|
||||
out_bits = ~ out_bits;
|
||||
RETURN out_bits;
|
||||
END IF;
|
||||
|
||||
-- The CALDAV:read-free-busy privilege MUST be aggregated in the DAV:read privilege.
|
||||
-- 1 DAV:read
|
||||
-- 512 CalDAV:read-free-busy
|
||||
-- 4096 CALDAV:schedule-query-freebusy
|
||||
IF in_priv ~* 'R' THEN
|
||||
out_bits := out_bits | 4609::BIT(24);
|
||||
END IF;
|
||||
|
||||
-- DAV:write => DAV:write MUST contain DAV:bind, DAV:unbind, DAV:write-properties and DAV:write-content
|
||||
-- 2 DAV:write-properties
|
||||
-- 4 DAV:write-content
|
||||
-- 64 DAV:bind
|
||||
-- 128 DAV:unbind
|
||||
IF in_priv ~* 'W' THEN
|
||||
out_bits := out_bits | 198::BIT(24);
|
||||
END IF;
|
||||
|
||||
-- 64 DAV:bind
|
||||
IF in_priv ~* 'B' THEN
|
||||
out_bits := out_bits | 64::BIT(24);
|
||||
END IF;
|
||||
|
||||
-- 128 DAV:unbind
|
||||
IF in_priv ~* 'U' THEN
|
||||
out_bits := out_bits | 128::BIT(24);
|
||||
END IF;
|
||||
|
||||
-- 512 CalDAV:read-free-busy
|
||||
-- 4096 CALDAV:schedule-query-freebusy
|
||||
IF in_priv ~* 'F' THEN
|
||||
out_bits := out_bits | 4608::BIT(24);
|
||||
END IF;
|
||||
|
||||
RETURN out_bits;
|
||||
END
|
||||
$$
|
||||
LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
|
||||
ALTER TABLE relationship_type ADD COLUMN bit_confers BIT(24) DEFAULT privilege_to_bits(ARRAY['DAV::read','DAV::write']);
|
||||
UPDATE relationship_type SET bit_confers = legacy_privilege_to_bits(confers);
|
||||
|
||||
ALTER TABLE relationship ADD COLUMN confers BIT(24) DEFAULT privilege_to_bits('caldav:read-free-busy');
|
||||
UPDATE relationship SET confers = (SELECT bit_confers FROM relationship_type AS rt WHERE rt.rt_id=relationship.rt_id);
|
||||
|
||||
ALTER TABLE collection ADD COLUMN default_privileges BIT(24);
|
||||
|
||||
INSERT INTO principal_type (principal_type_id, principal_type_desc) VALUES( 1, 'Person' );
|
||||
INSERT INTO principal_type (principal_type_id, principal_type_desc) VALUES( 2, 'Resource' );
|
||||
INSERT INTO principal_type (principal_type_id, principal_type_desc) VALUES( 3, 'Group' );
|
||||
|
||||
-- web needs SELECT,INSERT,UPDATE,DELETE
|
||||
DROP TABLE principal CASCADE;
|
||||
CREATE TABLE principal (
|
||||
principal_id INT8 DEFAULT nextval('dav_id_seq') PRIMARY KEY,
|
||||
type_id INT8 NOT NULL REFERENCES principal_type(principal_type_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE,
|
||||
user_no INT8 NULL REFERENCES usr(user_no) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
displayname TEXT,
|
||||
default_privileges BIT(24)
|
||||
);
|
||||
|
||||
INSERT INTO principal (type_id, user_no, displayname, default_privileges)
|
||||
SELECT 1, user_no, fullname, privilege_to_bits(ARRAY['read-free-busy','schedule-send','schedule-deliver']) FROM usr
|
||||
WHERE NOT EXISTS(SELECT 1 FROM role_member JOIN roles USING(role_no) WHERE role_name = 'Group' AND role_member.user_no = usr.user_no)
|
||||
AND NOT EXISTS(SELECT 1 FROM role_member JOIN roles USING(role_no) WHERE role_name = 'Resource' AND role_member.user_no = usr.user_no) ;
|
||||
|
||||
INSERT INTO principal (type_id, user_no, displayname, default_privileges)
|
||||
SELECT 2, user_no, fullname, privilege_to_bits(ARRAY['read','schedule-send','schedule-deliver']) FROM usr
|
||||
WHERE EXISTS(SELECT 1 FROM role_member JOIN roles USING(role_no) WHERE role_name = 'Resource' AND role_member.user_no = usr.user_no);
|
||||
|
||||
INSERT INTO principal (type_id, user_no, displayname, default_privileges)
|
||||
SELECT 3, user_no, fullname, privilege_to_bits(ARRAY['read-free-busy','schedule-send','schedule-deliver']) FROM usr
|
||||
WHERE EXISTS(SELECT 1 FROM role_member JOIN roles USING(role_no) WHERE role_name = 'Group' AND role_member.user_no = usr.user_no);
|
||||
|
||||
UPDATE collection SET default_privileges = CASE
|
||||
WHEN publicly_readable THEN privilege_to_bits(ARRAY['read'])
|
||||
ELSE NULL
|
||||
END;
|
||||
|
||||
INSERT INTO group_member ( group_id, member_id)
|
||||
SELECT g.principal_id, m.principal_id
|
||||
FROM relationship JOIN principal g ON(to_user=g.user_no AND g.type_id = 3) -- Group
|
||||
JOIN principal m ON(from_user=m.user_no AND m.type_id IN (1, 2) ); -- Person or Resource
|
||||
|
||||
DROP TABLE dav_resource_type CASCADE;
|
||||
DROP TABLE dav_resource CASCADE;
|
||||
DROP TABLE privilege CASCADE;
|
||||
|
||||
CREATE TABLE grants (
|
||||
by_principal INT8 REFERENCES principal(principal_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
by_collection INT8 REFERENCES collection(collection_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
to_principal INT8 REFERENCES principal(principal_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
privileges BIT(24),
|
||||
is_group BOOLEAN
|
||||
) WITHOUT OIDS;
|
||||
CREATE UNIQUE INDEX grants_pk1 ON grants(by_principal,to_principal);
|
||||
CREATE UNIQUE INDEX grants_pk2 ON grants(by_collection,to_principal);
|
||||
|
||||
|
||||
INSERT INTO grants ( by_principal, to_principal, privileges, is_group )
|
||||
SELECT pby.principal_id AS by_principal, pto.principal_id AS to_principal,
|
||||
confers AS privileges, pto.type_id > 2 AS is_group
|
||||
FROM relationship r JOIN usr f ON(f.user_no=r.from_user)
|
||||
JOIN usr t ON(t.user_no=r.to_user)
|
||||
JOIN principal pby ON(t.user_no=pby.user_no)
|
||||
JOIN principal pto ON(pto.user_no=f.user_no)
|
||||
WHERE rt_id < 4 AND pby.type_id < 3;
|
||||
|
||||
-- It's always safe to kill these collections, so they will be recreated with the correct resourcetype
|
||||
DELETE FROM collection WHERE dav_name ~ E'/\.(in|out)/$';
|
||||
|
||||
SELECT new_db_revision(1,2,6, 'Juin' );
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
|
||||
@ -1,79 +0,0 @@
|
||||
|
||||
-- This database update adds support for the draft webdav-sync specification
|
||||
-- as well as some initial support for addressbook collections which will
|
||||
-- be needed to support carddav.
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,2,6);
|
||||
|
||||
CREATE TABLE sync_tokens (
|
||||
sync_token SERIAL PRIMARY KEY,
|
||||
collection_id INT8 REFERENCES collection(collection_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
modification_time TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp
|
||||
);
|
||||
|
||||
CREATE TABLE sync_changes (
|
||||
sync_time TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp,
|
||||
collection_id INT8 REFERENCES collection(collection_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
sync_status INT,
|
||||
dav_id INT8, -- can't REFERENCES calendar_item(dav_id) ON DELETE SET NULL ON UPDATE RESTRICT
|
||||
dav_name TEXT
|
||||
);
|
||||
CREATE INDEX sync_processing_index ON sync_changes( collection_id, dav_id, sync_time );
|
||||
|
||||
ALTER TABLE collection ADD COLUMN is_addressbook BOOLEAN DEFAULT FALSE;
|
||||
ALTER TABLE collection ADD COLUMN resourcetypes TEXT DEFAULT '<DAV::collection/>';
|
||||
ALTER TABLE collection ADD COLUMN in_freebusy_set BOOLEAN DEFAULT TRUE;
|
||||
ALTER TABLE collection ADD COLUMN schedule_transp TEXT DEFAULT 'opaque';
|
||||
ALTER TABLE collection ADD COLUMN timezone TEXT REFERENCES time_zone(tz_id) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
ALTER TABLE collection ADD COLUMN description TEXT DEFAULT '';
|
||||
|
||||
UPDATE collection SET resourcetypes = '<DAV::collection/><urn:ietf:params:xml:ns:caldav:calendar/>' WHERE is_calendar;
|
||||
|
||||
SELECT new_db_revision(1,2,7, 'Juillet' );
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
|
||||
|
||||
CREATE or REPLACE FUNCTION write_sync_change( INT8, INT, TEXT ) RETURNS BOOLEAN AS $$
|
||||
DECLARE
|
||||
in_collection_id ALIAS FOR $1;
|
||||
in_status ALIAS FOR $2;
|
||||
in_dav_name ALIAS FOR $3;
|
||||
tmp_int INT8;
|
||||
BEGIN
|
||||
SELECT 1 INTO tmp_int FROM sync_tokens
|
||||
WHERE collection_id = in_collection_id
|
||||
LIMIT 1;
|
||||
IF NOT FOUND THEN
|
||||
RETURN FALSE;
|
||||
END IF;
|
||||
SELECT dav_id INTO tmp_int FROM calendar_item WHERE dav_name = in_dav_name;
|
||||
INSERT INTO sync_changes ( collection_id, sync_status, dav_id, dav_name)
|
||||
VALUES( in_collection_id, in_status, tmp_int, in_dav_name);
|
||||
RETURN TRUE;
|
||||
END
|
||||
$$ LANGUAGE plpgsql VOLATILE STRICT;
|
||||
|
||||
|
||||
CREATE or REPLACE FUNCTION new_sync_token( INT8, INT8 ) RETURNS INT8 AS $$
|
||||
DECLARE
|
||||
in_old_sync_token ALIAS FOR $1;
|
||||
in_collection_id ALIAS FOR $2;
|
||||
tmp_int INT8;
|
||||
BEGIN
|
||||
IF in_old_sync_token > 0 THEN
|
||||
SELECT 1 INTO tmp_int FROM sync_changes
|
||||
WHERE collection_id = in_collection_id
|
||||
AND sync_time > (SELECT modification_time FROM sync_tokens WHERE sync_token = in_old_sync_token)
|
||||
LIMIT 1;
|
||||
IF NOT FOUND THEN
|
||||
RETURN in_old_sync_token;
|
||||
END IF;
|
||||
END IF;
|
||||
SELECT nextval('sync_tokens_sync_token_seq') INTO tmp_int;
|
||||
INSERT INTO sync_tokens(collection_id, sync_token) VALUES( in_collection_id, tmp_int );
|
||||
RETURN tmp_int;
|
||||
END
|
||||
$$ LANGUAGE plpgsql STRICT;
|
||||
@ -1,95 +0,0 @@
|
||||
|
||||
-- This database update adds support for tickets to be handed out to grant
|
||||
-- specific access to a collection or individual resource, as read-only or
|
||||
-- read-write. A table is also added to manage WebDAV binding, in line
|
||||
-- with http://tools.ietf.org/html/draft-ietf-webdav-bind.
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,2,7);
|
||||
|
||||
ALTER TABLE caldav_data ADD COLUMN weak_etag TEXT DEFAULT NULL;
|
||||
ALTER TABLE collection DROP COLUMN in_freebusy_set;
|
||||
|
||||
CREATE TABLE access_ticket (
|
||||
ticket_id TEXT PRIMARY KEY,
|
||||
dav_owner_id INT8 NOT NULL REFERENCES principal(principal_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
privileges BIT(24),
|
||||
target_collection_id INT8 NOT NULL REFERENCES collection(collection_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
target_resource_id INT8 REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
expires TIMESTAMP
|
||||
);
|
||||
|
||||
|
||||
-- At this point we only support binding collections
|
||||
CREATE TABLE dav_binding (
|
||||
bind_id INT8 DEFAULT nextval('dav_id_seq') PRIMARY KEY,
|
||||
bound_source_id INT8 REFERENCES collection(collection_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
access_ticket_id TEXT REFERENCES access_ticket(ticket_id) ON UPDATE CASCADE ON DELETE SET NULL,
|
||||
dav_owner_id INT8 NOT NULL REFERENCES principal(principal_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
parent_container TEXT NOT NULL,
|
||||
dav_name TEXT UNIQUE NOT NULL,
|
||||
dav_displayname TEXT
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE addressbook_resource (
|
||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE PRIMARY KEY,
|
||||
version TEXT,
|
||||
uid TEXT,
|
||||
nickname TEXT,
|
||||
fn TEXT, -- fullname
|
||||
n TEXT, -- Name Surname;First names
|
||||
note TEXT,
|
||||
org TEXT,
|
||||
url TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE addressbook_address_adr (
|
||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
type TEXT,
|
||||
adr TEXT,
|
||||
property TEXT -- The full text of the property
|
||||
);
|
||||
|
||||
CREATE TABLE addressbook_address_tel (
|
||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
type TEXT,
|
||||
tel TEXT,
|
||||
property TEXT -- The full text of the property
|
||||
);
|
||||
|
||||
CREATE TABLE addressbook_address_email (
|
||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
type TEXT,
|
||||
email TEXT,
|
||||
property TEXT -- The full text of the property
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE calendar_alarm (
|
||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
action TEXT,
|
||||
trigger TEXT,
|
||||
summary TEXT,
|
||||
description TEXT,
|
||||
next_trigger TIMESTAMP WITH TIME ZONE,
|
||||
component TEXT -- The full text of the component
|
||||
);
|
||||
|
||||
CREATE TABLE calendar_attendee (
|
||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
status TEXT,
|
||||
partstat TEXT,
|
||||
cn TEXT,
|
||||
attendee TEXT,
|
||||
role TEXT,
|
||||
rsvp BOOLEAN,
|
||||
property TEXT, -- The full text of the property
|
||||
PRIMARY KEY ( dav_id, attendee )
|
||||
);
|
||||
|
||||
SELECT new_db_revision(1,2,8, 'Août' );
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
|
||||
-- This database update adds some extra columns / tables for tracking
|
||||
-- alarms, attendee states and addressbook address field expansion.
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,2,8);
|
||||
|
||||
-- Kind of important to have these as first-class citizens
|
||||
ALTER TABLE addressbook_resource ADD COLUMN fburl TEXT DEFAULT NULL;
|
||||
ALTER TABLE addressbook_resource ADD COLUMN caluri TEXT DEFAULT NULL;
|
||||
ALTER TABLE addressbook_resource ADD COLUMN caladruri TEXT DEFAULT NULL;
|
||||
|
||||
DROP TABLE addressbook_address_adr CASCADE;
|
||||
CREATE TABLE addressbook_address_adr (
|
||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
type TEXT,
|
||||
box_no TEXT,
|
||||
unit_no TEXT,
|
||||
street_address TEXT,
|
||||
locality TEXT,
|
||||
region TEXT,
|
||||
postcode TEXT,
|
||||
country TEXT,
|
||||
property TEXT -- The full text of the property
|
||||
);
|
||||
|
||||
-- 'N' => 'New/Needs setting', 'A' = 'Active', 'O' = 'Old'
|
||||
ALTER TABLE calendar_alarm ADD COLUMN trigger_state CHAR DEFAULT 'N';
|
||||
|
||||
-- Internal DAViCal calendar state
|
||||
ALTER TABLE calendar_attendee ADD COLUMN attendee_state TEXT;
|
||||
ALTER TABLE calendar_attendee ADD COLUMN weak_etag TEXT;
|
||||
|
||||
SELECT new_db_revision(1,2,9, 'Septembre' );
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
|
||||
-- Notable enhancement: Add/Alter tables for dealing with remote attendee handling
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,2,12);
|
||||
|
||||
|
||||
CREATE TABLE calendar_attendee_email_status (
|
||||
email_status_id INT8 PRIMARY KEY,
|
||||
description TEXT NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO calendar_attendee_email_status (email_status_id, description)
|
||||
VALUES
|
||||
(1, 'waiting for invitation to be sent'),
|
||||
(2, 'invitation has been sent'),
|
||||
(3, 'waiting for schedule change to be sent'),
|
||||
(4, 'schedule change has been sent'),
|
||||
(11, 'attendee has accepted'),
|
||||
(12, 'attendee indicated maybe'),
|
||||
(13, 'attendee has refused')
|
||||
;
|
||||
|
||||
|
||||
ALTER TABLE calendar_attendee
|
||||
ADD COLUMN email_status INT REFERENCES calendar_attendee_email_status(email_status_id) DEFAULT 1 NOT NULL ;
|
||||
|
||||
ALTER TABLE calendar_attendee
|
||||
ADD COLUMN is_remote BOOLEAN DEFAULT FALSE;
|
||||
|
||||
-- A new year! http://blogs.transparent.com/polish/names-of-the-months-and-their-meaning/
|
||||
SELECT new_db_revision(1,3,1, 'Styczeń' );
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
|
||||
-- Notable enhancement: Sequence counters for reporting metrics for monitoring.
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,3,1);
|
||||
|
||||
CREATE SEQUENCE metrics_count_get;
|
||||
CREATE SEQUENCE metrics_count_put;
|
||||
CREATE SEQUENCE metrics_count_propfind;
|
||||
CREATE SEQUENCE metrics_count_proppatch;
|
||||
CREATE SEQUENCE metrics_count_report;
|
||||
CREATE SEQUENCE metrics_count_head;
|
||||
CREATE SEQUENCE metrics_count_options;
|
||||
CREATE SEQUENCE metrics_count_post;
|
||||
CREATE SEQUENCE metrics_count_mkcalendar;
|
||||
CREATE SEQUENCE metrics_count_mkcol;
|
||||
CREATE SEQUENCE metrics_count_delete;
|
||||
CREATE SEQUENCE metrics_count_move;
|
||||
CREATE SEQUENCE metrics_count_acl;
|
||||
CREATE SEQUENCE metrics_count_lock;
|
||||
CREATE SEQUENCE metrics_count_unlock;
|
||||
CREATE SEQUENCE metrics_count_mkticket;
|
||||
CREATE SEQUENCE metrics_count_delticket;
|
||||
CREATE SEQUENCE metrics_count_bind;
|
||||
CREATE SEQUENCE metrics_count_unknown;
|
||||
|
||||
-- A new year! http://blogs.transparent.com/polish/names-of-the-months-and-their-meaning/
|
||||
SELECT new_db_revision(1,3,2, 'Luty' );
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
|
||||
-- Notable enhancement: change first_instance_start and last_instance_end to be timezone-aware
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,3,2);
|
||||
|
||||
ALTER TABLE calendar_item
|
||||
ALTER COLUMN first_instance_start
|
||||
TYPE TIMESTAMP WITH TIME ZONE
|
||||
-- I don't believe the column has ever been populated, but if it has, we want
|
||||
-- to throw away that data anyway because we don't know its timezone
|
||||
USING NULL::timestamptz;
|
||||
|
||||
ALTER TABLE calendar_item
|
||||
ALTER COLUMN last_instance_end
|
||||
TYPE TIMESTAMP WITH TIME ZONE
|
||||
USING NULL::timestamptz; -- As above
|
||||
|
||||
-- http://blogs.transparent.com/polish/names-of-the-months-and-their-meaning/
|
||||
SELECT new_db_revision(1,3,3, 'Marzec' );
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
@ -1,67 +0,0 @@
|
||||
|
||||
-- Notable enhancement: add unique constraints to tables missing them
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,3,3);
|
||||
|
||||
-- Temporary sequence so we can set the count in each of the tables.
|
||||
--
|
||||
-- While this doesn't give the result we really want, where count increments
|
||||
-- for each dav_id, it'll give us the uniqueness we want. Then as users
|
||||
-- update their records, we'll eventually up with counts per dav_id.
|
||||
CREATE SEQUENCE temporary_seq;
|
||||
|
||||
-- addressbook_address_adr
|
||||
ALTER TABLE addressbook_address_adr
|
||||
ADD COLUMN count INT;
|
||||
|
||||
UPDATE addressbook_address_adr
|
||||
SET count = nextval('temporary_seq');
|
||||
|
||||
CREATE UNIQUE INDEX addressbook_address_adr_pk
|
||||
ON addressbook_address_adr(dav_id, count);
|
||||
|
||||
-- addressbook_address_email
|
||||
ALTER TABLE addressbook_address_email
|
||||
ADD COLUMN count INT;
|
||||
|
||||
CREATE UNIQUE INDEX addressbook_address_email_pk
|
||||
ON addressbook_address_email(dav_id, count);
|
||||
|
||||
UPDATE addressbook_address_email
|
||||
SET count = nextval('temporary_seq');
|
||||
|
||||
-- addressbook_address_tel
|
||||
ALTER TABLE addressbook_address_tel
|
||||
ADD COLUMN count INT;
|
||||
|
||||
UPDATE addressbook_address_tel
|
||||
SET count = nextval('temporary_seq');
|
||||
|
||||
CREATE UNIQUE INDEX addressbook_address_tel_pk
|
||||
ON addressbook_address_tel(dav_id, count);
|
||||
|
||||
-- calendar_alarm
|
||||
ALTER TABLE calendar_alarm
|
||||
ADD COLUMN count INT;
|
||||
|
||||
UPDATE calendar_alarm
|
||||
SET count = nextval('temporary_seq');
|
||||
|
||||
CREATE UNIQUE INDEX calendar_alarms_pk
|
||||
ON calendar_alarm(dav_id, count);
|
||||
|
||||
-- Tidy up after ourselves.
|
||||
DROP SEQUENCE temporary_seq;
|
||||
|
||||
-- Add unique constraints where no other changes are needed.
|
||||
CREATE UNIQUE INDEX role_member_pk
|
||||
ON role_member (role_no, user_no);
|
||||
CREATE UNIQUE INDEX tmp_password_pk
|
||||
ON tmp_password (user_no, valid_until);
|
||||
|
||||
-- http://blogs.transparent.com/polish/names-of-the-months-and-their-meaning/
|
||||
SELECT new_db_revision(1,3,4, 'Kwiecień' );
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
@ -1,25 +0,0 @@
|
||||
|
||||
-- Notable enhancement: add shadow columns to calendar_item
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,3,4);
|
||||
|
||||
ALTER TABLE calendar_item
|
||||
ADD COLUMN dtstart_orig TIMESTAMP WITH TIME ZONE,
|
||||
ADD COLUMN dtend_orig TIMESTAMP WITH TIME ZONE;
|
||||
|
||||
-- We don't know what the user sent us without reparsing all the VCALENDAR
|
||||
-- blobs, which I'm not going to do in SQL. We'll just have to wing it, and
|
||||
-- hope this is good enough (it is no better than the current situation for
|
||||
-- existing deployments) and dtstart_orig and dtend_orig will end up with
|
||||
-- correct data over time as users re-upload the VCALENDAR blobs.
|
||||
UPDATE calendar_item
|
||||
SET
|
||||
dtstart_orig = dtstart,
|
||||
dtend_orig = dtend;
|
||||
|
||||
-- http://blogs.transparent.com/polish/names-of-the-months-and-their-meaning/
|
||||
SELECT new_db_revision(1,3,5, 'Maj' );
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
@ -1,42 +0,0 @@
|
||||
-- Add CalDAV labels to principal types to remove hardcoded ID -> Label
|
||||
-- mappings in code.
|
||||
--
|
||||
-- List is from: https://tools.ietf.org/html/rfc5545#section-3.2.3
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,3,5);
|
||||
|
||||
INSERT INTO roles ( role_no, role_name ) VALUES( 5, 'Room');
|
||||
|
||||
ALTER TABLE principal_type ADD COLUMN label VARCHAR;
|
||||
|
||||
-- Add labels
|
||||
UPDATE principal_type
|
||||
SET label = 'INDIVIDUAL'
|
||||
WHERE principal_type_id = 1;
|
||||
|
||||
UPDATE principal_type
|
||||
SET label = 'RESOURCE'
|
||||
WHERE principal_type_id = 2;
|
||||
|
||||
UPDATE principal_type
|
||||
SET label = 'GROUP'
|
||||
WHERE principal_type_id = 3;
|
||||
|
||||
-- Add suport for the ROOM principal type.
|
||||
-- Having hardcoded IDs pains me. A lot.
|
||||
INSERT INTO principal_type
|
||||
(principal_type_id, principal_type_desc, label)
|
||||
VALUES (4, 'Room', 'ROOM');
|
||||
|
||||
-- Ensure that the sequence is primed, on my instance the sequence had
|
||||
-- last_value as 0.
|
||||
SELECT setval('principal_type_principal_type_id_seq',
|
||||
(SELECT max(principal_type_id) FROM principal_type)
|
||||
);
|
||||
|
||||
-- http://blogs.transparent.com/polish/names-of-the-months-and-their-meaning/
|
||||
SELECT new_db_revision(1,3,6, 'Czerwiec');
|
||||
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* PostgreSQL Functions for RRULE handling
|
||||
*
|
||||
* @package davical
|
||||
* @package rscds
|
||||
* @subpackage database
|
||||
* @author Andrew McMillan <andrew@morphoss.com>
|
||||
* @copyright Morphoss Ltd - http://www.morphoss.com/
|
||||
@ -75,7 +75,7 @@ BEGIN
|
||||
|
||||
RETURN result;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
-- Return a SETOF dates within the month of a particular date which match a string of BYDAY rule specifications
|
||||
@ -170,7 +170,7 @@ BEGIN
|
||||
RETURN;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
-- Return a SETOF dates within the month of a particular date which match a string of BYDAY rule specifications
|
||||
@ -204,7 +204,7 @@ BEGIN
|
||||
RETURN;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
-- Return a SETOF dates within the week of a particular date which match a single BYDAY rule specification
|
||||
@ -238,12 +238,12 @@ BEGIN
|
||||
RETURN;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
CREATE or REPLACE FUNCTION event_has_exceptions( TEXT ) RETURNS BOOLEAN AS $$
|
||||
SELECT $1 ~ E'\nRECURRENCE-ID(;TZID=[^:]+)?:[[:space:]]*[[:digit:]]{8}(T[[:digit:]]{6})?'
|
||||
$$ LANGUAGE sql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'sql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -261,7 +261,7 @@ BEGIN
|
||||
END IF;
|
||||
RETURN TRUE;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -277,7 +277,7 @@ BEGIN
|
||||
END IF;
|
||||
RETURN TRUE;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -293,7 +293,7 @@ BEGIN
|
||||
END IF;
|
||||
RETURN TRUE;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -309,7 +309,7 @@ BEGIN
|
||||
END IF;
|
||||
RETURN TRUE;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -356,7 +356,7 @@ BEGIN
|
||||
END IF;
|
||||
CLOSE curse;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -396,7 +396,7 @@ BEGIN
|
||||
RETURN NEXT after;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -428,7 +428,7 @@ BEGIN
|
||||
END LOOP;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -473,7 +473,7 @@ BEGIN
|
||||
END LOOP;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -507,7 +507,7 @@ BEGIN
|
||||
END IF;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -535,7 +535,7 @@ BEGIN
|
||||
RETURN NEXT after;
|
||||
END IF;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -632,7 +632,7 @@ BEGIN
|
||||
END LOOP;
|
||||
-- RETURN QUERY;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -651,7 +651,7 @@ BEGIN
|
||||
RETURN NEXT rowvar.d;
|
||||
END LOOP;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -701,9 +701,4 @@ BEGIN
|
||||
RETURN FOUND;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
|
||||
|
||||
CREATE or REPLACE FUNCTION icalendar_interval_to_SQL( TEXT ) RETURNS interval AS $function$
|
||||
SELECT CASE WHEN substring($1,1,1) = '-' THEN -1 ELSE 1 END * regexp_replace( regexp_replace($1, '[PT-]', '', 'g'), '([A-Z])', E'\\1 ', 'g')::interval;
|
||||
$function$ LANGUAGE sql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* PostgreSQL Functions for RRULE handling
|
||||
*
|
||||
* @package davical
|
||||
* @package rscds
|
||||
* @subpackage database
|
||||
* @author Andrew McMillan <andrew@morphoss.com>
|
||||
* @copyright Morphoss Ltd - http://www.morphoss.com/
|
||||
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
-- Create a composite type for the parts of the RRULE.
|
||||
DROP TYPE IF EXISTS rrule_parts CASCADE;
|
||||
DROP TYPE rrule_parts CASCADE;
|
||||
CREATE TYPE rrule_parts AS (
|
||||
base TIMESTAMP WITH TIME ZONE,
|
||||
until TIMESTAMP WITH TIME ZONE,
|
||||
@ -75,7 +75,7 @@ BEGIN
|
||||
|
||||
RETURN result;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
-- Return a SETOF dates within the month of a particular date which match a string of BYDAY rule specifications
|
||||
@ -161,7 +161,7 @@ BEGIN
|
||||
RETURN;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
-- Return a SETOF dates within the month of a particular date which match a string of BYDAY rule specifications
|
||||
@ -195,7 +195,7 @@ BEGIN
|
||||
RETURN;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
-- Return a SETOF dates within the week of a particular date which match a single BYDAY rule specification
|
||||
@ -229,12 +229,12 @@ BEGIN
|
||||
RETURN;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
CREATE or REPLACE FUNCTION event_has_exceptions( TEXT ) RETURNS BOOLEAN AS $$
|
||||
SELECT $1 ~ E'\nRECURRENCE-ID(;TZID=[^:]+)?:[[:space:]]*[[:digit:]]{8}(T[[:digit:]]{6})?'
|
||||
$$ LANGUAGE sql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'sql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -252,7 +252,7 @@ BEGIN
|
||||
END IF;
|
||||
RETURN TRUE;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -268,7 +268,7 @@ BEGIN
|
||||
END IF;
|
||||
RETURN TRUE;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -284,7 +284,7 @@ BEGIN
|
||||
END IF;
|
||||
RETURN TRUE;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -300,7 +300,7 @@ BEGIN
|
||||
END IF;
|
||||
RETURN TRUE;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -340,7 +340,7 @@ BEGIN
|
||||
END IF;
|
||||
CLOSE curse;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -380,7 +380,7 @@ BEGIN
|
||||
RETURN NEXT after;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -410,7 +410,7 @@ BEGIN
|
||||
RETURN QUERY SELECT d FROM rrule_bysetpos_filter(curse,rrule.bysetpos) d;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -453,7 +453,7 @@ BEGIN
|
||||
RETURN QUERY SELECT d FROM rrule_bysetpos_filter(curse,rrule.bysetpos) d;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -483,7 +483,7 @@ BEGIN
|
||||
END IF;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -510,7 +510,7 @@ BEGIN
|
||||
RETURN NEXT after;
|
||||
END IF;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -610,7 +610,7 @@ BEGIN
|
||||
END LOOP;
|
||||
-- RETURN QUERY;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -626,7 +626,7 @@ BEGIN
|
||||
maxdate := current_date + '10 years'::interval;
|
||||
RETURN QUERY SELECT d FROM rrule_event_instances_range( basedate, repeatrule, basedate, maxdate, 300 ) d;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
@ -676,11 +676,11 @@ BEGIN
|
||||
RETURN FOUND;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
||||
|
||||
-- Create a composite type for the parts of the RRULE.
|
||||
DROP TYPE IF EXISTS rrule_instance CASCADE;
|
||||
DROP TYPE rrule_instance CASCADE;
|
||||
CREATE TYPE rrule_instance AS (
|
||||
dtstart TIMESTAMP WITH TIME ZONE,
|
||||
rrule TEXT,
|
||||
@ -707,10 +707,4 @@ BEGIN
|
||||
END LOOP;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
|
||||
|
||||
|
||||
CREATE or REPLACE FUNCTION icalendar_interval_to_SQL( TEXT ) RETURNS interval AS $function$
|
||||
SELECT CASE WHEN substring($1,1,1) = '-' THEN -1 ELSE 1 END * regexp_replace( regexp_replace($1, '[PT-]', '', 'g'), '([A-Z])', E'\\1 ', 'g')::interval;
|
||||
$function$ LANGUAGE sql IMMUTABLE STRICT;
|
||||
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
@ -28,10 +28,8 @@ INSERT INTO usr ( user_no, active, email_ok, updated, username, password, fullna
|
||||
|
||||
INSERT INTO usr ( user_no, active, email_ok, updated, username, password, fullname, email )
|
||||
VALUES( 100, TRUE, current_date, current_date, 'resource1', '*salt*unpossible', 'Resource 1', 'resource1@example.net' );
|
||||
INSERT INTO role_member (user_no, role_no) VALUES( 100, 4);
|
||||
INSERT INTO usr ( user_no, active, email_ok, updated, username, password, fullname, email )
|
||||
VALUES( 101, TRUE, current_date, current_date, 'resource2', '*salt*unpossible', 'Resource 2', 'resource2@example.net' );
|
||||
INSERT INTO role_member (user_no, role_no) VALUES( 101, 4);
|
||||
|
||||
INSERT INTO usr ( user_no, active, email_ok, updated, username, password, fullname, email )
|
||||
VALUES( 200, TRUE, current_date, current_date, 'resmgr1', '*salt*unpossible', 'Resource Managers', 'resource-managers@example.net' );
|
||||
@ -42,42 +40,17 @@ INSERT INTO usr ( user_no, active, email_ok, updated, username, password, fullna
|
||||
INSERT INTO role_member (user_no, role_no) VALUES( 300, 2);
|
||||
|
||||
SELECT setval('usr_user_no_seq', 1000);
|
||||
SELECT setval('dav_id_seq', 1000);
|
||||
|
||||
UPDATE usr SET joined = '2009-06-01', updated = '2009-06-02';
|
||||
|
||||
INSERT INTO collection (user_no, parent_container, dav_name, dav_etag,
|
||||
dav_displayname, is_calendar, created, modified,
|
||||
public_events_only, publicly_readable, collection_id, resourcetypes )
|
||||
public_events_only, publicly_readable, collection_id)
|
||||
SELECT user_no, '/' || username || '/', '/' || username || '/home/', md5(username),
|
||||
username || ' home', TRUE, '2009-06-03', '2009-06-04',
|
||||
FALSE, FALSE, user_no + 150, '<DAV::collection/><urn:ietf:params:xml:ns:caldav:calendar/>'
|
||||
FROM usr ORDER BY user_no;
|
||||
FALSE, FALSE, user_no FROM usr;
|
||||
|
||||
INSERT INTO collection (user_no, parent_container, dav_name, dav_etag,
|
||||
dav_displayname, is_calendar, is_addressbook, created, modified,
|
||||
public_events_only, publicly_readable, collection_id, resourcetypes )
|
||||
SELECT user_no, '/' || username || '/', '/' || username || '/addresses/', md5(username),
|
||||
username || ' addresses', FALSE, TRUE, '1957-07-26', '1998-03-16',
|
||||
FALSE, FALSE, user_no + 450, '<DAV::collection/><urn:ietf:params:xml:ns:carddav:addressbook/>'
|
||||
FROM usr ORDER BY user_no;
|
||||
|
||||
|
||||
INSERT INTO principal (type_id, user_no, displayname, default_privileges)
|
||||
SELECT 1, user_no, fullname, privilege_to_bits(ARRAY['read-free-busy','schedule-send','schedule-deliver']) FROM usr
|
||||
WHERE NOT EXISTS(SELECT 1 FROM role_member JOIN roles USING(role_no) WHERE role_name = 'Group' AND role_member.user_no = usr.user_no)
|
||||
AND NOT EXISTS(SELECT 1 FROM role_member JOIN roles USING(role_no) WHERE role_name = 'Resource' AND role_member.user_no = usr.user_no)
|
||||
AND NOT EXISTS(SELECT 1 FROM principal WHERE principal.user_no = usr.user_no) ORDER BY user_no;
|
||||
|
||||
INSERT INTO principal (type_id, user_no, displayname, default_privileges)
|
||||
SELECT 2, user_no, fullname, privilege_to_bits(ARRAY['read','schedule-send','schedule-deliver']) FROM usr
|
||||
WHERE EXISTS(SELECT 1 FROM role_member JOIN roles USING(role_no) WHERE role_name = 'Resource' AND role_member.user_no = usr.user_no)
|
||||
AND NOT EXISTS(SELECT 1 FROM principal WHERE principal.user_no = usr.user_no) ORDER BY user_no;
|
||||
|
||||
INSERT INTO principal (type_id, user_no, displayname, default_privileges)
|
||||
SELECT 3, user_no, fullname, privilege_to_bits(ARRAY['read-free-busy','schedule-send','schedule-deliver']) FROM usr
|
||||
WHERE EXISTS(SELECT 1 FROM role_member JOIN roles USING(role_no) WHERE role_name = 'Group' AND role_member.user_no = usr.user_no)
|
||||
AND NOT EXISTS(SELECT 1 FROM principal WHERE principal.user_no = usr.user_no) ORDER BY user_no;
|
||||
SELECT setval('dav_id_seq', 1000);
|
||||
|
||||
-- Set the insert sequence to the next number, with a minimum of 1000
|
||||
SELECT setval('relationship_type_rt_id_seq', (SELECT 10 UNION SELECT rt_id FROM relationship_type ORDER BY 1 DESC LIMIT 1) );
|
||||
@ -95,32 +68,11 @@ INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 30, 200, 1 );
|
||||
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 30, 20, 2 );
|
||||
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 30, 10, 2 );
|
||||
|
||||
|
||||
-- Between a team
|
||||
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 20, 300, 3 );
|
||||
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 10, 300, 3 );
|
||||
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 30, 300, 3 );
|
||||
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 300, 20, 3 );
|
||||
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 300, 10, 3 );
|
||||
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 300, 30, 3 );
|
||||
|
||||
-- Granting explicit free/busy permission
|
||||
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 11, 10, 4 );
|
||||
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 10, 11, 4 );
|
||||
|
||||
|
||||
UPDATE relationship r SET confers = (SELECT bit_confers FROM relationship_type rt WHERE rt.rt_id=r.rt_id);
|
||||
|
||||
INSERT INTO group_member ( group_id, member_id)
|
||||
SELECT g.principal_id, m.principal_id
|
||||
FROM relationship JOIN principal g ON(to_user=g.user_no AND g.type_id = 3) -- Group
|
||||
JOIN principal m ON(from_user=m.user_no AND m.type_id IN (1,2)) ORDER BY 1, 2; -- Person | Resource
|
||||
|
||||
INSERT INTO grants ( by_principal, to_principal, privileges, is_group )
|
||||
SELECT pby.principal_id AS by_principal, pto.principal_id AS to_principal,
|
||||
confers AS privileges, pto.type_id > 2 AS is_group
|
||||
FROM relationship r JOIN usr f ON(f.user_no=r.from_user)
|
||||
JOIN usr t ON(t.user_no=r.to_user)
|
||||
JOIN principal pby ON(t.user_no=pby.user_no)
|
||||
JOIN principal pto ON(pto.user_no=f.user_no)
|
||||
WHERE rt_id < 4 AND pby.type_id < 3 ORDER BY 1, 2;
|
||||
@ -1,45 +1,23 @@
|
||||
TRUNCATE supported_locales;
|
||||
|
||||
-- I should be able to find people to translate into these base locales
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'en', 'English', 'English' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'ar', 'Arabic', 'العَرَبِية' );
|
||||
VALUES( 'en_EN', 'English', 'English' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'de_DE', 'German', 'Deutsch' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'es_AR', 'Spanish (Argentina)', 'Español (Argentina)' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'es_ES', 'Spanish (Spain)', 'Español (Espana)' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'es_MX', 'Spanish (Mexico)', 'Español (Mexico)' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'es_VE', 'Spanish (Venezuela)', 'Español (Venezuela)' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'et_EE', 'Estonian', 'Eesti' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'fi_FI', 'Finnish', 'Suomi' );
|
||||
VALUES( 'es_ES', 'Spanish', 'Español' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'fr_FR', 'French', 'Français' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'hu_HU', 'Hungarian', 'Magyar' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'it_IT', 'Italian', 'Italiano' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'ja_JP', 'Japanese', '日本語' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'ko_KR', 'Korean (Korea)', '한국어' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'nb_NO', 'Norwegian', 'Bokmål' );
|
||||
VALUES( 'ru_RU', 'Russian', 'Русский' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'nl_NL', 'Netherlands', 'Nederlands' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'pl_PL', 'Polish', 'Polski' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'pt_BR', 'Brazilian Portuguese', 'Brazilian Portuguese' );
|
||||
VALUES( 'hu_HU', 'Hungarian', 'Magyar' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'pt_PT', 'Portuguese', 'Portuguese' );
|
||||
VALUES( 'ja_JP', 'Japanese', '日本語' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'ru_RU', 'Russian', 'Русский' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'sk_SK', 'Slovak (Slovakia)', 'Slovenčina' );
|
||||
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
|
||||
VALUES( 'sv_SE', 'Swedish', 'Svenska' );
|
||||
VALUES( 'it_IT', 'Italian', 'Italiano' );
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
#!/usr/bin/env perl
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# Update the DAViCal database by repeatedly applying patches to it
|
||||
# in the correct order.
|
||||
#
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
use DBI;
|
||||
@ -15,7 +14,7 @@ use Getopt::Long qw(:config permute); # allow mixed args.
|
||||
my $debug = 0;
|
||||
my $dbname = "davical";
|
||||
my $dbport = 5432;
|
||||
my $dbuser = "davical_dba";
|
||||
my $dbuser = "";
|
||||
my $dbpass = "";
|
||||
my $dbhost = "";
|
||||
my $appuser = "davical_app";
|
||||
@ -26,8 +25,8 @@ my $force_owner = "";
|
||||
my $config_file = "config/administration.yml";
|
||||
|
||||
my $dbadir = $0;
|
||||
$dbadir =~ s#[^/]*$##;
|
||||
my $patchdir = $dbadir . "patches";
|
||||
$dbadir =~ s#/[^/]*$##;
|
||||
my $patchdir = $dbadir . "/patches";
|
||||
|
||||
#
|
||||
# We look in a few places for the config file. First relative to
|
||||
@ -35,7 +34,7 @@ my $patchdir = $dbadir . "patches";
|
||||
# start to look in absolute locations. Then we give up :-)
|
||||
if ( ! -f $config_file ) {
|
||||
$config_file = $0;
|
||||
$config_file =~ s{update-[a-z]+-database}{../config/administration.yml};
|
||||
$config_file =~ s{[^/]+/update-[a-z]+-database}{config/administration.yml};
|
||||
}
|
||||
if ( ! -f $config_file ) {
|
||||
$config_file = "/etc/davical/administration.yml";
|
||||
@ -132,9 +131,6 @@ if ( $apply_patches ) {
|
||||
apply_sql_file( $dbadir, "supported_locales.sql" );
|
||||
print "Supported locales updated.\n";
|
||||
|
||||
# update any views
|
||||
apply_sql_folder( $dbadir, 'views', "Updated view: " );
|
||||
|
||||
# Ensure the functions are up to date
|
||||
apply_sql_file( $dbadir, "caldav_functions.sql" );
|
||||
print "CalDAV functions updated.\n";
|
||||
@ -209,33 +205,6 @@ sub compare_revisions {
|
||||
|
||||
|
||||
|
||||
############################################################
|
||||
=item folder_ordering()
|
||||
Function to allow us to sort folders which may have a number
|
||||
prefix.
|
||||
=cut
|
||||
############################################################
|
||||
sub folder_ordering {
|
||||
my $a = shift;
|
||||
my $b = shift;
|
||||
|
||||
my $numeric_a = 999999;
|
||||
my $numeric_b = 999999;
|
||||
if ( $a =~ m{^(\d+)-} ) { $numeric_a = $1; }
|
||||
if ( $b =~ m{^(\d+)-} ) { $numeric_b = $1; }
|
||||
|
||||
return -1 if ( $numeric_a < $numeric_b );
|
||||
return 1 if ( $numeric_a > $numeric_b );
|
||||
|
||||
# Fall back on alphanumeric comparison
|
||||
return -1 if ( $a lt $b );
|
||||
return 1 if ( $a lt $b );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
############################################################
|
||||
# Get the current version of PostgreSQL
|
||||
############################################################
|
||||
@ -322,7 +291,7 @@ sub apply_sql_file {
|
||||
push @psql_opts, "-p", "$dbport" if ( $dbport != 5432 );
|
||||
push @psql_opts, "-U", $dbuser if ( $dbuser ne "" );
|
||||
push @psql_opts, $dbname; # It seems that FreeBSD has a poorer argument parsing library so non-option arguments must be last
|
||||
$ENV{'PGPASSWORD'} = $dbpass if ( $dbpass ne "" );
|
||||
$ENV{'PGPASS'} = $dbpass if ( $dbpass ne "" );
|
||||
|
||||
my $command = join ' ', @psql_opts;
|
||||
$last_results = `$command 2>&1 1>/dev/null`;
|
||||
@ -332,35 +301,6 @@ sub apply_sql_file {
|
||||
}
|
||||
|
||||
|
||||
############################################################
|
||||
=item apply_sql_folder
|
||||
Applies the SQL files in a folder in order, with some magic to apply
|
||||
specifically versioned ones by preference.
|
||||
=cut
|
||||
sub apply_sql_folder {
|
||||
my $dbadir = shift;
|
||||
my $folder_name = shift;
|
||||
my $announce_prefix = shift;
|
||||
|
||||
my $folder = $dbadir . '/' . $folder_name;
|
||||
opendir( FOLDER, $folder ) or die "Can't open SQL directory $folder";
|
||||
my @sql_files = grep { /^[^.].*\.sql$/ } readdir(FOLDER);
|
||||
closedir(FOLDER);
|
||||
@sql_files = grep( !/-\d+.\d+\.sql$/, @sql_files);
|
||||
@sql_files = sort { folder_ordering($a,$b); } @sql_files;
|
||||
|
||||
for ( my $i=0; $i <= $#sql_files; $i++ ) {
|
||||
my $apply_file = $sql_files[$i];
|
||||
my $testfile = $folder . '/' . $apply_file;
|
||||
$testfile =~ s{\.sql$}{-$pg_version.sql};
|
||||
$apply_file = $testfile if ( -f $testfile );
|
||||
|
||||
apply_sql_file( $folder, $apply_file );
|
||||
print $announce_prefix, $apply_file, " applied.\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
############################################################
|
||||
# Apply database permissions from file
|
||||
@ -446,13 +386,7 @@ the correct minimum permissions for the web application user.
|
||||
|
||||
Rather than providing a password on the command-line it is recommended
|
||||
that you use a .pgpass file in your home directory to hold the database
|
||||
password. This file must be mode 600 to work and should have lines
|
||||
like:
|
||||
|
||||
hostname:port:database:username:password
|
||||
|
||||
Each bit can be replaced by an asterisk, e.g:
|
||||
*:*:davical:davical_dba:53cr3t
|
||||
password. This file must be mode 600 to work.
|
||||
|
||||
OPTHELP
|
||||
exit 0;
|
||||
|
||||
@ -1,77 +0,0 @@
|
||||
-- Define an updateable view for dav_principal which combines the AWL usr
|
||||
-- record 1:1 with the principal table
|
||||
|
||||
|
||||
DROP VIEW IF EXISTS dav_principal CASCADE;
|
||||
CREATE OR REPLACE VIEW dav_principal AS
|
||||
SELECT user_no, usr.active AS user_active, joined AS created, updated AS modified,
|
||||
username, password, fullname, email,
|
||||
email_ok, date_format_type, locale,
|
||||
principal_id, type_id, displayname, default_privileges,
|
||||
TRUE AS is_principal,
|
||||
FALSE AS is_calendar,
|
||||
principal_id AS collection_id,
|
||||
FALSE AS is_addressbook,
|
||||
'/' || username || '/' AS dav_name,
|
||||
'<DAV::collection/><DAV::principal/>'::text AS resourcetypes
|
||||
FROM usr JOIN principal USING(user_no);
|
||||
|
||||
CREATE or REPLACE RULE dav_principal_insert AS ON INSERT TO dav_principal
|
||||
DO INSTEAD
|
||||
(
|
||||
INSERT INTO usr ( user_no, active, joined, updated, username, password, fullname, email, email_ok, date_format_type, locale )
|
||||
VALUES(
|
||||
COALESCE( NEW.user_no, nextval('usr_user_no_seq')),
|
||||
COALESCE( NEW.user_active, TRUE),
|
||||
COALESCE( NEW.created, current_timestamp),
|
||||
COALESCE( NEW.modified, current_timestamp),
|
||||
NEW.username, NEW.password,
|
||||
COALESCE( NEW.fullname, NEW.displayname ),
|
||||
NEW.email, NEW.email_ok,
|
||||
COALESCE( NEW.date_format_type, 'E'),
|
||||
NEW.locale
|
||||
);
|
||||
INSERT INTO principal ( user_no, principal_id, type_id, displayname, default_privileges )
|
||||
VALUES(
|
||||
COALESCE( NEW.user_no, currval('usr_user_no_seq')),
|
||||
COALESCE( NEW.principal_id, nextval('dav_id_seq')),
|
||||
NEW.type_id,
|
||||
COALESCE( NEW.displayname, NEW.fullname ),
|
||||
COALESCE( NEW.default_privileges, 0::BIT(24))
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
CREATE or REPLACE RULE dav_principal_update AS ON UPDATE TO dav_principal
|
||||
DO INSTEAD
|
||||
(
|
||||
UPDATE usr
|
||||
SET
|
||||
user_no=NEW.user_no,
|
||||
active=NEW.user_active,
|
||||
updated=current_timestamp,
|
||||
username=NEW.username,
|
||||
password=NEW.password,
|
||||
fullname=NEW.fullname,
|
||||
email=NEW.email,
|
||||
email_ok=NEW.email_ok,
|
||||
date_format_type=NEW.date_format_type,
|
||||
locale=NEW.locale
|
||||
WHERE user_no=OLD.user_no;
|
||||
|
||||
UPDATE principal
|
||||
SET
|
||||
principal_id = NEW.principal_id,
|
||||
type_id = NEW.type_id,
|
||||
displayname = NEW.displayname,
|
||||
default_privileges = NEW.default_privileges
|
||||
WHERE principal_id=OLD.principal_id;
|
||||
);
|
||||
|
||||
CREATE or REPLACE RULE dav_principal_delete AS ON DELETE TO dav_principal
|
||||
DO INSTEAD
|
||||
(
|
||||
DELETE FROM usr WHERE user_no=OLD.user_no;
|
||||
DELETE FROM principal WHERE principal_id=OLD.principal_id;
|
||||
);
|
||||
|
||||
96
dba/windows/awl-tables.sql
Normal file
96
dba/windows/awl-tables.sql
Normal file
@ -0,0 +1,96 @@
|
||||
-- Tables needed for AWL Libraries
|
||||
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE supported_locales (
|
||||
locale TEXT PRIMARY KEY,
|
||||
locale_name_en TEXT,
|
||||
locale_name_locale TEXT
|
||||
);
|
||||
|
||||
-- This is the table of users for the system
|
||||
CREATE TABLE usr (
|
||||
user_no SERIAL PRIMARY KEY,
|
||||
active BOOLEAN DEFAULT TRUE,
|
||||
email_ok TIMESTAMPTZ,
|
||||
joined TIMESTAMPTZ DEFAULT current_timestamp,
|
||||
updated TIMESTAMPTZ,
|
||||
last_used TIMESTAMPTZ,
|
||||
username TEXT NOT NULL, -- Note UNIQUE INDEX below constains case-insensitive uniqueness
|
||||
password TEXT,
|
||||
fullname TEXT,
|
||||
email TEXT,
|
||||
config_data TEXT,
|
||||
date_format_type TEXT DEFAULT 'E', -- default to english date format dd/mm/yyyy
|
||||
locale TEXT
|
||||
);
|
||||
CREATE FUNCTION max_usr() RETURNS INT4 AS 'SELECT max(user_no) FROM usr' LANGUAGE 'sql';
|
||||
CREATE UNIQUE INDEX usr_sk1_unique_username ON usr ( lower(username) );
|
||||
|
||||
CREATE TABLE usr_setting (
|
||||
user_no INT4 REFERENCES usr ( user_no ),
|
||||
setting_name TEXT,
|
||||
setting_value TEXT,
|
||||
PRIMARY KEY ( user_no, setting_name )
|
||||
);
|
||||
|
||||
CREATE FUNCTION get_usr_setting(INT4,TEXT)
|
||||
RETURNS TEXT
|
||||
AS 'SELECT setting_value FROM usr_setting
|
||||
WHERE usr_setting.user_no = $1
|
||||
AND usr_setting.setting_name = $2 ' LANGUAGE 'sql';
|
||||
|
||||
CREATE TABLE roles (
|
||||
role_no SERIAL PRIMARY KEY,
|
||||
role_name TEXT
|
||||
);
|
||||
CREATE FUNCTION max_roles() RETURNS INT4 AS 'SELECT max(role_no) FROM roles' LANGUAGE 'sql';
|
||||
|
||||
|
||||
CREATE TABLE role_member (
|
||||
role_no INT4 REFERENCES roles ( role_no ),
|
||||
user_no INT4 REFERENCES usr ( user_no )
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE session (
|
||||
session_id SERIAL PRIMARY KEY,
|
||||
user_no INT4 REFERENCES usr ( user_no ),
|
||||
session_start TIMESTAMPTZ DEFAULT current_timestamp,
|
||||
session_end TIMESTAMPTZ DEFAULT current_timestamp,
|
||||
session_key TEXT,
|
||||
session_config TEXT
|
||||
);
|
||||
CREATE FUNCTION max_session() RETURNS INT4 AS 'SELECT max(session_id) FROM session' LANGUAGE 'sql';
|
||||
|
||||
CREATE TABLE tmp_password (
|
||||
user_no INT4 REFERENCES usr ( user_no ),
|
||||
password TEXT,
|
||||
valid_until TIMESTAMPTZ DEFAULT (current_timestamp + '1 day'::interval)
|
||||
);
|
||||
COMMIT;
|
||||
|
||||
BEGIN;
|
||||
GRANT SELECT,INSERT,UPDATE ON
|
||||
usr
|
||||
, usr_setting
|
||||
, roles
|
||||
, role_member
|
||||
, session
|
||||
, tmp_password
|
||||
TO general;
|
||||
GRANT SELECT,UPDATE ON
|
||||
usr_user_no_seq
|
||||
, session_session_id_seq
|
||||
TO general;
|
||||
|
||||
GRANT SELECT ON
|
||||
supported_locales
|
||||
TO general;
|
||||
|
||||
GRANT DELETE ON
|
||||
tmp_password
|
||||
, role_member
|
||||
TO general;
|
||||
|
||||
COMMIT;
|
||||
@ -24,16 +24,16 @@ if EXIST %AWLDIR%\awl-tables.sql (
|
||||
)
|
||||
|
||||
rem Set DB user, web user, DB config directory, Windows DB config directory
|
||||
set AWL_DBAUSER=%3-davical_dba
|
||||
set AWL_APPUSER=%4-davical_app
|
||||
set AWL_DBAUSER=davical_dba
|
||||
set AWL_APPUSER=davical_app
|
||||
set DBA=%AWL_DBAUSER%
|
||||
|
||||
rem Need PostgreSQL location
|
||||
if DEFINED PGDIR (
|
||||
if DEFINED %PGDIR% (
|
||||
rem Use existing variable
|
||||
) ELSE (
|
||||
if EXIST "c:\Program Files\PostgreSQL\9.3\bin\createuser.exe" (
|
||||
set PGDIR="c:\Program Files\PostgreSQL\9.3\bin"
|
||||
if EXIST "c:\Program Files\PostgreSQL\8.3\bin\createuser" (
|
||||
set PGDIR="c:\Program Files\PostgreSQL\8.3\bin"
|
||||
)
|
||||
)
|
||||
echo PGDIR=%PGDIR%
|
||||
@ -65,12 +65,12 @@ rem Test if egrep is available
|
||||
rem You can download egrep.exe for Windows e.g. from UnxUtils: http://unxutils.sourceforge.net/):
|
||||
egrep 2>NULL
|
||||
echo egrep results: %ERRORLEVEL%
|
||||
if %ERRORLEVEL% EQU 9009 (
|
||||
if %ERRORLEVEL% EQU 3 (
|
||||
rem No egrep
|
||||
|
||||
rem Load the AWL base tables and schema management tables
|
||||
echo load windows\awl-tables.sql [no egrep]
|
||||
%PGDIR%\psql -q -f %AWLDIR%/awl-tables.sql %DBNAME% %USERNAME% 2>&1
|
||||
%PGDIR%\psql -q -f %AWLDIR/awl-tables.sql %DBNAME% %USERNAME% 2>&1
|
||||
|
||||
echo load windows\schema-management.sql [no egrep]
|
||||
%PGDIR%\psql -q -f %AWLDIR%/schema-management.sql %DBNAME% %USERNAME% 2>&1
|
||||
@ -94,21 +94,8 @@ if %ERRORLEVEL% EQU 9009 (
|
||||
)
|
||||
del NULL
|
||||
|
||||
rem Apply locales data
|
||||
%PGDIR%\psql -q -f %DBADIR%/supported_locales.sql %DBNAME% %USERNAME%
|
||||
echo Supported locales updated
|
||||
|
||||
rem Apply any views (TODO really need to load all scripts in views folder)
|
||||
%PGDIR%\psql -q -f %DBADIR%/views/dav_principal.sql %DBNAME% %USERNAME%
|
||||
echo Davical views updated
|
||||
|
||||
rem Apply functions
|
||||
echo load caldav_functions
|
||||
%PGDIR%\psql -q -f %DBADIR%/caldav_functions.sql %DBNAME% %USERNAME%
|
||||
echo CalDAV functions updated
|
||||
|
||||
rem Apply RRULE functions
|
||||
%PGDIR%\psql -q -f %DBADIR%/rrule_functions.sql %DBNAME% %USERNAME%
|
||||
echo RRULE functions updated
|
||||
|
||||
echo TBD: Set permissions for the application DB user on the database
|
||||
rem if EXIST %DBADIR%\update-davical-database (
|
||||
@ -125,7 +112,7 @@ rem echo * * * * ERROR * * * *
|
||||
rem echo The database administration utility failed. This is usually due to the Perl YAML
|
||||
rem echo or the Perl DBD::Pg libraries not being available.
|
||||
|
||||
rem echo See: https://wiki.davical.org/index.php/Problems_and_Solutions
|
||||
rem echo See: http://wiki.davical.org/w/Install_Errors/No_Perl_YAML
|
||||
|
||||
rem exit /B 2
|
||||
rem )
|
||||
|
||||
135
dba/windows/rscds.sql
Normal file
135
dba/windows/rscds.sql
Normal file
@ -0,0 +1,135 @@
|
||||
-- Really Simple CalDAV Store - Database Schema
|
||||
--
|
||||
|
||||
-- Use the usr, group and schema management stufffrom libawl-php
|
||||
\i awl-tables.sql
|
||||
\i schema-management.sql
|
||||
|
||||
-- The main event. Where we store the things the calendar throws at us.
|
||||
CREATE TABLE caldav_data (
|
||||
user_no INT references usr(user_no),
|
||||
dav_name TEXT,
|
||||
dav_etag TEXT,
|
||||
created TIMESTAMP WITH TIME ZONE,
|
||||
modified TIMESTAMP WITH TIME ZONE,
|
||||
caldav_data TEXT,
|
||||
caldav_type TEXT,
|
||||
logged_user INT references usr(user_no),
|
||||
|
||||
PRIMARY KEY ( user_no, dav_name )
|
||||
);
|
||||
|
||||
GRANT SELECT,INSERT,UPDATE,DELETE ON caldav_data TO general;
|
||||
|
||||
-- Not particularly needed, perhaps, except as a way to collect
|
||||
-- a bunch of valid iCalendar time zone specifications... :-)
|
||||
CREATE TABLE time_zone (
|
||||
tz_id TEXT PRIMARY KEY,
|
||||
tz_locn TEXT,
|
||||
tz_spec TEXT
|
||||
);
|
||||
GRANT SELECT,INSERT ON time_zone TO general;
|
||||
|
||||
-- The parsed calendar item. Here we have pulled those events/todos/journals apart somewhat.
|
||||
CREATE TABLE calendar_item (
|
||||
user_no INT references usr(user_no),
|
||||
dav_name TEXT,
|
||||
dav_etag TEXT,
|
||||
|
||||
-- Extracted vEvent/vTodo data
|
||||
uid TEXT,
|
||||
created TIMESTAMP,
|
||||
last_modified TIMESTAMP,
|
||||
dtstamp TIMESTAMP,
|
||||
dtstart TIMESTAMP WITH TIME ZONE,
|
||||
dtend TIMESTAMP WITH TIME ZONE,
|
||||
due TIMESTAMP WITH TIME ZONE,
|
||||
summary TEXT,
|
||||
location TEXT,
|
||||
description TEXT,
|
||||
priority INT,
|
||||
class TEXT,
|
||||
transp TEXT,
|
||||
rrule TEXT,
|
||||
url TEXT,
|
||||
percent_complete NUMERIC(7,2),
|
||||
tz_id TEXT REFERENCES time_zone( tz_id ),
|
||||
status TEXT,
|
||||
|
||||
-- Cascade updates / deletes from the caldav_data table
|
||||
CONSTRAINT caldav_exists FOREIGN KEY ( user_no, dav_name )
|
||||
REFERENCES caldav_data ( user_no, dav_name )
|
||||
MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE
|
||||
);
|
||||
|
||||
GRANT SELECT,INSERT,UPDATE,DELETE ON calendar_item TO general;
|
||||
|
||||
|
||||
-- Something that can look like a filesystem hierarchy where we store stuff
|
||||
CREATE TABLE collection (
|
||||
user_no INT references usr(user_no),
|
||||
parent_container TEXT,
|
||||
dav_name TEXT,
|
||||
dav_etag TEXT,
|
||||
dav_displayname TEXT,
|
||||
is_calendar BOOLEAN,
|
||||
created TIMESTAMP WITH TIME ZONE,
|
||||
modified TIMESTAMP WITH TIME ZONE,
|
||||
|
||||
PRIMARY KEY ( user_no, dav_name )
|
||||
);
|
||||
|
||||
GRANT SELECT,INSERT,UPDATE,DELETE ON collection TO general;
|
||||
|
||||
-- Each user can be related to each other user. This mechanism can also
|
||||
-- be used to define groups of users, since some relationships are transitive.
|
||||
CREATE TABLE relationship_type (
|
||||
rt_id SERIAL PRIMARY KEY,
|
||||
rt_name TEXT,
|
||||
rt_togroup BOOLEAN,
|
||||
confers TEXT DEFAULT 'RW',
|
||||
rt_fromgroup BOOLEAN
|
||||
);
|
||||
|
||||
GRANT SELECT,INSERT,UPDATE,DELETE ON relationship_type TO general;
|
||||
GRANT SELECT,UPDATE ON relationship_type_rt_id_seq TO general;
|
||||
|
||||
CREATE TABLE relationship (
|
||||
from_user INT REFERENCES usr (user_no) ON UPDATE CASCADE,
|
||||
to_user INT REFERENCES usr (user_no) ON UPDATE CASCADE,
|
||||
rt_id INT REFERENCES relationship_type (rt_id) ON UPDATE CASCADE,
|
||||
|
||||
PRIMARY KEY ( from_user, to_user, rt_id )
|
||||
);
|
||||
|
||||
GRANT SELECT,INSERT,UPDATE,DELETE ON relationship TO general;
|
||||
|
||||
|
||||
CREATE TABLE locks (
|
||||
dav_name TEXT,
|
||||
opaquelocktoken TEXT UNIQUE NOT NULL,
|
||||
type TEXT,
|
||||
scope TEXT,
|
||||
depth INT,
|
||||
owner TEXT,
|
||||
timeout INTERVAL,
|
||||
start TIMESTAMP DEFAULT current_timestamp
|
||||
);
|
||||
|
||||
CREATE INDEX locks_dav_name_idx ON locks(dav_name);
|
||||
GRANT SELECT,INSERT,UPDATE,DELETE ON locks TO general;
|
||||
|
||||
CREATE TABLE property (
|
||||
dav_name TEXT,
|
||||
property_name TEXT,
|
||||
property_value TEXT,
|
||||
changed_on TIMESTAMP DEFAULT current_timestamp,
|
||||
changed_by INT REFERENCES usr ( user_no ),
|
||||
PRIMARY KEY ( dav_name, property_name )
|
||||
);
|
||||
|
||||
CREATE INDEX properties_dav_name_idx ON property(dav_name);
|
||||
GRANT SELECT,INSERT,UPDATE,DELETE ON property TO general;
|
||||
|
||||
|
||||
SELECT new_db_revision(1,1,7, 'July' );
|
||||
59
dba/windows/schema-management.sql
Normal file
59
dba/windows/schema-management.sql
Normal file
@ -0,0 +1,59 @@
|
||||
-- SQL file for AWL tables
|
||||
|
||||
-- Table for holding the schema version so we can be more structured in future
|
||||
CREATE TABLE awl_db_revision (
|
||||
schema_id INT4,
|
||||
schema_major INT4,
|
||||
schema_minor INT4,
|
||||
schema_patch INT4,
|
||||
schema_name TEXT,
|
||||
applied_on TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp
|
||||
);
|
||||
GRANT SELECT ON awl_db_revision TO general;
|
||||
|
||||
CREATE or REPLACE FUNCTION check_db_revision( INT, INT, INT ) RETURNS BOOLEAN AS '
|
||||
DECLARE
|
||||
major ALIAS FOR $1;
|
||||
minor ALIAS FOR $2;
|
||||
patch ALIAS FOR $3;
|
||||
matching INT;
|
||||
BEGIN
|
||||
SELECT COUNT(*) INTO matching FROM awl_db_revision
|
||||
WHERE schema_major = major AND schema_minor = minor AND schema_patch = patch;
|
||||
IF matching != 1 THEN
|
||||
RAISE EXCEPTION ''Database has not been upgraded to %.%.%'', major, minor, patch;
|
||||
RETURN FALSE;
|
||||
END IF;
|
||||
SELECT COUNT(*) INTO matching FROM awl_db_revision
|
||||
WHERE (schema_major = major AND schema_minor = minor AND schema_patch > patch)
|
||||
OR (schema_major = major AND schema_minor > minor)
|
||||
OR (schema_major > major)
|
||||
;
|
||||
IF matching >= 1 THEN
|
||||
RAISE EXCEPTION ''Database revisions after %.%.% have already been applied.'', major, minor, patch;
|
||||
RETURN FALSE;
|
||||
END IF;
|
||||
RETURN TRUE;
|
||||
END;
|
||||
' LANGUAGE 'plpgsql';
|
||||
|
||||
-- The schema_id should always be incremented. The major / minor / patch level should
|
||||
-- be incremented as seems appropriate...
|
||||
CREATE or REPLACE FUNCTION new_db_revision( INT, INT, INT, TEXT ) RETURNS BOOLEAN AS '
|
||||
DECLARE
|
||||
major ALIAS FOR $1;
|
||||
minor ALIAS FOR $2;
|
||||
patch ALIAS FOR $3;
|
||||
blurb ALIAS FOR $4;
|
||||
new_id INT;
|
||||
BEGIN
|
||||
SELECT MAX(schema_id) + 1 INTO new_id FROM awl_db_revision;
|
||||
IF NOT FOUND OR new_id IS NULL THEN
|
||||
new_id := 1;
|
||||
END IF;
|
||||
INSERT INTO awl_db_revision (schema_id, schema_major, schema_minor, schema_patch, schema_name)
|
||||
VALUES( new_id, major, minor, patch, blurb );
|
||||
RETURN TRUE;
|
||||
END;
|
||||
' LANGUAGE 'plpgsql';
|
||||
SELECT new_db_revision(1,1,0, 'Dawn' );
|
||||
7
debian/.gitignore
vendored
Normal file
7
debian/.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
files
|
||||
html
|
||||
rscds
|
||||
davical
|
||||
davical-doc
|
||||
rscds-phpdoc.ini
|
||||
*.debhelper.log
|
||||
43
debian/README.Debian
vendored
43
debian/README.Debian
vendored
@ -1,35 +1,14 @@
|
||||
Initial DAViCal configuration on Debian
|
||||
=======================================
|
||||
DAViCal for Debian
|
||||
----------------
|
||||
|
||||
General installation and configuration information is available at
|
||||
https://www.davical.org/installation.php. Please visit that website for
|
||||
details and further reading.
|
||||
This is a CalDAV Server which I wrote because I was getting
|
||||
sick of the length of time it was taking to make worthwhile
|
||||
CalDAV server-side implementations that worked OK with
|
||||
Evolution.
|
||||
|
||||
After installation, basic configuration with a local database consists
|
||||
of the following steps:
|
||||
Then, when I finally did find a CalDAV store that worked, I
|
||||
found that it was quite bloated because it wanted to do vast
|
||||
amounts of irrelevant stuff. Well, irrelevant for me in any
|
||||
case.
|
||||
|
||||
1. Allow DAViCal to connect to the database, by adding the following 2
|
||||
lines at the top of your pg_hba.conf file (path depending on postgres
|
||||
version, for Debian Jessie try /etc/postgresql/9.4/main/pg_hba.conf):
|
||||
|
||||
local davical davical_app trust
|
||||
local davical davical_dba trust
|
||||
|
||||
Don't forget to restart postgres for the change to take effect!
|
||||
|
||||
2. Create the database, noting the displayed DAViCal admin password:
|
||||
|
||||
sudo -u postgres /usr/share/davical/dba/create-database.sh
|
||||
|
||||
3. Review and activate the default Apache config ('a2ensite davical'),
|
||||
or symlink /usr/share/davical/htdocs somewhere below an existing vhost's
|
||||
document root.
|
||||
|
||||
4. Customize /etc/davical/config.php if you want.
|
||||
|
||||
5. Point your browser to /setup.php (or wherever you symlinked the
|
||||
htdocs directory in step 3), log in as user admin with the password
|
||||
noted in step 2 above, and review the displayed issues, if any.
|
||||
|
||||
After that you're all set to create and configure users, upload existing
|
||||
calendars or set up clients.
|
||||
Andrew McMillan <andrew@catalyst.net.nz>, Tue. 2 May 2006 07:11:22 +1200
|
||||
|
||||
370
debian/changelog
vendored
370
debian/changelog
vendored
@ -1,373 +1,3 @@
|
||||
davical (1.1.13-2) unstable; urgency=medium
|
||||
|
||||
* fix Debian autopkgtest / CI: prevent caching of phpunit results, like we
|
||||
do already for "make test"
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Wed, 27 May 2026 23:10:28 +0200
|
||||
|
||||
davical (1.1.13-1) unstable; urgency=medium
|
||||
|
||||
[ Andrew Ruthven ]
|
||||
* New upstream release (Closes: #1040996, #1054143)
|
||||
|
||||
[ Florian Schlichting ]
|
||||
* Acknowledge NMUs by David Prévot - thank you! (closes: #1121419)
|
||||
* Depend on AWL 0.65
|
||||
* Update copyright years
|
||||
* Drop redundant "Priority: optional" and "Rules-Requires-Root: no" fields
|
||||
in debian/control
|
||||
* Update Doxyfile using "doxygen -u"
|
||||
* Add graphviz to Build-Depends, our doxygen config needs "dot"
|
||||
* Update debian/watch to version 5 (Gitlab template)
|
||||
* Declare compliance with Debian Policy 4.7.4
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Mon, 11 May 2026 23:00:17 +0200
|
||||
|
||||
davical (1.1.12-2.3) unstable; urgency=medium
|
||||
|
||||
* Non-maintainer upload
|
||||
* No change upload for the reproducible effort
|
||||
|
||||
-- David Prévot <taffit@debian.org> Wed, 26 Nov 2025 08:37:04 +0100
|
||||
|
||||
davical (1.1.12-2.2) unstable; urgency=medium
|
||||
|
||||
* Non-maintainer upload
|
||||
* Update latest patch to PHPUnit 12 syntax (Closes: #1099659)
|
||||
|
||||
-- David Prévot <taffit@debian.org> Thu, 25 Sep 2025 08:27:38 +0200
|
||||
|
||||
davical (1.1.12-2.1) unstable; urgency=medium
|
||||
|
||||
* Non-maintainer upload
|
||||
* Add support for PHPUnit 10 (Closes: #1039746)
|
||||
|
||||
-- David Prévot <taffit@debian.org> Tue, 14 Jan 2025 13:45:14 +0100
|
||||
|
||||
davical (1.1.12-2) unstable; urgency=medium
|
||||
|
||||
* Cherry-pick two bug fixes from upstream:
|
||||
+ use "." to concatenate strings, not "+" (gitlab #288)
|
||||
+ Add a missing space to a SQL statement to fix adding groups (gitlab #294)
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Mon, 01 May 2023 00:29:20 +0200
|
||||
|
||||
davical (1.1.12-1) unstable; urgency=medium
|
||||
|
||||
[ Debian Janitor ]
|
||||
* Remove constraints unnecessary since buster (oldstable):
|
||||
+ Remove 1 maintscript entries from 1 files.
|
||||
|
||||
[ Florian Schlichting ]
|
||||
* New upstream release
|
||||
* Depend on AWL 0.64
|
||||
* Update copyright years
|
||||
* Declare compliance with Debian Policy 4.6.2
|
||||
* Update lintian overrides (.txt is not necessarily documentation)
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Mon, 13 Mar 2023 21:59:44 +0100
|
||||
|
||||
davical (1.1.11-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release(closes: #1004285, #1004393)
|
||||
* Depend on AWL 0.63
|
||||
* Update copyright years
|
||||
* Declare compliance with Debian Policy 4.6.1
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Tue, 04 Oct 2022 13:56:36 +0200
|
||||
|
||||
davical (1.1.10-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release (closes: #703388)
|
||||
* Depend on AWL 0.62
|
||||
* Bump debhelper compat to level 13 (no changes necessary)
|
||||
* Bump d/watch to version 4 (no changes necessary)
|
||||
* Update copyright years
|
||||
* Add Rules-Requires-Root: no
|
||||
* Declare compliance with Debian Policy 4.5.1
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Mon, 01 Mar 2021 21:24:31 +0800
|
||||
|
||||
davical (1.1.9.3-1.1) unstable; urgency=high
|
||||
|
||||
* Non-maintainer upload.
|
||||
* Stop using rst2pdf that might not be in bullseye. (Closes: #962653)
|
||||
|
||||
-- Adrian Bunk <bunk@debian.org> Sun, 05 Jul 2020 12:34:48 +0300
|
||||
|
||||
davical (1.1.9.3-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release to support AWL 0.61
|
||||
* Restore rst2pdf dependency removed in 1.1.9.2
|
||||
* Use d/davical.maintscript instead of individual calls to rm_conffile
|
||||
* Amend d/upstream/metadata (add Bug-Database)
|
||||
* Update copyright years
|
||||
* Declare compliance with Debian Policy 4.5.0
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Mon, 13 Apr 2020 22:11:31 +0200
|
||||
|
||||
davical (1.1.9.2-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release (closes: #934106)
|
||||
+ fixes CVE-2019-18345 CVE-2019-18346 CVE-2019-18347 (closes: #946343)
|
||||
* Drop dependency on rst2pdf to clear the blocker for testing migration
|
||||
* Use debian-compat dependency, level 12
|
||||
* Put API documentation into davical directory (instead of davical-doc), as
|
||||
has been suggested by policy for a while
|
||||
* Fix capitalization on Vcs- fields
|
||||
* Declare compliance with Debian Policy 4.4.1
|
||||
* Add a basic upstream metadata file, as suggested by the Debian Janitor
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Thu, 12 Dec 2019 00:20:46 +0800
|
||||
|
||||
davical (1.1.8-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
* Update debian/watch to changed Gitlab directory layout
|
||||
* Use system perl in dba/update-davical-database
|
||||
* Bump dependency on AWL to 0.60
|
||||
* Update copyright years
|
||||
* Declare compliance with Debian Policy 4.3.0
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Wed, 30 Jan 2019 22:52:41 +0100
|
||||
|
||||
davical (1.1.7-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
* Bump dependency on AWL to 0.59
|
||||
* Declare compliance with Debian Policy 4.1.3
|
||||
* Update lintian-overrides
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Fri, 12 Jan 2018 00:04:06 +0100
|
||||
|
||||
davical (1.1.6-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release (closes: #704069, #784282, #856467)
|
||||
* Update debian/watch to match changed Gitlab download URLs
|
||||
* Update debian/rules to use dpkg variables instead of parsing
|
||||
dpkg-parsechangelog output
|
||||
* Update debian/control: Priority is optional, not extra (obsolete)
|
||||
* Declare compliance with Debian Policy 4.1.1
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Wed, 25 Oct 2017 11:40:25 +0200
|
||||
|
||||
davical (1.1.5-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release (closes: #703130, #703138, #703342)
|
||||
* Separate rebuild-translations and building locale/*po files. This should
|
||||
make davical builds reproducible.
|
||||
* Ship davical-cli in /usr/share/davical/scripts
|
||||
* Use secure URIs where possible
|
||||
* Bump years on debian/copyright
|
||||
* Bump dependency on libawl-php to 0.57
|
||||
* Make extra sure that the orig-source tarball does not contain any cruft
|
||||
* Install example configs as /etc/davical/config.php and
|
||||
/etc/apache2/sites-available/davical.conf
|
||||
* Use jdupes to remove duplicate files in davical-doc
|
||||
* Mark davical-doc "Multi-Arch: foreign" as suggested by the Multiarch
|
||||
hinter
|
||||
* Override erroneous lintian errors
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Mon, 23 Jan 2017 23:04:30 +0100
|
||||
|
||||
davical (1.1.4-3) unstable; urgency=medium
|
||||
|
||||
* Add missing dependency on php-xml, which is a separate package from PHP 7
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Wed, 01 Jun 2016 22:18:51 +0200
|
||||
|
||||
davical (1.1.4-2) unstable; urgency=medium
|
||||
|
||||
* Update to work with both php5 and php7, mainly based on the Ubuntu patch
|
||||
by Nishanth Aravamudan (thanks!). Closes: #821673, #821477
|
||||
* Declare compliance with Debian Policy 3.9.8
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Tue, 19 Apr 2016 21:52:33 +0200
|
||||
|
||||
davical (1.1.4-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release (closes: #703128, #703294, #703287, #656020, #764915)
|
||||
* Ship all config examples and user documentation, but remove website
|
||||
references since it was moved to its own git repository.
|
||||
* Don't run make / make built-docs during package build to avoid nasty
|
||||
surprises; files should be up-to-date in git anyway
|
||||
* Purge /etc/davical/.keep directory
|
||||
* Clean source tree before creating orig-source tarball
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Mon, 11 Jan 2016 23:56:48 +0100
|
||||
|
||||
davical (1.1.3.1-1) unstable; urgency=medium
|
||||
|
||||
* fix a critical typo in htdocs/always.php
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Tue, 07 Oct 2014 08:44:50 +0200
|
||||
|
||||
davical (1.1.3-1) unstable; urgency=low
|
||||
|
||||
[ Andrew McMillan ]
|
||||
* New upstream release (closes: #656395, #702403, #703290, #703383, #703387,
|
||||
#740827)
|
||||
* Updated the control file Vcs-* fields to the new addresses of the
|
||||
canonical git upstream repository.
|
||||
* Removed README.Debian which didn’t contain any useful information.
|
||||
|
||||
[ Florian Schlichting ]
|
||||
* Takeover for the Davical Development Team (closes: #742498)
|
||||
* Use short-form debian/rules and fix source format declaration
|
||||
(closes: #730941)
|
||||
* Clean up duplicate files (symlink identical files in api documentation)
|
||||
* debian/control: update and sort dependencies, add php5, php5-cli
|
||||
(closes: #717043), php5-curl to Recommends (closes: #656390),
|
||||
php5-ldap as Suggests (LP: #479378)
|
||||
* Add doc-base registration for api doc and website in davical-doc
|
||||
* Add a README.Debian explaining the necessary steps for a basic
|
||||
installation
|
||||
* Bump dh compat to level 9
|
||||
* Add a debian/watch file
|
||||
* Switch d/copyright to copyright-format 1.0, amend CREDITS from git log
|
||||
* Bump dependency on awl to 0.55
|
||||
* Declare compliance with Debian Policy 3.9.6
|
||||
* Upload to Debian (closes: #726577)
|
||||
|
||||
-- Florian Schlichting <fsfs@debian.org> Tue, 07 Oct 2014 00:12:13 +0200
|
||||
|
||||
davical (1.1.1-1) unstable; urgency=high
|
||||
|
||||
* New upstream release (closes:#656392)
|
||||
|
||||
-- Andrew McMillan <awm@debian.org> Wed, 04 Jul 2012 22:12:53 +1200
|
||||
|
||||
davical (1.1.0-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
* New release to Debian (closes:#668980, #661985).
|
||||
|
||||
-- Andrew McMillan <awm@debian.org> Sun, 17 Jun 2012 23:01:18 +1200
|
||||
|
||||
davical (1.0.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* New release to Debian (closes:#643809, #618957).
|
||||
|
||||
-- Andrew McMillan <awm@debian.org> Fri, 13 Jan 2012 23:44:36 +1300
|
||||
|
||||
davical (1.0.1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Andrew McMillan <awm@debian.org> Thu, 05 Jan 2012 12:07:18 +1300
|
||||
|
||||
davical (1.0.0-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Andrew McMillan <awm@debian.org> Wed, 04 Jan 2012 16:41:50 +1300
|
||||
|
||||
davical (0.9.9.7-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Andrew McMillan <awm@debian.org> Mon, 24 Oct 2011 20:09:10 +1300
|
||||
|
||||
davical (0.9.9.6-1) unstable; urgency=low
|
||||
|
||||
* New upstream release (closes:#628566,#619513,#619477,#619515,#641591)
|
||||
* Switch to dpkg-source 3.0 (native) format
|
||||
|
||||
-- Andrew McMillan <awm@debian.org> Tue, 27 Sep 2011 13:23:28 +1300
|
||||
|
||||
davical (0.9.9.5-1) unstable; urgency=low
|
||||
|
||||
* New upstream release (closes:#610612, #639262)
|
||||
|
||||
-- Andrew McMillan <awm@debian.org> Tue, 13 Sep 2011 13:15:50 +1200
|
||||
|
||||
davical (0.9.9.4-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
* Run update-davical-database in postinst (closes: #578357)
|
||||
* Remove ancient references to rscds package.
|
||||
|
||||
-- Andrew McMillan <awm@debian.org> Tue, 28 Dec 2010 02:15:56 +1300
|
||||
|
||||
davical (0.9.9.3-0) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Andrew McMillan <awm@debian.org> Fri, 24 Sep 2010 12:50:41 +1200
|
||||
|
||||
davical (0.9.9.2-0) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Andrew McMillan <awm@debian.org> Tue, 21 Sep 2010 14:28:04 +1200
|
||||
|
||||
davical (0.9.9.1-0) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Andrew McMillan <debian@mcmillan.net.nz> Mon, 13 Sep 2010 21:30:32 +1200
|
||||
|
||||
davical (0.9.9-0) unstable; urgency=low
|
||||
|
||||
* New upstream release (closes: #508673, #573687)
|
||||
|
||||
-- Andrew McMillan <debian@mcmillan.net.nz> Sat, 17 Apr 2010 13:19:24 +1200
|
||||
|
||||
davical (0.9.8.4-0) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Andrew McMillan <debian@mcmillan.net.nz> Tue, 09 Mar 2010 09:51:07 +1300
|
||||
|
||||
davical (0.9.8.3-0) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Andrew McMillan <debian@mcmillan.net.nz> Thu, 25 Feb 2010 11:39:05 +1300
|
||||
|
||||
davical (0.9.8.2-0) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Andrew McMillan <debian@mcmillan.net.nz> Tue, 23 Feb 2010 23:26:10 +1300
|
||||
|
||||
davical (0.9.8.1-0) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Andrew McMillan <debian@mcmillan.net.nz> Fri, 05 Feb 2010 08:51:01 -0800
|
||||
|
||||
davical (0.9.8-0) unstable; urgency=low
|
||||
|
||||
* New upstream release (closes: #561288, #561285)
|
||||
|
||||
-- Andrew McMillan <debian@mcmillan.net.nz> Fri, 25 Dec 2009 00:49:47 +1300
|
||||
|
||||
davical (0.9.7.6-0) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Andrew McMillan <debian@mcmillan.net.nz> Sat, 24 Oct 2009 12:42:37 +1300
|
||||
|
||||
davical (0.9.7.5-0) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Andrew McMillan <debian@mcmillan.net.nz> Thu, 22 Oct 2009 20:15:38 +1300
|
||||
|
||||
davical (0.9.7.4-0) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Andrew McMillan <debian@mcmillan.net.nz> Wed, 07 Oct 2009 17:03:14 -0700
|
||||
|
||||
davical (0.9.7.3-0) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Andrew McMillan <debian@mcmillan.net.nz> Tue, 06 Oct 2009 12:41:48 -0700
|
||||
|
||||
davical (0.9.7.2-0) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
|
||||
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
5
|
||||
65
debian/control
vendored
65
debian/control
vendored
@ -1,55 +1,34 @@
|
||||
Source: davical
|
||||
Section: web
|
||||
Maintainer: Davical Development Team <davical-devel@lists.sourceforge.net>
|
||||
Uploaders: Andrew McMillan <awm@debian.org>,
|
||||
Florian Schlichting <fsfs@debian.org>
|
||||
Standards-Version: 4.7.4
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
dh-exec,
|
||||
jdupes,
|
||||
libawl-php (>= 0.65-1~), libawl-php (<< 0.66),
|
||||
gettext,
|
||||
doxygen,
|
||||
graphviz,
|
||||
php-cli | php5-cli,
|
||||
phpunit
|
||||
Vcs-Git: https://gitlab.com/davical-project/davical.git
|
||||
Vcs-Browser: https://gitlab.com/davical-project/davical
|
||||
Homepage: https://www.davical.org/
|
||||
Priority: extra
|
||||
Maintainer: Andrew McMillan <debian@mcmillan.net.nz>
|
||||
Standards-Version: 3.8.1
|
||||
Build-Depends: debhelper (>= 5)
|
||||
Vcs-git: git://repo.or.cz/davical.git
|
||||
Vcs-browser: http://repo.or.cz/w/davical.git
|
||||
Homepage: http://davical.org/
|
||||
|
||||
Package: davical
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, ${perl:Depends},
|
||||
libawl-php (>= 0.65-1~), libawl-php (<< 0.66),
|
||||
libdbd-pg-perl,
|
||||
libyaml-perl,
|
||||
php | php5,
|
||||
php-cli | php5-cli,
|
||||
php-pgsql | php5-pgsql,
|
||||
php-xml | php5,
|
||||
postgresql-client
|
||||
Recommends: php-curl | php5-curl,
|
||||
postgresql
|
||||
Suggests: php-ldap | php5-ldap
|
||||
Description: PHP CalDAV and CardDAV Server
|
||||
The DAViCal CalDAV Server is designed to store CalDAV calendars and
|
||||
CardDAV addressbooks, such as those from Evolution, Sunbird/Lightning,
|
||||
Mulberry, iCal, iPhone or SOHO Organizer, in a central location,
|
||||
providing shared calendars, free/busy publication and a
|
||||
basic administration interface.
|
||||
Depends: debconf (>= 1.0.32), php5, php5-pgsql, postgresql-client-8.4 | postgresql-client-8.3 | postgresql-client-8.2 | postgresql-client-8.1, libawl-php (=0.37), libclass-dbi-pg-perl, libyaml-perl
|
||||
Conflicts: rscds
|
||||
Description: The DAViCal CalDAV Server
|
||||
The DAViCal CalDAV Server is designed to trivially store
|
||||
CalDAV calendars, such as those from Evolution, Sunbird/Lightning,
|
||||
Mulberry, iCal or SOHO Organizer, in a central location, providing
|
||||
shared calendars, free/busy publication and basic administration
|
||||
|
||||
Package: davical-doc
|
||||
Section: doc
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}
|
||||
Description: PHP CalDAV and CardDAV Server - technical documentation
|
||||
The DAViCal CalDAV Server is designed to store CalDAV calendars and
|
||||
CardDAV addressbooks, such as those from Evolution, Sunbird/Lightning,
|
||||
Mulberry, iCal, iPhone or SOHO Organizer, in a central location,
|
||||
providing shared calendars, free/busy publication and a
|
||||
basic administration interface.
|
||||
Depends:
|
||||
Description: The DAViCal CalDAV Server - documentation
|
||||
The DAViCal CalDAV Server is designed to trivially store
|
||||
CalDAV calendars, such as those from Evolution, Sunbird/Lightning,
|
||||
Mulberry, iCal or SOHO Organizer, in a central location, providing
|
||||
shared calendars, free/busy publication and basic administration
|
||||
.
|
||||
This package contains detailed technical documentation for the
|
||||
classes and methods in the DAViCal programs. Some user-centric
|
||||
classes and methods in the DAViCal programs. Some user-centric
|
||||
configuration documentation is also included.
|
||||
|
||||
|
||||
157
debian/copyright
vendored
157
debian/copyright
vendored
@ -1,132 +1,47 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Source: https://gitlab.com/davical-project/davical
|
||||
Upstream-Name: davical
|
||||
Upstream-Contact: davical-devel@lists.sourceforge.net
|
||||
This package was debianized by Andrew McMillan <andrew@mcmillan.net.nz>
|
||||
|
||||
Files: *
|
||||
Copyright: 2006 - 2013, Andrew McMillan <andrew@mcmillan.net.nz>
|
||||
2006 - 2008, Catalyst IT Ltd
|
||||
2008 - 2013, Morphoss Ltd
|
||||
2007 - 2026, Davical contributors (see CREDITS for details)
|
||||
License: GPL-2+
|
||||
It was downloaded from http://sourceforge.net/projects/rscds/
|
||||
|
||||
Files: dba/caldav_functions.sql htdocs/public.php htdocs/tools.php
|
||||
inc/pubsub.php inc/caldav-MKCOL.php inc/log_caldav_action.php
|
||||
inc/caldav-ACL.php inc/caldav-PROPPATCH.php
|
||||
inc/HTTPAuthSession.php inc/caldav-client.php inc/DAViCalSession.php
|
||||
inc/caldav-REPORT.php inc/caldav-MOVE.php
|
||||
Copyright: 2006 - 2013, Andrew McMillan <andrew@mcmillan.net.nz>
|
||||
2006 - 2008, Catalyst IT Ltd
|
||||
2008 - 2013, Morphoss Ltd
|
||||
2007 - 2026, Davical contributors (see CREDITS for details)
|
||||
License: GPL-2
|
||||
Upstream Author: Andrew McMillan <andrew@mcmillan.net.nz>
|
||||
|
||||
Files: htdocs/tz.php inc/CalDAVRequest.php inc/iSchedule-POST.php
|
||||
inc/DAVResource.php inc/external-fetch.php inc/DAVTicket.php
|
||||
inc/iSchedule.php inc/tz/* scripts/tz-update.php scripts/refresh-alarms.php
|
||||
scripts/archive-old-events.php
|
||||
Copyright: 2006 - 2013, Andrew McMillan <andrew@mcmillan.net.nz>
|
||||
2006 - 2008, Catalyst IT Ltd
|
||||
2008 - 2013, Morphoss Ltd
|
||||
2007 - 2026, Davical contributors (see CREDITS for details)
|
||||
License: GPL-3+
|
||||
Copyright: 2006-2009 Andrew McMillan
|
||||
|
||||
Files: inc/caldav-client-v2.php
|
||||
Copyright: 2006 - 2013, Andrew McMillan <andrew@mcmillan.net.nz>
|
||||
2006 - 2008, Catalyst IT Ltd
|
||||
2008 - 2013, Morphoss Ltd
|
||||
2007 - 2026, Davical contributors (see CREDITS for details)
|
||||
License: LGPL-3+
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Files: inc/check_UTF8.php
|
||||
Copyright: 1998, Netscape Communications Corporation
|
||||
2003, Henri Sivonen, hsivonen@iki.fi
|
||||
License: NPL-1.1_or_GPL-2+_or_LGPL-2.1+
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.1 (the "License"); you may not use this file except in
|
||||
compliance with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/NPL/
|
||||
.
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
.
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
use your version of this file under the terms of the NPL, indicate your
|
||||
decision by deleting the provisions above and replace them with the notice
|
||||
and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the NPL, the GPL or the LGPL.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
Files: scripts/davical-cli
|
||||
Copyright: 2016, Sarenet S.A.U (http://www.sarenet.es/)
|
||||
License: 3-clause-bsd
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of Sarenet S.A.U nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
.
|
||||
THIS SOFTWARE IS PROVIDED BY SARENET S.A.U AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL SARENET S.A.U OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301, USA
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2006-2012, Andrew McMillan <awm@debian.org>
|
||||
2014-2026, Florian Schlichting <fsfs@debian.org>
|
||||
License: GPL-2+
|
||||
You are free to distribute this software under the terms of the GNU General
|
||||
Public License. On Debian systems, the complete text of the GNU General
|
||||
Public License can be found in /usr/share/common-licenses/GPL file.
|
||||
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
.
|
||||
On Debian systems, the complete text of version 2 of the GNU General
|
||||
Public License can be found in `/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
License: GPL-2
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of version 2 of the GNU General Public License as
|
||||
published by the Free Software Foundation.
|
||||
.
|
||||
On Debian systems, the complete text of version 2 of the GNU General
|
||||
Public License can be found in `/usr/share/common-licenses/GPL-2'.
|
||||
License for Translation Building code
|
||||
=====================================
|
||||
The following files inherit their license separately:
|
||||
scripts/po/extract.pl
|
||||
scripts/po/rebuild-translations.sh
|
||||
|
||||
License: GPL-3+
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 3, or (at your option) any
|
||||
later version.
|
||||
.
|
||||
On Debian systems, the complete text of version 3 of the GNU General
|
||||
Public License can be found in `/usr/share/common-licenses/GPL-3'.
|
||||
The process used for building the translations for DAViCal is based on
|
||||
prior code originally from the Horde project and subsequently from the
|
||||
Gallery project. It has also been somewhat further modified here.
|
||||
|
||||
License: LGPL-3+
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
.
|
||||
On Debian systems, the complete text of version 3 of the GNU Lesser
|
||||
General Public License can be found in `/usr/share/common-licenses/LGPL-3'.
|
||||
The applicable Horde license is the LGPL, as identified here:
|
||||
http://cvs.horde.org/co.php/horde/COPYING?r=2.1
|
||||
|
||||
Authors:
|
||||
Copyright 2000-2002 Joris Braakman <jbraakman@yahoo.com>
|
||||
Copyright 2001-2002 Chuck Hagenbuch <chuck@horde.org>
|
||||
Copyright 2001-2002 Jan Schneider <jan@horde.org>
|
||||
Copyright 2002-2003 Bharat Mediratta <bharat@menalto.co>
|
||||
Copyright 2006-2008 Andrew McMillan <andrew@mcmillan.net.nz>
|
||||
|
||||
12
debian/davical-doc.doc-base.api
vendored
12
debian/davical-doc.doc-base.api
vendored
@ -1,12 +0,0 @@
|
||||
Document: davical-api
|
||||
Title: DAViCal API Documentation
|
||||
Section: Programming/PHP
|
||||
Abstract: Technical documentation for DAViCal
|
||||
The DAViCal CalDAV & CardDAV Server is designed to store CalDAV calendars and
|
||||
CardDAV addressbooks in a central location, providing shared calendars,
|
||||
free/busy publication and a basic administration interface. This API
|
||||
documentation details the classes and methods in die DAViCal programs.
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/davical/api/index.html
|
||||
Files: /usr/share/doc/davical/api/*.html
|
||||
3
debian/davical-doc.docs
vendored
3
debian/davical-doc.docs
vendored
@ -1 +1,2 @@
|
||||
docs/*
|
||||
docs/website/
|
||||
docs/api/
|
||||
|
||||
12
debian/davical.install
vendored
Executable file → Normal file
12
debian/davical.install
vendored
Executable file → Normal file
@ -1,7 +1,5 @@
|
||||
#! /usr/bin/dh-exec
|
||||
dba htdocs inc locale usr/share/davical
|
||||
config/apache-davical.conf => etc/apache2/sites-available/davical.conf
|
||||
config/example-config.php => etc/davical/config.php
|
||||
config/* usr/share/doc/davical/examples
|
||||
scripts/*.php usr/share/davical/scripts
|
||||
scripts/davical-cli usr/share/davical/scripts
|
||||
dba htdocs inc locale usr/share/davical
|
||||
debian/keepme etc/davical/.keep
|
||||
config/example-config.php usr/share/doc/davical/examples/davical-conf.php
|
||||
config/example-administration.yml usr/share/doc/davical/examples/administration.yml
|
||||
config/debug-config.php config/other-config.php usr/share/doc/davical/examples
|
||||
|
||||
11
debian/davical.lintian-overrides
vendored
11
debian/davical.lintian-overrides
vendored
@ -1,11 +0,0 @@
|
||||
# this is lintian being stupid and failing to detect our alternative php-cli dependency - remove when dropping php5
|
||||
davical: php-script-but-no-php-cli-dep php (does not satisfy php-cli:any) [usr/share/davical/scripts/archive-old-events.php]
|
||||
davical: php-script-but-no-php-cli-dep php (does not satisfy php-cli:any) [usr/share/davical/scripts/cron-sync-ldap.php]
|
||||
davical: php-script-but-no-php-cli-dep php (does not satisfy php-cli:any) [usr/share/davical/scripts/export_calendar.php]
|
||||
davical: php-script-but-no-php-cli-dep php (does not satisfy php-cli:any) [usr/share/davical/scripts/load_calendar.php]
|
||||
davical: php-script-but-no-php-cli-dep php (does not satisfy php-cli:any) [usr/share/davical/scripts/refresh-alarms.php]
|
||||
davical: php-script-but-no-php-cli-dep php (does not satisfy php-cli:any) [usr/share/davical/scripts/tz-update.php]
|
||||
davical: php-script-but-no-php-cli-dep /usr/bin/php (does not satisfy php-cli:any) [usr/share/davical/scripts/sync-remote-caldav.php]
|
||||
# this is actually code, not documentation, even though it can be read by humans in addition to machines
|
||||
davical: package-contains-documentation-outside-usr-share-doc [usr/share/davical/dba/appuser_permissions.txt]
|
||||
davical: package-contains-documentation-outside-usr-share-doc [usr/share/davical/htdocs/robots.txt]
|
||||
20
debian/davical.postinst
vendored
20
debian/davical.postinst
vendored
@ -6,17 +6,21 @@ set -e
|
||||
PACKAGE=::package::
|
||||
[ -n "${DEBUG}" ] && echo "PostInst Parameters: $@"
|
||||
|
||||
#
|
||||
# Migrate directory location to /etc/davical from /etc/rscds
|
||||
#
|
||||
if [ -d /etc/rscds -a -d /etc/davical -a ! -h /etc/rscds ]; then
|
||||
for CNFFILE in /etc/rscds/*; do
|
||||
if [ -f "${CNFFILE}" ]; then
|
||||
mv "${CNFFILE}" /etc/davical
|
||||
fi
|
||||
done
|
||||
rmdir /etc/rscds
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
configure)
|
||||
# Attempt to run the database upgrade script with default
|
||||
# settings, but ignore any possible failure.
|
||||
/usr/share/davical/dba/update-davical-database > /var/log/davical-upgrade.log 2>&1 || true
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
# remove leftover /etc/davical/.keep directory, if empty (cf. #584185)
|
||||
[ -d /etc/davical/.keep ] && rmdir --ignore-fail-on-non-empty /etc/davical/.keep
|
||||
|
||||
exit 0
|
||||
|
||||
10
debian/davical.postrm
vendored
10
debian/davical.postrm
vendored
@ -7,9 +7,9 @@ PACKAGE=::package::
|
||||
|
||||
[ -n "${DEBUG}" ] && echo "PostRM Parameters: $@"
|
||||
|
||||
case $1 in
|
||||
purge)
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
# remove leftover /etc/davical/.keep directory, if empty (cf. #584185)
|
||||
[ -d /etc/davical/.keep ] && rmdir --ignore-fail-on-non-empty /etc/davical/.keep
|
||||
|
||||
exit 0
|
||||
|
||||
2
debian/davical.prerm
vendored
2
debian/davical.prerm
vendored
@ -9,8 +9,6 @@ PACKAGE=::package::
|
||||
|
||||
case $1 in
|
||||
remove)
|
||||
# This file might be hanging around in some cases. Fixes Bug#668980
|
||||
rm -f /var/log/davical-upgrade.log || true
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
15
debian/ignore_these_files
vendored
Normal file
15
debian/ignore_these_files
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
docs/rfc2068.html
|
||||
docs/rfc2445.html
|
||||
docs/rfc2518.html
|
||||
docs/rfc2616.html
|
||||
docs/rfc3744.html
|
||||
docs/IETF-CAP-RFC4324.txt
|
||||
docs/draft-dawson-ical-xml-dtd-01.txt
|
||||
docs/draft-ietf-calsch-many-xcal-02.txt
|
||||
docs/dusseault-caldav-15.txt.html
|
||||
docs/dusseault2005CalDAV.pdf
|
||||
docs/website/wiki
|
||||
htdocs/.gitignore
|
||||
inc/test-RRULE.php
|
||||
inc/DOM-PHP4-Compatibility.php
|
||||
inc/DOMDocumentCompatibility.php
|
||||
4
debian/rscds.docs
vendored
Normal file
4
debian/rscds.docs
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
README
|
||||
TODO
|
||||
INSTALL
|
||||
CREDITS
|
||||
5
debian/rscds.install
vendored
Normal file
5
debian/rscds.install
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
dba htdocs inc locale usr/share/rscds
|
||||
debian/keepme etc/davical/.keep
|
||||
config/example-config.php usr/share/doc/rscds/examples/davical-conf.php
|
||||
config/example-administration.yml usr/share/doc/rscds/examples/administration.yml
|
||||
config/debug-config.php config/other-config.php usr/share/doc/rscds/examples
|
||||
27
debian/rscds.postinst
vendored
Normal file
27
debian/rscds.postinst
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
[ -n "${DEBUG}" ] && set -o xtrace
|
||||
PACKAGE=::package::
|
||||
[ -n "${DEBUG}" ] && echo "PostInst Parameters: $@"
|
||||
|
||||
#
|
||||
# Migrate directory location to /etc/davical from /etc/rscds
|
||||
#
|
||||
if [ -d /etc/rscds -a -d /etc/davical -a ! -h /etc/rscds ]; then
|
||||
for CNFFILE in /etc/rscds/*; do
|
||||
if [ -f "${CNFFILE}" ]; then
|
||||
mv "${CNFFILE}" /etc/davical
|
||||
fi
|
||||
done
|
||||
rmdir /etc/rscds
|
||||
ln -s /etc/davical /etc/rscds
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
configure)
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
15
debian/rscds.postrm
vendored
Normal file
15
debian/rscds.postrm
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
[ -n "${DEBUG}" ] && set -o xtrace
|
||||
PACKAGE=::package::
|
||||
|
||||
[ -n "${DEBUG}" ] && echo "PostRM Parameters: $@"
|
||||
|
||||
case $1 in
|
||||
purge)
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
15
debian/rscds.prerm
vendored
Normal file
15
debian/rscds.prerm
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
[ -n "${DEBUG}" ] && set -o xtrace
|
||||
PACKAGE=::package::
|
||||
|
||||
[ -n "${DEBUG}" ] && echo "PreRM Parameters: $@"
|
||||
|
||||
case $1 in
|
||||
remove)
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
98
debian/rules
vendored
98
debian/rules
vendored
@ -1,29 +1,89 @@
|
||||
#!/usr/bin/make -f
|
||||
#
|
||||
# rules for DAViCal
|
||||
#
|
||||
# This file allows you to build any of the binary packages independantly, via binary-<package> targets.
|
||||
|
||||
include /usr/share/dpkg/pkg-info.mk
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
get-orig-source:
|
||||
make clean
|
||||
git clean -idx
|
||||
tar cJf ../davical_$(DEB_VERSION_UPSTREAM).orig.tar.xz --exclude-vcs --exclude=.gitattributes --exclude=debian .
|
||||
# This has to be exported to make some magic below work.
|
||||
export DH_OPTIONS
|
||||
|
||||
%:
|
||||
dh $@
|
||||
build: build-stamp
|
||||
build-stamp:
|
||||
dh_testdir
|
||||
$(MAKE)
|
||||
touch build-stamp
|
||||
|
||||
override_dh_auto_build:
|
||||
make all
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp
|
||||
|
||||
$(MAKE) clean
|
||||
-rm -f build
|
||||
|
||||
dh_clean
|
||||
|
||||
install: DH_OPTIONS=
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_prep
|
||||
dh_installdirs
|
||||
|
||||
override_dh_install:
|
||||
dh_install
|
||||
rm debian/davical/usr/share/davical/htdocs/.htaccess || true
|
||||
rm -f debian/davical/usr/share/doc/davical/examples/apache-davical.conf \
|
||||
debian/davical/usr/share/doc/davical/examples/example-config.php
|
||||
sed -i -e '1s|^#!/usr/bin/env perl|#!/usr/bin/perl|' debian/davical/usr/share/davical/dba/update-davical-database
|
||||
|
||||
override_dh_installchangelogs:
|
||||
# This single target is used to build all the packages, all at once, or
|
||||
# one at a time. So keep in mind: any options passed to commands here will
|
||||
# affect _all_ packages. Anything you want to only affect one package
|
||||
# should be put in another target, such as the install target.
|
||||
binary-common:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs ChangeLog
|
||||
dh_installdocs --exclude=.gitignore
|
||||
# dh_installexamples
|
||||
# dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installcatalogs
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_installinit
|
||||
# dh_installman
|
||||
# dh_installcron
|
||||
# dh_installinfo
|
||||
# dh_installwm
|
||||
# dh_installudev
|
||||
# dh_lintian
|
||||
# dh_undocumented
|
||||
# dh_strip
|
||||
# dh_link
|
||||
dh_compress --exclude=.js
|
||||
dh_fixperms
|
||||
# dh_perl
|
||||
# dh_python
|
||||
# dh_makeshlibs
|
||||
dh_installdeb
|
||||
# dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
override_dh_installdocs:
|
||||
dh_installdocs
|
||||
find debian/davical-doc/ -name '*.md5' -delete
|
||||
jdupes -rl debian/davical-doc/
|
||||
# Build architecture independant packages using the common target.
|
||||
binary-indep: build install
|
||||
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
|
||||
|
||||
# Build architecture dependant packages using the common target.
|
||||
binary-arch: build install
|
||||
|
||||
# Any other binary targets build just one binary package at a time.
|
||||
binary-%: build install
|
||||
make -f debian/rules binary-common DH_OPTIONS=-p$*
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
|
||||
.PHONY: build clean binary-indep binary-arch binary-common binary install
|
||||
|
||||
1
debian/source/format
vendored
1
debian/source/format
vendored
@ -1 +0,0 @@
|
||||
3.0 (quilt)
|
||||
3
debian/tests/control
vendored
3
debian/tests/control
vendored
@ -1,3 +0,0 @@
|
||||
# https://people.debian.org/~eriberto/README.package-tests.html
|
||||
Tests: syntax, phpunit
|
||||
Depends: davical, php-cli, phpunit
|
||||
8
debian/tests/phpunit
vendored
8
debian/tests/phpunit
vendored
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
# run our test suite, but on the installed package
|
||||
|
||||
set -e
|
||||
|
||||
# 2) phpunit tests
|
||||
phpunit --include-path "/usr/share/davical:/usr/share/awl" --do-not-cache-result testing/phpunit
|
||||
|
||||
19
debian/tests/syntax
vendored
19
debian/tests/syntax
vendored
@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
# run our test suite, but on the installed package
|
||||
|
||||
set -e
|
||||
|
||||
# 1) simple php syntax check
|
||||
for PHP in /usr/share/davical/htdocs/*.php /usr/share/davical/inc/*.php
|
||||
do
|
||||
php -l ${PHP} >> $AUTOPKGTEST_TMP/test-syntax
|
||||
done
|
||||
|
||||
if grep -v 'No syntax errors detected' $AUTOPKGTEST_TMP/test-syntax
|
||||
then
|
||||
cat $AUTOPKGTEST_TMP/test-syntax
|
||||
exit 1
|
||||
else
|
||||
echo "OK (Syntax checked)";
|
||||
fi
|
||||
rm $AUTOPKGTEST_TMP/test-syntax
|
||||
2
debian/upstream/metadata
vendored
2
debian/upstream/metadata
vendored
@ -1,2 +0,0 @@
|
||||
Repository: https://gitlab.com/davical-project/davical
|
||||
Bug-Database: https://gitlab.com/davical-project/davical/issues
|
||||
5
debian/watch
vendored
5
debian/watch
vendored
@ -1,5 +0,0 @@
|
||||
Version: 5
|
||||
|
||||
Template: GitLab
|
||||
Dist: https://gitlab.com/davical-project/davical
|
||||
Matching-Pattern: r(\d[\-+\.:\~\da-zA-Z]*)
|
||||
1
docs/.gitignore
vendored
1
docs/.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
api/
|
||||
IETF-CAP-RFC4324.txt
|
||||
draft-dawson-ical-xml-dtd-01.txt
|
||||
draft-desruisseaux-caldav-sched-02.html
|
||||
|
||||
3010
docs/Doxyfile
3010
docs/Doxyfile
File diff suppressed because it is too large
Load Diff
575
docs/api/awl/PdoQuery/PdoDatabase.html
Normal file
575
docs/api/awl/PdoQuery/PdoDatabase.html
Normal file
@ -0,0 +1,575 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class PdoDatabase</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
|
||||
alt=" Class"
|
||||
title=" Class"
|
||||
style="vertical-align: middle"> PdoDatabase</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Typically there will only be a single instance of the database level class in an application.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_inc---PdoQuery.php.html">/inc/PdoQuery.php</a> (line <span class="field">218</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a name="sec-var-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variable Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="var-summary">
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$querycount" title="details" class="var-name">$querycount</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$querytime" title="details" class="var-name">$querytime</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$txnstate" title="details" class="var-name">$txnstate</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
||||
|
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Constructor.png" alt=" "/>
|
||||
<span class="method-result">PdoDatabase</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$connection_string</span>, [<span class="var-type">string</span> <span class="var-name">$dbuser</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$dbpass</span> = <span class="var-default">null</span>], [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#Begin" title="details" class="method-name">Begin</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#Commit" title="details" class="method-name">Commit</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">mixed</span>
|
||||
<a href="#Exec" title="details" class="method-name">Exec</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$sql_query_string</span>, <span class="var-type">mixed</span> <span class="var-name">1</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#GetFields" title="details" class="method-name">GetFields</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$tablename_string</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#Prepare" title="details" class="method-name">Prepare</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$sql_query_string</span>, <span class="var-type">mixed</span> <span class="var-name">1</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#PrepareTranslated" title="details" class="method-name">PrepareTranslated</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#Rollback" title="details" class="method-name">Rollback</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#TotalDuration" title="details" class="method-name">TotalDuration</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#TotalQueries" title="details" class="method-name">TotalQueries</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#TransactionState" title="details" class="method-name">TransactionState</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#TranslateAll" title="details" class="method-name">TranslateAll</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$onoff_boolean</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
|
||||
<a name="var$querycount" id="$querycount"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$querycount</span>
|
||||
= <span class="var-default"> 0</span> (line <span class="line-number">241</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Holds the count of queries executed so far</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$querytime" id="$querytime"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$querytime</span>
|
||||
= <span class="var-default"> 0</span> (line <span class="line-number">246</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Holds the total duration of queries executed so far</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$txnstate" id="$txnstate"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$txnstate</span>
|
||||
= <span class="var-default"> 0</span> (line <span class="line-number">236</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Holds the state of the transaction 0 = not started, 1 = in progress, -1 = error pending rollback/commit</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Constructor.png" />
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number">262</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The connection string is in the standard PDO format. The database won't actually be connected until the first database query is run against it.</p>
|
||||
<p class="description"><p>The database object will also initialise and hold an PdoDialect object which will be used to provide database specific SQL for some queries, as well as translation hooks for instances where it is necessary to modify the SQL in transit to support additional databases.</p></p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">PdoDatabase</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$connection_string</span>, [<span class="var-type">string</span> <span class="var-name">$dbuser</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$dbpass</span> = <span class="var-default">null</span>], [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$connection_string</span><span class="var-description">: The PDO connection string, in all it's glory</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$dbuser</span><span class="var-description">: The database username to connect as</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$dbpass</span><span class="var-description">: The database password to connect with</span> </li>
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$options</span><span class="var-description">: An array of driver options</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodBegin" id="Begin"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">Begin</span> (line <span class="line-number">303</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Begin a transaction.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
Begin
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodCommit" id="Commit"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">Commit</span> (line <span class="line-number">317</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Complete a transaction.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
Commit
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodExec" id="Exec"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">Exec</span> (line <span class="line-number">287</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Construct and execute an SQL statement from the sql_string, replacing the parameters into it.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> false on error or number of rows affected. Test failure with === false</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">mixed</span>
|
||||
<span class="method-name">
|
||||
Exec
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$sql_query_string</span>, <span class="var-type">mixed</span> <span class="var-name">1</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$sql_query_string</span><span class="var-description">: The SQL string containing optional variable replacements</span> </li>
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">1</span><span class="var-description">: ... Subsequent arguments are positionally replaced into the $sql_query_string</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodGetFields" id="GetFields"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">GetFields</span> (line <span class="line-number">368</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Returns an associative array of field types, keyed by field name, for the requested named table. Internally this calls PdoDialect::GetFields to get the required SQL and then processes the query in the normal manner.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
GetFields
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$tablename_string</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$tablename_string</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodPrepare" id="Prepare"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">Prepare</span> (line <span class="line-number">273</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Returns a PdoQuery object created using this database, the supplied SQL string, and any parameters given.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
Prepare
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$sql_query_string</span>, <span class="var-type">mixed</span> <span class="var-name">1</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$sql_query_string</span><span class="var-description">: The SQL string containing optional variable replacements</span> </li>
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">1</span><span class="var-description">: ... Subsequent arguments are positionally replaced into the $sql_query_string</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodPrepareTranslated" id="PrepareTranslated"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">PrepareTranslated</span> (line <span class="line-number">376</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Operates identically to PdoDatabase::Prepare, except that PdoDialect::Translate() will be called on the query before any processing.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
PrepareTranslated
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodRollback" id="Rollback"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">Rollback</span> (line <span class="line-number">328</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Cancel a transaction in progress.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
Rollback
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodTotalDuration" id="TotalDuration"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">TotalDuration</span> (line <span class="line-number">351</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Returns the total duration of quries executed so far by this object instance.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
TotalDuration
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodTotalQueries" id="TotalQueries"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">TotalQueries</span> (line <span class="line-number">359</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Returns the total number of quries executed by this object instance.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
TotalQueries
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodTransactionState" id="TransactionState"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">TransactionState</span> (line <span class="line-number">343</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Returns the current state of a transaction, indicating if we have begun a transaction, whether the transaction has failed, or if we are not in a transaction.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
TransactionState
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodTranslateAll" id="TranslateAll"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">TranslateAll</span> (line <span class="line-number">384</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Switches on or off the processing flag controlling whether subsequent calls to PdoDatabase::Prepare are translated as if PrepareTranslated() had been called.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
TranslateAll
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$onoff_boolean</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$onoff_boolean</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:12:00 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
315
docs/api/awl/PdoQuery/PdoDialect.html
Normal file
315
docs/api/awl/PdoQuery/PdoDialect.html
Normal file
@ -0,0 +1,315 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class PdoDialect</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
|
||||
alt=" Class"
|
||||
title=" Class"
|
||||
style="vertical-align: middle"> PdoDialect</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The PdoDialect class handles</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_inc---PdoQuery.php.html">/inc/PdoQuery.php</a> (line <span class="field">41</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a name="sec-var-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variable Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="var-summary">
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$dialect" title="details" class="var-name">$dialect</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
||||
|
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Constructor.png" alt=" "/>
|
||||
<span class="method-result">PdoDialect</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$connection_string</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#GetFields" title="details" class="method-name">GetFields</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$tablename_string</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#Quote" title="details" class="method-name">Quote</a>
|
||||
(<span class="var-type">mixed</span> <span class="var-name">$value</span>, [<span class="var-type">string</span> <span class="var-name">$value_type</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">The</span>
|
||||
<a href="#ReplaceParameters" title="details" class="method-name">ReplaceParameters</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">0</span>, <span class="var-type">mixed</span> <span class="var-name">1</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#Translate" title="details" class="method-name">Translate</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$sql_string</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
|
||||
<a name="var$dialect" id="$dialect"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$dialect</span>
|
||||
(line <span class="line-number">49</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Holds the name of the database dialect</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Constructor.png" />
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number">60</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Parses the connection string to ascertain the database dialect. Returns true if the dialect is supported and fails if the dialect is not supported. All code to support any given database should be within in an external include.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">PdoDialect</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$connection_string</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$connection_string</span><span class="var-description">: The full PDO connection string</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodGetFields" id="GetFields"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">GetFields</span> (line <span class="line-number">76</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Returns the SQL for the current database dialect which will return a two-column resultset containing a list of fields and their associated data types.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
GetFields
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$tablename_string</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$tablename_string</span><span class="var-description">: The name of the table we want fields from</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodQuote" id="Quote"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">Quote</span> (line <span class="line-number">114</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Returns $value escaped in an appropriate way for this database dialect.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
Quote
|
||||
</span>
|
||||
(<span class="var-type">mixed</span> <span class="var-name">$value</span>, [<span class="var-type">string</span> <span class="var-name">$value_type</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$value</span><span class="var-description">: The value to be escaped</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$value_type</span><span class="var-description">: The type of escaping desired. If blank this will be worked out from gettype($value). The special type of 'identifier' can also be used for escaping of SQL identifiers.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodReplaceParameters" id="ReplaceParameters"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">ReplaceParameters</span> (line <span class="line-number">167</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Replaces query parameters with appropriately escaped substitutions.</p>
|
||||
<p class="description"><p>The function takes a variable number of arguments, the first is the SQL string, with replaceable '?' characters (a la DBI). The subsequent parameters being the values to replace into the SQL string.</p><p>The values passed to the routine are analyzed for type, and quoted if they appear to need quoting. This can go wrong for (e.g.) NULL or other special SQL values which are not straightforwardly identifiable as needing quoting (or not). In such cases the parameter can be forced to be inserted unquoted by passing it as "array( 'plain' => $param )".</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> built query string</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">The</span>
|
||||
<span class="method-name">
|
||||
ReplaceParameters
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">0</span>, <span class="var-type">mixed</span> <span class="var-name">1</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">0</span><span class="var-description">: The query string with replacable '?' characters.</span> </li>
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">1</span><span class="var-description">: The values to replace into the SQL string.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodTranslate" id="Translate"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">Translate</span> (line <span class="line-number">101</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Translates the given SQL string into a form that will hopefully work for this database dialect. This hook is expected to be used by developers to provide support for differences in database operation by translating the query string in an arbitrary way, such as through a file or database lookup.</p>
|
||||
<p class="description"><p>The actual translation to other SQL dialects will usually be application-specific, so that any routines called by this will usually be external to this library, or will use resources external to this library.</p></p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
Translate
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$sql_string</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$sql_string</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:12:00 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
304
docs/api/awl/PdoQuery/PdoQuery.html
Normal file
304
docs/api/awl/PdoQuery/PdoQuery.html
Normal file
@ -0,0 +1,304 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class PdoQuery</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
|
||||
alt=" Class"
|
||||
title=" Class"
|
||||
style="vertical-align: middle"> PdoQuery</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">A variable of this class is normally constructed through a call to PdoDatabase::Query or PdoDatabase::Prepare, associating it on construction with the database which is to be queried.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_inc---PdoQuery.php.html">/inc/PdoQuery.php</a> (line <span class="field">395</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Constructor.png" alt=" "/>
|
||||
<span class="method-result">PdoQuery</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#Exec" title="details" class="method-name">Exec</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#Fetch" title="details" class="method-name">Fetch</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#FetchAll" title="details" class="method-name">FetchAll</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#FetchArray" title="details" class="method-name">FetchArray</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#MaxDuration" title="details" class="method-name">MaxDuration</a>
|
||||
(<span class="var-type">double</span> <span class="var-name">$seconds</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#Query" title="details" class="method-name">Query</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#Rows" title="details" class="method-name">Rows</a>
|
||||
()
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Constructor.png" />
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number">406</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Where $db is a PdoDatabase object. This constructs the PdoQuery. If there are further parameters they will be in turn, the sql, and any positional parameters to replace into that, and will be passed to $this->Query() before returning.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">PdoQuery</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodExec" id="Exec"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">Exec</span> (line <span class="line-number">435</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">If there are (some) positional parameters in the prepared query, now is the last chance to supply them...</p>
|
||||
<p class="description"><p>before the query is executed. Returns true on success and false on error.</p></p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
Exec
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodFetch" id="Fetch"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">Fetch</span> (line <span class="line-number">449</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Will fetch the next row from the query into an object with elements named for the fields in the result.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
Fetch
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodFetchAll" id="FetchAll"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">FetchAll</span> (line <span class="line-number">466</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Will fetch all result rows from the query into an array of objects with elements named for the fields in the result.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
FetchAll
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodFetchArray" id="FetchArray"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">FetchArray</span> (line <span class="line-number">458</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Will fetch the next row from the query into an array with numbered elements and with elements named for the fields in the result.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
FetchArray
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodMaxDuration" id="MaxDuration"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">MaxDuration</span> (line <span class="line-number">483</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Used to set the maximum duration for this query before it will be logged as a slow query.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
MaxDuration
|
||||
</span>
|
||||
(<span class="var-type">double</span> <span class="var-name">$seconds</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">double</span>
|
||||
<span class="var-name">$seconds</span><span class="var-description">: The maximum duration for this statement before logging it as 'slow'</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodQuery" id="Query"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">Query</span> (line <span class="line-number">421</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">If the sql is supplied then PDO::prepare will be called with that SQL to prepare the query, and if there are positional parameters then they will be replaced into the sql_string (with appropriate escaping) before the call to PDO::prepare. Query preparation time is counted towards total query execution time.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
Query
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodRows" id="Rows"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">Rows</span> (line <span class="line-number">474</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">An accessor for the number of rows affected when the query was executed.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
Rows
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:12:00 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
95
docs/api/awl/PdoQuery/_inc---PdoQuery.php.html
Normal file
95
docs/api/awl/PdoQuery/_inc---PdoQuery.php.html
Normal file
@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page PdoQuery.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name"><img src="../../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/inc/PdoQuery.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">PDO query class and associated functions</p>
|
||||
<p class="description"><p>This subpackage provides some functions that are useful around database activity and a PdoDialect, PdoDatabase and PdoQuery classes to simplify handling of database queries and provide some access for a limited ability to handle varying database dialects.</p><p>The class is intended to be a very lightweight wrapper with some features that have proved useful in developing and debugging web-based applications: <ul><li>All queries are timed, and an expected time can be provided.</li><li>Parameters replaced into the SQL will be escaped correctly in order to
|
||||
minimise the chances of SQL injection errors.</li><li>Queries which fail, or which exceed their expected execution time, will
|
||||
be logged for potential further analysis.</li><li>Debug logging of queries may be enabled globally, or restricted to
|
||||
particular sets of queries.</li><li>Simple syntax for iterating through a result set.</li></ul> See http://wiki.davical.org/w/PdoQuery for design and usage information.</p><p>If not already connected, PdoQuery will attempt to connect to the database, successively applying connection parameters from the array in $c->pdo_connect.</p><p>We will die if the database is not currently connected and we fail to find a working connection.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Andrew McMillan <<a href="mailto:andrew@morphoss.com">andrew@morphoss.com</a>></li>
|
||||
<li><span class="field">copyright:</span> Morphoss Ltd</li>
|
||||
<li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL v3</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
|
||||
<img src="../../media/images/Class.png"
|
||||
alt=" class"
|
||||
title=" class"/>
|
||||
<a href="../../awl/PdoQuery/PdoDialect.html">PdoDialect</a>
|
||||
</td>
|
||||
<td>
|
||||
The PdoDialect class handles
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
|
||||
<img src="../../media/images/Class.png"
|
||||
alt=" class"
|
||||
title=" class"/>
|
||||
<a href="../../awl/PdoQuery/PdoDatabase.html">PdoDatabase</a>
|
||||
</td>
|
||||
<td>
|
||||
Typically there will only be a single instance of the database level class in an application.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
|
||||
<img src="../../media/images/Class.png"
|
||||
alt=" class"
|
||||
title=" class"/>
|
||||
<a href="../../awl/PdoQuery/PdoQuery.html">PdoQuery</a>
|
||||
</td>
|
||||
<td>
|
||||
A variable of this class is normally constructed through a call to PdoDatabase::Query or PdoDatabase::Prepare, associating it on construction with the database which is to be queried.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:12:00 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
1277
docs/api/awl/caldav/CalDAVClient.html
Normal file
1277
docs/api/awl/caldav/CalDAVClient.html
Normal file
File diff suppressed because it is too large
Load Diff
176
docs/api/awl/caldav/RRule.html
Normal file
176
docs/api/awl/caldav/RRule.html
Normal file
@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class RRule</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
|
||||
alt=" Class"
|
||||
title=" Class"
|
||||
style="vertical-align: middle"> RRule</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">A Class for handling Events on a calendar which repeat</p>
|
||||
<p class="description"><p>Here's the spec, from RFC2445:</p><p>At this point we are going to restrict ourselves to parts of the RRULE specification seen in the wild. And by "in the wild" I don't include within people's timezone definitions. We always convert time zones to canonical names and assume the lower level libraries can do a better job with them than we can.</p><p>We will concentrate on: FREQ=(YEARLY|MONTHLY|WEEKLY|DAILY) UNTIL= COUNT= INTERVAL= BYDAY= BYMONTHDAY= BYSETPOS= WKST= BYYEARDAY= BYWEEKNO= BYMONTH=</p></p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_inc---RRule.php.html">/inc/RRule.php</a> (line <span class="field">691</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Constructor.png" alt=" "/>
|
||||
<span class="method-result">RRule</span>
|
||||
<a href="#RRule" title="details" class="method-name">RRule</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$start</span>, <span class="var-type"></span> <span class="var-name">$rrule</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#GetNext" title="details" class="method-name">&GetNext</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#WithinScope" title="details" class="method-name">WithinScope</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$base</span>, <span class="var-type"></span> <span class="var-name">$relative_days</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="methodRRule" id="RRule"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Constructor.png" />
|
||||
<span class="method-title">Constructor RRule</span> (line <span class="line-number">723</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The constructor takes a start date and an RRULE definition. Both of these follow the iCalendar standard.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">RRule</span>
|
||||
<span class="method-name">
|
||||
RRule
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$start</span>, <span class="var-type"></span> <span class="var-name">$rrule</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$start</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$rrule</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodGetNext" id="GetNext"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">GetNext</span> (line <span class="line-number">829</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This is most of the meat of the RRULE processing, where we find the next date.</p>
|
||||
<p class="description"><p>We maintain an</p></p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
&GetNext
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodWithinScope" id="WithinScope"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">WithinScope</span> (line <span class="line-number">769</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Processes the array of $relative_days to $base and removes any which are not within the scope of our rule.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
WithinScope
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$base</span>, <span class="var-type"></span> <span class="var-name">$relative_days</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$base</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$relative_days</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:12:00 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
80
docs/api/awl/caldav/_inc---RRule.php.html
Normal file
80
docs/api/awl/caldav/_inc---RRule.php.html
Normal file
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page RRule.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name"><img src="../../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/inc/RRule.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Class for parsing RRule and getting us the dates</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Andrew McMillan <<a href="mailto:andrew@catalyst.net.nz">andrew@catalyst.net.nz</a>></li>
|
||||
<li><span class="field">copyright:</span> Catalyst .Net Ltd</li>
|
||||
<li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL v2</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
|
||||
<img src="../../media/images/Class.png"
|
||||
alt=" class"
|
||||
title=" class"/>
|
||||
<a href="../../awl/caldav/iCalDate.html">iCalDate</a>
|
||||
</td>
|
||||
<td>
|
||||
A Class for handling dates in iCalendar format. We do make the simplifying assumption that all date handling in here is normalised to GMT. One day we might provide some functions to do that, but for now it is done externally.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
|
||||
<img src="../../media/images/Class.png"
|
||||
alt=" class"
|
||||
title=" class"/>
|
||||
<a href="../../awl/caldav/RRule.html">RRule</a>
|
||||
</td>
|
||||
<td>
|
||||
A Class for handling Events on a calendar which repeat
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:12:00 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
69
docs/api/awl/caldav/_inc---caldav-client.php.html
Normal file
69
docs/api/awl/caldav/_inc---caldav-client.php.html
Normal file
@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page caldav-client.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name"><img src="../../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/inc/caldav-client.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">A Class for connecting to a caldav server</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Andrew McMillan <<a href="mailto:debian@mcmillan.net.nz">debian@mcmillan.net.nz</a>></li>
|
||||
<li><span class="field">copyright:</span> Andrew McMillan</li>
|
||||
<li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL v2</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
|
||||
<img src="../../media/images/Class.png"
|
||||
alt=" class"
|
||||
title=" class"/>
|
||||
<a href="../../awl/caldav/CalDAVClient.html">CalDAVClient</a>
|
||||
</td>
|
||||
<td>
|
||||
A class for accessing DAViCal via CalDAV, as a client
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:11:56 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
949
docs/api/awl/caldav/iCalDate.html
Normal file
949
docs/api/awl/caldav/iCalDate.html
Normal file
@ -0,0 +1,949 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class iCalDate</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
|
||||
alt=" Class"
|
||||
title=" Class"
|
||||
style="vertical-align: middle"> iCalDate</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">A Class for handling dates in iCalendar format. We do make the simplifying assumption that all date handling in here is normalised to GMT. One day we might provide some functions to do that, but for now it is done externally.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_inc---RRule.php.html">/inc/RRule.php</a> (line <span class="field">21</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Constructor.png" alt=" "/>
|
||||
<span class="method-result">iCalDate</span>
|
||||
<a href="#iCalDate" title="details" class="method-name">iCalDate</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$input</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#AddDays" title="details" class="method-name">AddDays</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$dd</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#AddDuration" title="details" class="method-name">AddDuration</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$duration</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#AddMonths" title="details" class="method-name">AddMonths</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$mo</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">array</span>
|
||||
<a href="#ApplyBySetPos" title="details" class="method-name">&ApplyBySetPos</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$bysplist</span>, <span class="var-type">string</span> <span class="var-name">$set</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">string</span>
|
||||
<a href="#DateDifference" title="details" class="method-name">DateDifference</a>
|
||||
(<span class="var-type">date</span> <span class="var-name">$from</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#DaysInMonth" title="details" class="method-name">DaysInMonth</a>
|
||||
([<span class="var-type"></span> <span class="var-name">$mo</span> = <span class="var-default">false</span>], [<span class="var-type"></span> <span class="var-name">$yy</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">array</span>
|
||||
<a href="#GetMonthByDay" title="details" class="method-name">GetMonthByDay</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$byday</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">array</span>
|
||||
<a href="#GetMonthByMonthDay" title="details" class="method-name">GetMonthByMonthDay</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$bymonthday</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">array</span>
|
||||
<a href="#GetWeekByDay" title="details" class="method-name">GetWeekByDay</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$byday</span>, [<span class="var-type">string</span> <span class="var-name">$increasing</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">boolean</span>
|
||||
<a href="#GreaterThan" title="details" class="method-name">GreaterThan</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$lesser</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">boolean</span>
|
||||
<a href="#LessThan" title="details" class="method-name">LessThan</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$greater</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">array</span>
|
||||
<a href="#MonthDays" title="details" class="method-name">&MonthDays</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$dow_first</span>, <span class="var-type">string</span> <span class="var-name">$days_in_month</span>, <span class="var-type">string</span> <span class="var-name">$dayspec</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#Render" title="details" class="method-name">Render</a>
|
||||
([<span class="var-type"></span> <span class="var-name">$fmt</span> = <span class="var-default">'Y-m-d H:i:s'</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#RenderGMT" title="details" class="method-name">RenderGMT</a>
|
||||
([<span class="var-type"></span> <span class="var-name">$fmt</span> = <span class="var-default">'Ymd\THis\Z'</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#SetEpochDate" title="details" class="method-name">SetEpochDate</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$input</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#SetGMTDate" title="details" class="method-name">SetGMTDate</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$input</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#SetLocalDate" title="details" class="method-name">SetLocalDate</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$input</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#SetMonthDay" title="details" class="method-name">SetMonthDay</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$dd</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#SetWeekStart" title="details" class="method-name">SetWeekStart</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$weekstart</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">boolean</span>
|
||||
<a href="#TestByMonth" title="details" class="method-name">TestByMonth</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$monthlist</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#_EpochFromParts" title="details" class="method-name">_EpochFromParts</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#_GMTEpochFromParts" title="details" class="method-name">_GMTEpochFromParts</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#_GMTTextFromEpoch" title="details" class="method-name">_GMTTextFromEpoch</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#_PartsFromText" title="details" class="method-name">_PartsFromText</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#_TextFromEpoch" title="details" class="method-name">_TextFromEpoch</a>
|
||||
()
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="methodiCalDate" id="iCalDate"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Constructor.png" />
|
||||
<span class="method-title">Constructor iCalDate</span> (line <span class="line-number">50</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The constructor takes either an iCalendar date, a text string formatted as an iCalendar date, or epoch seconds.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">iCalDate</span>
|
||||
<span class="method-name">
|
||||
iCalDate
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$input</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$input</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodAddDays" id="AddDays"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">AddDays</span> (line <span class="line-number">265</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Add some integer number of days to a date</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
AddDays
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$dd</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$dd</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodAddDuration" id="AddDuration"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">AddDuration</span> (line <span class="line-number">293</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Add duration</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
AddDuration
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$duration</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$duration</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodAddMonths" id="AddMonths"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">AddMonths</span> (line <span class="line-number">237</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Add some number of months to a date</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
AddMonths
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$mo</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$mo</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodApplyBySetPos" id="ApplyBySetPos"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">ApplyBySetPos</span> (line <span class="line-number">563</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Given set position descriptions like '1', '3', '11', '-3' or '-1' and a set, return the subset matching the list of set positions.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> The subset which matches.</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">array</span>
|
||||
<span class="method-name">
|
||||
&ApplyBySetPos
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$bysplist</span>, <span class="var-type">string</span> <span class="var-name">$set</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$bysplist</span><span class="var-description">: The list of set positions.</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$set</span><span class="var-description">: The set of days that we will apply the positions to.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodDateDifference" id="DateDifference"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">DateDifference</span> (line <span class="line-number">331</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Produce an iCalendar format DURATION for the difference between this an another iCalDate</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> The date difference, as an iCalendar duration format</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
DateDifference
|
||||
</span>
|
||||
(<span class="var-type">date</span> <span class="var-name">$from</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">date</span>
|
||||
<span class="var-name">$from</span><span class="var-description">: The start of the period</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodDaysInMonth" id="DaysInMonth"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">DaysInMonth</span> (line <span class="line-number">188</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">No of days in a month 1(Jan) - 12(Dec)</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
DaysInMonth
|
||||
</span>
|
||||
([<span class="var-type"></span> <span class="var-name">$mo</span> = <span class="var-default">false</span>], [<span class="var-type"></span> <span class="var-name">$yy</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$mo</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$yy</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodGetMonthByDay" id="GetMonthByDay"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">GetMonthByDay</span> (line <span class="line-number">414</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Applies any BYDAY to the month to return a set of days</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> An array of the day numbers for the month which meet the rule.</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">array</span>
|
||||
<span class="method-name">
|
||||
GetMonthByDay
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$byday</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$byday</span><span class="var-description">: The BYDAY rule</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodGetMonthByMonthDay" id="GetMonthByMonthDay"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">GetMonthByMonthDay</span> (line <span class="line-number">435</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Applies any BYMONTHDAY to the month to return a set of days</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> An array of the day numbers for the month which meet the rule.</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">array</span>
|
||||
<span class="method-name">
|
||||
GetMonthByMonthDay
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$bymonthday</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$bymonthday</span><span class="var-description">: The BYMONTHDAY rule</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodGetWeekByDay" id="GetWeekByDay"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">GetWeekByDay</span> (line <span class="line-number">455</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Applies any BYDAY to the week to return a set of days</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> An array of the day numbers for the week which meet the rule.</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">array</span>
|
||||
<span class="method-name">
|
||||
GetWeekByDay
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$byday</span>, [<span class="var-type">string</span> <span class="var-name">$increasing</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$byday</span><span class="var-description">: The BYDAY rule</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$increasing</span><span class="var-description">: When we are moving by months, we want any day of the week, but when by day we only want to increase. Default false.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodGreaterThan" id="GreaterThan"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">GreaterThan</span> (line <span class="line-number">478</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Test if $this is greater than the date parameter</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> True if $this > $lesser</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">boolean</span>
|
||||
<span class="method-name">
|
||||
GreaterThan
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$lesser</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$lesser</span><span class="var-description">: The other date, as a local time string</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodLessThan" id="LessThan"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">LessThan</span> (line <span class="line-number">493</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Test if $this is less than the date parameter</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> True if $this < $greater</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">boolean</span>
|
||||
<span class="method-name">
|
||||
LessThan
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$greater</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$greater</span><span class="var-description">: The other date, as a local time string</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodMonthDays" id="MonthDays"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">MonthDays</span> (line <span class="line-number">512</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Given a MonthDays string like "1MO", "-2WE" return an integer day of the month.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> An array of the day numbers for the month which meet the rule.</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">array</span>
|
||||
<span class="method-name">
|
||||
&MonthDays
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$dow_first</span>, <span class="var-type">string</span> <span class="var-name">$days_in_month</span>, <span class="var-type">string</span> <span class="var-name">$dayspec</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$dow_first</span><span class="var-description">: The day of week of the first of the month.</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$days_in_month</span><span class="var-description">: The number of days in the month.</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$dayspec</span><span class="var-description">: The specification for a month day (or days) which we parse.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodRender" id="Render"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">Render</span> (line <span class="line-number">172</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Set the day of week used for calculation of week starts</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
Render
|
||||
</span>
|
||||
([<span class="var-type"></span> <span class="var-name">$fmt</span> = <span class="var-default">'Y-m-d H:i:s'</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$fmt</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodRenderGMT" id="RenderGMT"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">RenderGMT</span> (line <span class="line-number">180</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Render the date as GMT</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
RenderGMT
|
||||
</span>
|
||||
([<span class="var-type"></span> <span class="var-name">$fmt</span> = <span class="var-default">'Ymd\THis\Z'</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$fmt</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodSetEpochDate" id="SetEpochDate"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">SetEpochDate</span> (line <span class="line-number">104</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Set the date from an epoch</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
SetEpochDate
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$input</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$input</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodSetGMTDate" id="SetGMTDate"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">SetGMTDate</span> (line <span class="line-number">84</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Set the date from a text string</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
SetGMTDate
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$input</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$input</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodSetLocalDate" id="SetLocalDate"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">SetLocalDate</span> (line <span class="line-number">94</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Set the date from a text string</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
SetLocalDate
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$input</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$input</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodSetMonthDay" id="SetMonthDay"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">SetMonthDay</span> (line <span class="line-number">225</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Set the day in the month to what we have been given</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
SetMonthDay
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$dd</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$dd</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodSetWeekStart" id="SetWeekStart"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">SetWeekStart</span> (line <span class="line-number">163</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Set the day of week used for calculation of week starts</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
SetWeekStart
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$weekstart</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$weekstart</span><span class="var-description">: The day of the week which is the first business day.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodTestByMonth" id="TestByMonth"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">TestByMonth</span> (line <span class="line-number">402</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Test to see if our _mo matches something in the list of months we have received.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> Whether this date falls within one of those months.</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">boolean</span>
|
||||
<span class="method-name">
|
||||
TestByMonth
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$monthlist</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$monthlist</span><span class="var-description">: A comma-separated list of months.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method_EpochFromParts" id="_EpochFromParts"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">_EpochFromParts</span> (line <span class="line-number">152</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Given a local text date, convert it to an epoch</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
_EpochFromParts
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method_GMTEpochFromParts" id="_GMTEpochFromParts"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">_GMTEpochFromParts</span> (line <span class="line-number">143</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Given a GMT text date, convert it to an epoch</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
_GMTEpochFromParts
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method_GMTTextFromEpoch" id="_GMTTextFromEpoch"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">_GMTTextFromEpoch</span> (line <span class="line-number">122</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Given a GMT epoch date, convert it to text</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
_GMTTextFromEpoch
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method_PartsFromText" id="_PartsFromText"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">_PartsFromText</span> (line <span class="line-number">130</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Given a text date, convert it to parts</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
_PartsFromText
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method_TextFromEpoch" id="_TextFromEpoch"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">_TextFromEpoch</span> (line <span class="line-number">114</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Given an epoch date, convert it to text</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
_TextFromEpoch
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:12:00 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
13
docs/api/blank.html
Normal file
13
docs/api/blank.html
Normal file
@ -0,0 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>DAViCal</title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div align="center"><h1>DAViCal</h1></div>
|
||||
<b>Welcome to davical!</b><br />
|
||||
<br />
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.3.2</a><br />
|
||||
</body>
|
||||
</html>
|
||||
44
docs/api/classtrees_awl.html
Normal file
44
docs/api/classtrees_awl.html
Normal file
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Start of Class Data -->
|
||||
<H2>
|
||||
|
||||
</H2>
|
||||
<h2>Root class CalDAVClient</h2>
|
||||
<ul>
|
||||
<li><a href="awl/caldav/CalDAVClient.html">CalDAVClient</a></li></ul>
|
||||
|
||||
<h2>Root class iCalDate</h2>
|
||||
<ul>
|
||||
<li><a href="awl/caldav/iCalDate.html">iCalDate</a></li></ul>
|
||||
|
||||
<h2>Root class PdoDatabase</h2>
|
||||
<ul>
|
||||
<li><a href="awl/PdoQuery/PdoDatabase.html">PdoDatabase</a></li></ul>
|
||||
|
||||
<h2>Root class PdoDialect</h2>
|
||||
<ul>
|
||||
<li><a href="awl/PdoQuery/PdoDialect.html">PdoDialect</a></li></ul>
|
||||
|
||||
<h2>Root class PdoQuery</h2>
|
||||
<ul>
|
||||
<li><a href="awl/PdoQuery/PdoQuery.html">PdoQuery</a></li></ul>
|
||||
|
||||
<h2>Root class RRule</h2>
|
||||
<ul>
|
||||
<li><a href="awl/caldav/RRule.html">RRule</a></li></ul>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:11:56 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
60
docs/api/classtrees_davical.html
Normal file
60
docs/api/classtrees_davical.html
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Start of Class Data -->
|
||||
<H2>
|
||||
|
||||
</H2>
|
||||
<h2>Root class CalDAVPrincipal</h2>
|
||||
<ul>
|
||||
<li><a href="davical/Principal/CalDAVPrincipal.html">CalDAVPrincipal</a></li></ul>
|
||||
|
||||
<h2>Root class CalDAVRequest</h2>
|
||||
<ul>
|
||||
<li><a href="davical/Request/CalDAVRequest.html">CalDAVRequest</a></li></ul>
|
||||
|
||||
<h2>Root class HTTPAuthSession</h2>
|
||||
<ul>
|
||||
<li><a href="davical/HTTPAuthSession/HTTPAuthSession.html">HTTPAuthSession</a></li></ul>
|
||||
|
||||
<h2>Root class ldapDrivers</h2>
|
||||
<ul>
|
||||
<li><a href="davical/ldap/ldapDrivers.html">ldapDrivers</a></li></ul>
|
||||
|
||||
<h2>Root class PublicSession</h2>
|
||||
<ul>
|
||||
<li><a href="davical/PublicSession/PublicSession.html">PublicSession</a></li></ul>
|
||||
|
||||
<h2>Root class RRuleTest</h2>
|
||||
<ul>
|
||||
<li><a href="davical/RRuleTest.html">RRuleTest</a></li></ul>
|
||||
|
||||
<h2>Root class squidPamDrivers</h2>
|
||||
<ul>
|
||||
<li><a href="davical/ldap/squidPamDrivers.html">squidPamDrivers</a></li></ul>
|
||||
|
||||
<h2>Root class Tools</h2>
|
||||
<ul>
|
||||
<li><a href="davical/DAViCalSession/Tools.html">Tools</a></li></ul>
|
||||
|
||||
<h2>Root class Session</h2>
|
||||
<ul>
|
||||
<li><a href="davical/DAViCalSession/DAViCalSession.html">DAViCalSession</a></li></ul>
|
||||
|
||||
<h2>Root class User</h2>
|
||||
<ul>
|
||||
<li><a href="davical/DAViCalUser/DAViCalUser.html">DAViCalUser</a></li></ul>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:11:56 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
193
docs/api/davical/Admin/_htdocs---users.php.html
Normal file
193
docs/api/davical/Admin/_htdocs---users.php.html
Normal file
@ -0,0 +1,193 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page users.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name"><img src="../../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/htdocs/users.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-includes">Includes</a>
|
||||
| <a href="#sec-functions">Functions</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Display a list of all users</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Andrew McMillan <<a href="mailto:andrew@catalyst.net.nz">andrew@catalyst.net.nz</a>></li>
|
||||
<li><span class="field">copyright:</span> Catalyst .Net Ltd</li>
|
||||
<li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL v2</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-includes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Includes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Includes</span>
|
||||
| <a href="#sec-functions">Functions</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="_page-header_php"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div>
|
||||
<img src="../../media/images/Page.png" alt=" " />
|
||||
<span class="include-title">
|
||||
<span class="include-type">include</span>
|
||||
(<span class="include-name"><a href="../../davical/_inc---page-header.php.html">page-header.php</a></span>)
|
||||
(line <span class="line-number">75</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
<a name="_page-footer_php"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div>
|
||||
<img src="../../media/images/Page.png" alt=" " />
|
||||
<span class="include-title">
|
||||
<span class="include-type">include</span>
|
||||
(<span class="include-name"><a href="../../davical/_inc---page-footer.php.html">page-footer.php</a></span>)
|
||||
(line <span class="line-number">79</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
<a name="_DAViCalSession_php"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div>
|
||||
<img src="../../media/images/Page.png" alt=" " />
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name"><a href="../../davical/DAViCalSession/_inc---DAViCalSession.php.html">DAViCalSession.php</a></span>)
|
||||
(line <span class="line-number">12</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
<a name="_classBrowser_php"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div>
|
||||
<img src="../../media/images/Page.png" alt=" " />
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">"classBrowser.php"</span>)
|
||||
(line <span class="line-number">38</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
<a name="___/inc/always_php"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div>
|
||||
<img src="../../media/images/Page.png" alt=" " />
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name"><a href="../../davical/_inc---always.php.html">"../inc/always.php"</a></span>)
|
||||
(line <span class="line-number">11</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Display a list of all users</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Andrew McMillan <<a href="mailto:andrew@catalyst.net.nz">andrew@catalyst.net.nz</a>></li>
|
||||
<li><span class="field">copyright:</span> Catalyst .Net Ltd</li>
|
||||
<li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL v2</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<a name="_interactive-page_php"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div>
|
||||
<img src="../../media/images/Page.png" alt=" " />
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name"><a href="../../davical/_inc---interactive-page.php.html">interactive-page.php</a></span>)
|
||||
(line <span class="line-number">15</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a name="sec-functions"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Functions</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-includes">Includes</a>
|
||||
| <span class="disabled">Functions</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="functiontranslate_relationship_list" id="functiontranslate_relationship_list"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div>
|
||||
<img src="../../media/images/Function.png" />
|
||||
<span class="method-title">translate_relationship_list</span> (line <span class="line-number">22</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Translate relationship names in the relationship_list for each user. See the documentation for classBrowser::BrowserColumn for the definition of the hook function parameters.</p>
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
translate_relationship_list
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$value</span>, <span class="var-type"></span> <span class="var-name">$field</span>, <span class="var-type"></span> <span class="var-name">$row</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$value</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$field</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$row</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:12:01 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
360
docs/api/davical/HTTPAuthSession/HTTPAuthSession.html
Normal file
360
docs/api/davical/HTTPAuthSession/HTTPAuthSession.html
Normal file
@ -0,0 +1,360 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class HTTPAuthSession</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
|
||||
alt=" Class"
|
||||
title=" Class"
|
||||
style="vertical-align: middle"> HTTPAuthSession</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">A Class for handling a session using HTTP Basic Authentication</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_inc---HTTPAuthSession.php.html">/inc/HTTPAuthSession.php</a> (line <span class="field">17</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Constructor.png" alt=" "/>
|
||||
<span class="method-result">HTTPAuthSession</span>
|
||||
<a href="#HTTPAuthSession" title="details" class="method-name">HTTPAuthSession</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">boolean</span>
|
||||
<a href="#AllowedTo" title="details" class="method-name">AllowedTo</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$whatever</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#AssignSessionDetails" title="details" class="method-name">AssignSessionDetails</a>
|
||||
(<span class="var-type">object</span> <span class="var-name">$u</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#AuthFailedResponse" title="details" class="method-name">AuthFailedResponse</a>
|
||||
([<span class="var-type">string</span> <span class="var-name">$auth_header</span> = <span class="var-default">""</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#BasicAuthSession" title="details" class="method-name">BasicAuthSession</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#CheckPassword" title="details" class="method-name">CheckPassword</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$username</span>, <span class="var-type"></span> <span class="var-name">$password</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#DigestAuthSession" title="details" class="method-name">DigestAuthSession</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#GetRoles" title="details" class="method-name">GetRoles</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#ParseDigestHeader" title="details" class="method-name">ParseDigestHeader</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$auth_header</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="methodHTTPAuthSession" id="HTTPAuthSession"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Constructor.png" />
|
||||
<span class="method-title">Constructor HTTPAuthSession</span> (line <span class="line-number">50</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The constructor, which just calls the actual type configured</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">HTTPAuthSession</span>
|
||||
<span class="method-name">
|
||||
HTTPAuthSession
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodAllowedTo" id="AllowedTo"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">AllowedTo</span> (line <span class="line-number">244</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Checks whether a user is allowed to do something.</p>
|
||||
<p class="description"><p>The check is performed to see if the user has that role.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> Whether or not the user has the specified role.</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">boolean</span>
|
||||
<span class="method-name">
|
||||
AllowedTo
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$whatever</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$whatever</span><span class="var-description">: The role we want to know if the user has.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodAssignSessionDetails" id="AssignSessionDetails"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">AssignSessionDetails</span> (line <span class="line-number">267</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Internal function used to assign the session details to a user's new session.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
AssignSessionDetails
|
||||
</span>
|
||||
(<span class="var-type">object</span> <span class="var-name">$u</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">object</span>
|
||||
<span class="var-name">$u</span><span class="var-description">: The user+session object we (probably) read from the database.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodAuthFailedResponse" id="AuthFailedResponse"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">AuthFailedResponse</span> (line <span class="line-number">66</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Authorisation failed, so we send some headers to say so.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
AuthFailedResponse
|
||||
</span>
|
||||
([<span class="var-type">string</span> <span class="var-name">$auth_header</span> = <span class="var-default">""</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$auth_header</span><span class="var-description">: The WWW-Authenticate header details.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodBasicAuthSession" id="BasicAuthSession"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">BasicAuthSession</span> (line <span class="line-number">84</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Handle Basic HTTP Authentication (not secure unless https)</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
BasicAuthSession
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodCheckPassword" id="CheckPassword"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">CheckPassword</span> (line <span class="line-number">209</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">CheckPassword does all of the password checking and returns a user record object, or false if it all ends in tears.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
CheckPassword
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$username</span>, <span class="var-type"></span> <span class="var-name">$password</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$username</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$password</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodDigestAuthSession" id="DigestAuthSession"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">DigestAuthSession</span> (line <span class="line-number">156</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Handle Digest HTTP Authentication (no passwords were harmed in this transaction!)</p>
|
||||
<p class="description"><p>Note that this will not actually work, unless we can either: (A) store the password plain text in the database (B) store an md5( username || realm || password ) in the database</p><p>The problem is that potentially means that the administrator can collect the sorts of things people use as passwords. I believe this is quite a bad idea. In scenario (B) while they cannot see the password itself, they can see a hash which only varies when the password varies, so can see when two users have the same password, or can use some of the reverse lookup sites to attempt to reverse the hash. I think this is a less bad idea, but not ideal. Probably better than running Basic auth of HTTP though!</p></p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
DigestAuthSession
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodGetRoles" id="GetRoles"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">GetRoles</span> (line <span class="line-number">252</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Internal function used to get the user's roles from the database.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
GetRoles
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodParseDigestHeader" id="ParseDigestHeader"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">ParseDigestHeader</span> (line <span class="line-number">190</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Parse the HTTP Digest Auth Header</p>
|
||||
<p class="description"><p><ul><li>largely sourced from the PHP documentation</li></ul></p></p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
ParseDigestHeader
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$auth_header</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$auth_header</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:11:59 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page HTTPAuthSession.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name"><img src="../../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/inc/HTTPAuthSession.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">A Class for handling HTTP Authentication</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Andrew McMillan <<a href="mailto:andrew@catalyst.net.nz">andrew@catalyst.net.nz</a>></li>
|
||||
<li><span class="field">copyright:</span> Catalyst .Net Ltd</li>
|
||||
<li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL v2</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
|
||||
<img src="../../media/images/Class.png"
|
||||
alt=" class"
|
||||
title=" class"/>
|
||||
<a href="../../davical/HTTPAuthSession/HTTPAuthSession.html">HTTPAuthSession</a>
|
||||
</td>
|
||||
<td>
|
||||
A Class for handling a session using HTTP Basic Authentication
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:11:59 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
655
docs/api/davical/Principal/CalDAVPrincipal.html
Normal file
655
docs/api/davical/Principal/CalDAVPrincipal.html
Normal file
@ -0,0 +1,655 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class CalDAVPrincipal</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
|
||||
alt=" Class"
|
||||
title=" Class"
|
||||
style="vertical-align: middle"> CalDAVPrincipal</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">A class for things to do with a DAV Principal</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_inc---CalDAVPrincipal.php.html">/inc/CalDAVPrincipal.php</a> (line <span class="field">25</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a name="sec-var-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variable Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="var-summary">
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">Whether</span>
|
||||
<a href="#$by_email" title="details" class="var-name">$by_email</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">RFC4791:</span>
|
||||
<a href="#$calendar_home_set" title="details" class="var-name">$calendar_home_set</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">RFC3744:</span>
|
||||
<a href="#$group_membership" title="details" class="var-name">$group_membership</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">RFC3744:</span>
|
||||
<a href="#$group_member_set" title="details" class="var-name">$group_member_set</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">caldav-cu-proxy-02:</span>
|
||||
<a href="#$read_proxy_for" title="details" class="var-name">$read_proxy_for</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">caldav-cu-proxy-02:</span>
|
||||
<a href="#$read_proxy_group" title="details" class="var-name">$read_proxy_group</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">draft-desruisseaux-caldav-sched-03:</span>
|
||||
<a href="#$schedule_inbox_url" title="details" class="var-name">$schedule_inbox_url</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">draft-desruisseaux-caldav-sched-03:</span>
|
||||
<a href="#$schedule_outbox_url" title="details" class="var-name">$schedule_outbox_url</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">The</span>
|
||||
<a href="#$url" title="details" class="var-name">$url</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">caldav-cu-proxy-02:</span>
|
||||
<a href="#$write_proxy_for" title="details" class="var-name">$write_proxy_for</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<img src="../../media/images/Variable.png" alt=" " />
|
||||
<span class="var-type">caldav-cu-proxy-02:</span>
|
||||
<a href="#$write_proxy_group" title="details" class="var-name">$write_proxy_group</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
||||
|
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Constructor.png" alt=" "/>
|
||||
<span class="method-result">boolean</span>
|
||||
<a href="#CalDAVPrincipal" title="details" class="method-name">CalDAVPrincipal</a>
|
||||
([<span class="var-type">mixed</span> <span class="var-name">$parameters</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#AsCollection" title="details" class="method-name">AsCollection</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#InitialiseRecord" title="details" class="method-name">InitialiseRecord</a>
|
||||
(<span class="var-type">object</span> <span class="var-name">$usr</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">string</span>
|
||||
<a href="#RenderAsXML" title="details" class="method-name">RenderAsXML</a>
|
||||
(<span class="var-type">array</span> <span class="var-name">$properties</span>, <span class="var-type"></span> <span class="var-name">&$reply</span>, [<span class="var-type">boolean</span> <span class="var-name">$props_only</span> = <span class="var-default">false</span>], <span class="var-type">reference</span> <span class="var-name">$reply</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#RenderPrivileges" title="details" class="method-name">RenderPrivileges</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$privilege_names</span>, [<span class="var-type"></span> <span class="var-name">$container</span> = <span class="var-default">'privilege'</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#UsernameFromEMail" title="details" class="method-name">UsernameFromEMail</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$email</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<img src="../../media/images/Method.png" alt=" "/>
|
||||
<span class="method-result">void</span>
|
||||
<a href="#UsernameFromPath" title="details" class="method-name">UsernameFromPath</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$path</span>, [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
|
||||
<a name="var$by_email" id="$by_email"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">Whether</span>
|
||||
<span class="var-name">$by_email</span>
|
||||
(line <span class="line-number">53</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">var:</span> or not we are using an e-mail address based URL.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$calendar_home_set" id="$calendar_home_set"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">RFC4791:</span>
|
||||
<span class="var-name">$calendar_home_set</span>
|
||||
(line <span class="line-number">36</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">var:</span> Identifies the URL(s) of any WebDAV collections that contain calendar collections owned by the associated principal resource.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$group_membership" id="$group_membership"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">RFC3744:</span>
|
||||
<span class="var-name">$group_membership</span>
|
||||
(line <span class="line-number">63</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">var:</span> The groups in which the principal is directly a member.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$group_member_set" id="$group_member_set"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">RFC3744:</span>
|
||||
<span class="var-name">$group_member_set</span>
|
||||
(line <span class="line-number">58</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">var:</span> The principals that are direct members of this group.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$read_proxy_for" id="$read_proxy_for"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">caldav-cu-proxy-02:</span>
|
||||
<span class="var-name">$read_proxy_for</span>
|
||||
(line <span class="line-number">68</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">var:</span> The principals which this one has read permissions on.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$read_proxy_group" id="$read_proxy_group"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">caldav-cu-proxy-02:</span>
|
||||
<span class="var-name">$read_proxy_group</span>
|
||||
(line <span class="line-number">78</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">var:</span> The principals which have read permissions on this one.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$schedule_inbox_url" id="$schedule_inbox_url"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">draft-desruisseaux-caldav-sched-03:</span>
|
||||
<span class="var-name">$schedule_inbox_url</span>
|
||||
(line <span class="line-number">42</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">var:</span> Identify the URL of the scheduling Inbox collection owned by the associated principal resource.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$schedule_outbox_url" id="$schedule_outbox_url"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">draft-desruisseaux-caldav-sched-03:</span>
|
||||
<span class="var-name">$schedule_outbox_url</span>
|
||||
(line <span class="line-number">48</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">var:</span> Identify the URL of the scheduling Outbox collection owned by the associated principal resource.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$url" id="$url"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">The</span>
|
||||
<span class="var-name">$url</span>
|
||||
(line <span class="line-number">30</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">var:</span> home URL of the principal</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$write_proxy_for" id="$write_proxy_for"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">caldav-cu-proxy-02:</span>
|
||||
<span class="var-name">$write_proxy_for</span>
|
||||
(line <span class="line-number">73</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">var:</span> The principals which this one has read-write prmissions for.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$write_proxy_group" id="$write_proxy_group"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="var-title">
|
||||
<span class="var-type">caldav-cu-proxy-02:</span>
|
||||
<span class="var-name">$write_proxy_group</span>
|
||||
(line <span class="line-number">83</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">var:</span> The principals which have write permissions on this one.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="methodCalDAVPrincipal" id="CalDAVPrincipal"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Constructor.png" />
|
||||
<span class="method-title">Constructor CalDAVPrincipal</span> (line <span class="line-number">95</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Constructor</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> Whether we actually read data from the DB to initialise the record.</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">boolean</span>
|
||||
<span class="method-name">
|
||||
CalDAVPrincipal
|
||||
</span>
|
||||
([<span class="var-type">mixed</span> <span class="var-name">$parameters</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$parameters</span><span class="var-description">: If null, an empty Principal is created. If it is an integer then that ID is read (if possible). If it is an array then the Principal matching the supplied elements is read. If it is an object then it is expected to be a 'usr' record that was read elsewhere.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodAsCollection" id="AsCollection"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">AsCollection</span> (line <span class="line-number">294</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Returns a representation of the principal as a collection</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
AsCollection
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodInitialiseRecord" id="InitialiseRecord"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">InitialiseRecord</span> (line <span class="line-number">147</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Initialise the Principal object from a $usr record from the DB.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
InitialiseRecord
|
||||
</span>
|
||||
(<span class="var-type">object</span> <span class="var-name">$usr</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">object</span>
|
||||
<span class="var-name">$usr</span><span class="var-description">: The usr record from the DB.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodRenderAsXML" id="RenderAsXML"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">RenderAsXML</span> (line <span class="line-number">335</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Render XML for a single Principal (user) from the DB</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> An XML fragment with the requested properties for this principal</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
RenderAsXML
|
||||
</span>
|
||||
(<span class="var-type">array</span> <span class="var-name">$properties</span>, <span class="var-type"></span> <span class="var-name">&$reply</span>, [<span class="var-type">boolean</span> <span class="var-name">$props_only</span> = <span class="var-default">false</span>], <span class="var-type">reference</span> <span class="var-name">$reply</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$properties</span><span class="var-description">: The requested properties for this principal</span> </li>
|
||||
<li>
|
||||
<span class="var-type">reference</span>
|
||||
<span class="var-name">$reply</span><span class="var-description">: A reference to the XMLDocument being used for the reply</span> </li>
|
||||
<li>
|
||||
<span class="var-type">boolean</span>
|
||||
<span class="var-name">$props_only</span><span class="var-description">: Default false. If true will only return the fragment with the properties, not a full response fragment.</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">&$reply</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodRenderPrivileges" id="RenderPrivileges"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">RenderPrivileges</span> (line <span class="line-number">314</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Returns the array of privilege names converted into XMLElements</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
RenderPrivileges
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$privilege_names</span>, [<span class="var-type"></span> <span class="var-name">$container</span> = <span class="var-default">'privilege'</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$privilege_names</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$container</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodUsernameFromEMail" id="UsernameFromEMail"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">UsernameFromEMail</span> (line <span class="line-number">280</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Work out the username, based on the given e-mail</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
UsernameFromEMail
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$email</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$email</span><span class="var-description">: The email address to be used.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodUsernameFromPath" id="UsernameFromPath"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<img src="../../media/images/Method.png" />
|
||||
<span class="method-title">UsernameFromPath</span> (line <span class="line-number">246</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Work out the username, based on elements of the path.</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
UsernameFromPath
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$path</span>, [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$path</span><span class="var-description">: The path to be used.</span> </li>
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$options</span><span class="var-description">: The request options, controlling whether e-mail paths are allowed.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:11:57 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
69
docs/api/davical/Principal/_inc---CalDAVPrincipal.php.html
Normal file
69
docs/api/davical/Principal/_inc---CalDAVPrincipal.php.html
Normal file
@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page CalDAVPrincipal.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name"><img src="../../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/inc/CalDAVPrincipal.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">An object representing a DAV 'Principal'</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Andrew McMillan <<a href="mailto:andrew@mcmillan.net.nz">andrew@mcmillan.net.nz</a>></li>
|
||||
<li><span class="field">copyright:</span> Catalyst .Net Ltd</li>
|
||||
<li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL v2</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
|
||||
<img src="../../media/images/Class.png"
|
||||
alt=" class"
|
||||
title=" class"/>
|
||||
<a href="../../davical/Principal/CalDAVPrincipal.html">CalDAVPrincipal</a>
|
||||
</td>
|
||||
<td>
|
||||
A class for things to do with a DAV Principal
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Sat, 12 Sep 2009 00:11:57 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user