Line: 397 to 397 | ||||||||
---|---|---|---|---|---|---|---|---|
Changed: | ||||||||
< < | ObjectMethod getListOfWebs ($filter) -> @webNames | |||||||
> > | ObjectMethod getListOfWebs ($filter,$web) -> @webNames | |||||||
Changed: | ||||||||
< < | Gets a list of webs, filtered according to the spec in the $filter, | |||||||
> > | Gets a list of webs.
If $web is not specified or null, top level webs are returned.
If the site allows hiearchical webs ({EnableHierarchicalWebs} is true),
subwebs, subsubwebs, ... are also returned.
If $web is specified and non-null, the subwebs of it are returned assuming
hiearchical webs are allowed.
The returned webs are filtered according to the spec in the $filter, | |||||||
which may include one of:
| ||||||||
Changed: | ||||||||
< < | $filter may also contain the word 'public' which will further filter webs on whether NOSEARCHALL is specified for them or not. 'allowed' filters out webs that the user is denied access to by a *WEBVIEW. | |||||||
> > |
$filter may also contain the following words to further filter webs.
| |||||||
If $TWiki::cfg{EnableHierarchicalWebs} is set, will also list sub-webs recursively. | ||||||||
Line: 566 to 581 | ||||||||
some store implementations when a topic is created, but never saved. | ||||||||
Added: | ||||||||
> > |
ObjectMethod getDiskInfo ($web,$site,[$diskID]) -> ($dataDir,$pubDir,$diskID)Called only if $TWiki::cfg{MultipleDisks} is true.ObjectMethod getDiskList () -> ('',1,2,...) |
Line: 358 to 358 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Added: | ||||||||
> > | Warning: topicExists does not call ( $web, $topic ) = $this->{session}->normalizeWebTopicName( $web, $topic ); for you (it'd make TWiki even slower) so make sure you do so. | |||||||
ObjectMethod getTopicParent ($web,$topic) -> $string |
Line: 17 to 17 | ||||||||
---|---|---|---|---|---|---|---|---|
On this page:
| ||||||||
Changed: | ||||||||
< < | ClassMethod new () | |||||||
> > | ClassMethod new ($session) | |||||||
Construct a Store module, linking in the chosen sub-implementation. | ||||||||
Changed: | ||||||||
< < | ObjectMethod finishComplete processing after the client's HTTP request has been responded to.
| |||||||
> > | ObjectMethod finish ()Break circular references. | |||||||
Line: 180 to 176 | ||||||||
ObjectMethod getRevisionDiff ($user,$web,$topic,$rev1,$rev2,$contextLines) -> \@diffArrayReturn reference to an array of [ diffType, $right, $left ] | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Line: 196 to 192 | ||||||||
| ||||||||
Changed: | ||||||||
< < | Return list with: ( last update date, last user object, = | |||||||
> > | Return list with: ( last update date, last user id, = | |||||||
| ||||||||
Line: 275 to 271 | ||||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
Saves a new revision of the attachment, invoking plugin handlers as appropriate. | ||||||||
Line: 351 to 348 | ||||||||
Test if web exists
| ||||||||
Changed: | ||||||||
< < | A web has to have a home topic to be a web. | |||||||
> > | A web has to have a preferences topic to be a web. | |||||||
Line: 377 to 374 | ||||||||
Changed: | ||||||||
< < | ObjectMethod readMetaData ($web,$name) -> $textRead a named meta-data string. If web is given the meta-data is stored alongside a web.ObjectMethod saveMetaData ($web,$name) -> $text | |||||||
> > | ObjectMethod eachChange ($web,$time) -> $iterator | |||||||
Changed: | ||||||||
< < | Write a named meta-data string. If web is given the meta-data is stored alongside a web. | |||||||
> > | Get an iterator over the list of all the changes in the given web between
$time and now. $time is a time in seconds since 1st Jan 1970, and is not
guaranteed to return any changes that occurred before (now -
{Store}{RememberChangesFor}). Changes are returned in most-recent-first
order. | |||||||
Line: 478 to 471 | ||||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
The idea is that people can search for meta-data values without having to be aware of how or where meta-data is stored. | ||||||||
Line: 485 to 479 | ||||||||
Added: | ||||||||
> > | ObjectMethod searchInWebMetaData ($query,$web,\@topics) -> \%matchesSearch for a meta-data expression in the content of a web.$query must be a TWiki::Query object.
Returns a reference to a hash that maps the names of topics that all matched
to the result of the query expression (e.g. if the query expression is
'TOPICPARENT.name' then you will get back a hash that maps topic names
to their parent.
| |||||||
ObjectMethod searchInWebContent ($searchString,$web,\@topics,\%options) -> \%mapSearch for a string in the content of a web. The search must be over all |
Line: 51 to 51 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > | ObjectMethod _findAttachments ($session,$web,$topic,$knownAttachments) -> @attachmentsFoundInPubSynchronise the attachment list with what's actually on disk Returns an ARRAY of FILEATTACHMENTs. These can be put in the new meta using meta->put('FILEATTACHMENTS', $tree) This function is only called when the AutoAttachPubFiles configuration option is set. IDEA On Windows machines where the underlying filesystem can store arbitary meta data against files, this might replace/fulfil the COMMENT purpose TODO consider logging when things are added to metadata | |||||||
ObjectMethod readTopicRaw ($user,$web,$topic,$version) -> $topicTextReads the given version of a topic, without separating out any embedded |
Line: 264 to 275 | ||||||||
---|---|---|---|---|---|---|---|---|
Parameters and return value as saveTopic, except
| ||||||||
Added: | ||||||||
> > |
| |||||||
Used to try to avoid the deposition of 'unecessary' revisions, for example where a user quickly goes back and fixes a spelling error. | ||||||||
Line: 517 to 534 | ||||||||
See getLease for more details about Leases. | ||||||||
Added: | ||||||||
> > |
ObjectMethod removeSpuriousLeases ($web)Remove leases that are not related to a topic. These can get left behind in some store implementations when a topic is created, but never saved. |
Line: 23 to 23 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > | ObjectMethod finishComplete processing after the client's HTTP request has been responded to.
| |||||||
ObjectMethod readTopic ($user,$web,$topic,$version) -> ($metaObject,$text)Reads the given version of a topic and it's meta-data. If the version |
Line: 29 to 29 | ||||||||
---|---|---|---|---|---|---|---|---|
is undef, then read the most recent version. The version number must be an integer, or undef for the latest version. | ||||||||
Changed: | ||||||||
< < | If $user is defined, view permission will be required for the topic | |||||||
> > | if $user is defined, view permission will be required for the topic | |||||||
read to be successful. Access control violations are flagged by a TWiki::AccessControlException. Permissions are checked for the user name passed in. | ||||||||
Line: 149 to 149 | ||||||||
Changed: | ||||||||
< < | ObjectMethod getRevisionDiff ($web,$topic,$rev1,$rev2,$contextLines) -> \@diffArray | |||||||
> > | ObjectMethod getRevisionDiff ($user,$web,$topic,$rev1,$rev2,$contextLines) -> \@diffArray | |||||||
Return reference to an array of [ diffType, $right, $left ] | ||||||||
Changed: | ||||||||
< < | ||||||||
> > |
| |||||||
|
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Package
This module hosts the generic storage backend. This module provides
the interface layer between the "real" store provider - which is hidden
behind a handler - and the rest of the system. it is responsible for
checking for topic existance, access permissions, and all the other
general admin tasks that are common to all store implementations.
This module knows nothing about how the data is actually stored -
that knowledge is entirely encapsulated in the handlers.
The general contract for methods in the class requires that errors
are signalled using exceptions. TWiki::AccessControlException is
used for access control exceptions, and Error::Simple for all other
types of error.
|
$date | in epochSec |
$user | user object |
$rev | the revision number |
$comment | WHAT COMMENT? |
$user
- user doing the saving (object)
$web
- web for topic
$topic
- topic to atach to
$text
- topic text
$meta
- topic meta-data
$options
- Ref to hash of options
$options
may include:
dontlog |
don't log this change in twiki log |
hide |
if the attachment is to be hidden in normal topic view |
comment |
comment for save |
file |
Temporary file name to upload |
minor |
True if this is a minor change (used in log) |
savecmd |
Save command |
forcedate |
grr |
unlock |
$user
- user doing the saving
$web
- web for topic
$topic
- topic to atach to
$attachment
- name of the attachment
$opts
- Ref to hash of options
$opts
may include:
dontlog |
don't log this change in twiki log |
comment |
comment for save |
hide |
if the attachment is to be hidden in normal topic view |
stream |
Stream of file to upload |
file |
Name of a file to use for the attachment data. ignored is stream is set. |
filepath |
Client path to file |
filesize |
Size of uploaded data |
filedate |
Date |
$options
- as for saveTopic, with the extra option: timetravel
- if we want to force the deposited revision to look as much like the revision specified in $rev
as possible.
getLease
)
getLease
)
$web
- Web name, required, e.g. 'Sandbox'
$web
- Web name, optional, e.g. 'Main'
$topic
- Topic name, required, e.g. 'TokyoOffice'
, or "Main.TokyoOffice"
$web
- Web name, required, e.g. 'Sandbox'
( 'WebChanges', 'WebHome', 'WebIndex', 'WebNotify' )
$user
- user doing the removing (for the history)
$web
- web being removed
type |
topicmoved , parent or field |
topic |
topic to search for, for topicmoved and parent |
name |
form field to search, for field type searches. May be a regex. |
value |
form field value. May be a regex. |
title |
Title prepended to the returned search results |
default |
defualt value if there are no results |
web |
web to search in, default is all webs |
$searchString
- the search string, in egrep format if regex
$web
- The web to search in
\@topics
- reference to a list of topics to search
\%options
- reference to an options hash
\%options
hash may contain the following options: type
- if regex
will perform a egrep-syntax RE search (default '')
casesensitive
- false to ignore case (defaulkt true)
files_without_match
- true to return files only (default false)
files_without_match
is specified, it will
return on the first match in each topic (i.e. it will return only one
match per topic, and will not return matching lines).
$web
- web for topic
$topic
- topic
$time
- time (in epoch secs) for the rev
$web
- web for topic
$topic
- topic
user
, taken
and expires
).
Leases are taken out when a topic is edited. Only one lease
can be active on a topic at a time. Leases are used to warn if
another user is already editing a topic.
getLease
for more details about Leases.
getLease
for more details about Leases.