changed POD formatting
This commit is contained in:
parent
bf5a0145ae
commit
2b6eb201a9
55 changed files with 1188 additions and 3220 deletions
|
|
@ -26,7 +26,7 @@ Package WebGUI::Affiliate
|
|||
|
||||
Tracks where users come from.
|
||||
|
||||
NOTE: This package is experimental as is not officially supported yet.
|
||||
B<NOTE:> This package is experimental as is not officially supported yet.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
|
|
|||
|
|
@ -111,18 +111,14 @@ sub box {
|
|||
|
||||
Copies an attachment from one node to another.
|
||||
|
||||
=over
|
||||
|
||||
=item newNode
|
||||
=head3 newNode
|
||||
|
||||
Define the node to copy the attachment to.
|
||||
|
||||
=item newNodeSub
|
||||
=head3 newNodeSub
|
||||
|
||||
If there is a subordinate element on this node define it here.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub copy {
|
||||
|
|
@ -164,14 +160,10 @@ sub copy {
|
|||
|
||||
Generates a thumbnail for this attachment.
|
||||
|
||||
=over
|
||||
|
||||
=item thumbnailSize
|
||||
=head3 thumbnailSize
|
||||
|
||||
Defaults to the global setting for thumbnail size. However, it can be overriden with this value. Specified in pixels.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub createThumbnail {
|
||||
|
|
@ -456,22 +448,18 @@ sub isImage {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item filename
|
||||
=head3 filename
|
||||
|
||||
What is the filename for this attachment. If you'll be uploading the attachment using the "save" method then you may leave this field blank.
|
||||
|
||||
=item node
|
||||
=head3 node
|
||||
|
||||
The node where this attachment is (or will be placed).
|
||||
|
||||
=item nodeSubordinate
|
||||
=head3 nodeSubordinate
|
||||
|
||||
The subordinate element of the node where this attachment is (or will be placed).
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -487,14 +475,10 @@ sub new {
|
|||
|
||||
Renames an attachment's filename.
|
||||
|
||||
=over
|
||||
|
||||
=item newFilename
|
||||
=head3 newFilename
|
||||
|
||||
Define the new filename for this attachment.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub rename {
|
||||
|
|
@ -512,14 +496,10 @@ sub rename {
|
|||
|
||||
Resizes this attachment to the specified size. Use this method only if the attachment is an image.
|
||||
|
||||
=over
|
||||
|
||||
=item imageSize
|
||||
=head3 imageSize
|
||||
|
||||
Defaults to the max image size setting. Specify a value in pixels to resize this image to.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub resizeImage {
|
||||
|
|
@ -546,22 +526,18 @@ sub resizeImage {
|
|||
|
||||
Grabs an attachment from a form POST and saves it to a node. It then returns the filename of the attachment.
|
||||
|
||||
=over
|
||||
|
||||
=item formVariableName
|
||||
=head3 formVariableName
|
||||
|
||||
Provide the form variable name to which the file being uploaded is assigned.
|
||||
|
||||
=item thumbnailSize
|
||||
=head3 thumbnailSize
|
||||
|
||||
If an image is being uploaded a thumbnail will be generated automatically. By default, WebGUI will create a thumbnail of the size specified in the file settings. You can override that size by specifying one here. Size is measured in pixels of the longest side.
|
||||
|
||||
=item imageSize
|
||||
=head3 imageSize
|
||||
|
||||
If a web image (gif, png, jpg, jpeg) is being uploaded it will be resized if it is larger than this value. By default images are resized to stay within the contraints of the Max Image Size setting in the file settings.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub save {
|
||||
|
|
@ -608,22 +584,18 @@ sub save {
|
|||
|
||||
Grabs an attachment from the server's file system and saves it to a node. It then returns the filename of the attachment.
|
||||
|
||||
=over
|
||||
|
||||
=item pathToFile
|
||||
=head3 pathToFile
|
||||
|
||||
Provide the local path to this file.
|
||||
|
||||
=item thumbnailSize
|
||||
=head3 thumbnailSize
|
||||
|
||||
If an image is being grabbed a thumbnail will be generated automatically. By default, WebGUI will create a thumbnail of the size specified in the content settings. You can override that size by specifying one here. Size is measured in pixels of the longest side.
|
||||
|
||||
=item imageSize
|
||||
=head3 imageSize
|
||||
|
||||
If a web image (gif, png, jpg, jpeg) is being grabbed it will be resized if it is larger than this value. By default images are resized to stay within the contraints of the Max Image Size setting in the content settings.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub saveFromFilesystem {
|
||||
|
|
@ -672,14 +644,10 @@ sub saveFromFilesystem {
|
|||
|
||||
Stores a hash reference as an attachment.
|
||||
|
||||
=over
|
||||
|
||||
=item hashref
|
||||
=head3 hashref
|
||||
|
||||
A hash reference containing the data you wish to persist to the filesystem.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub saveFromHashref {
|
||||
|
|
@ -696,14 +664,10 @@ sub saveFromHashref {
|
|||
|
||||
Stores a scalar as a text attachment.
|
||||
|
||||
=over
|
||||
|
||||
=item scalar
|
||||
=head3 scalar
|
||||
|
||||
A scalar variable containing the content to write to the filesystem.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub saveFromScalar {
|
||||
|
|
|
|||
|
|
@ -162,14 +162,10 @@ sub authenticate {
|
|||
|
||||
Gets or sets the authMethod in the Auth Object
|
||||
|
||||
=over
|
||||
|
||||
=item authMethod
|
||||
=head3 authMethod
|
||||
|
||||
A string which sets the auth method for an instance of this class
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub authMethod {
|
||||
|
|
@ -184,22 +180,18 @@ sub authMethod {
|
|||
|
||||
Superclass method that performs general functionality for creating new accounts.
|
||||
|
||||
=over
|
||||
|
||||
=item method
|
||||
=head3 method
|
||||
|
||||
Auth method that the form for creating users should call
|
||||
|
||||
=item vars
|
||||
=head3 vars
|
||||
|
||||
Array ref of template vars from subclass
|
||||
|
||||
=item template
|
||||
=head3 template
|
||||
|
||||
Template that this class should use for display purposes
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub createAccount {
|
||||
|
|
@ -231,26 +223,22 @@ sub createAccount {
|
|||
|
||||
Superclass method that performs general functionality for saving new accounts.
|
||||
|
||||
=over
|
||||
|
||||
=item username
|
||||
=head3 username
|
||||
|
||||
Username for the account being created
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
Properties from the subclass that should be saved as authentication parameters
|
||||
|
||||
=item password
|
||||
=head3 password
|
||||
|
||||
Password entered by the user. This is only used in for sending the user a notification by email of his/her username/password
|
||||
|
||||
=item profile
|
||||
=head3 profile
|
||||
|
||||
Hashref of profile values returned by the function WebGUI::Operation::Profile::validateProfileData()
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub createAccountSave {
|
||||
|
|
@ -290,14 +278,10 @@ sub createAccountSave {
|
|||
|
||||
Superclass method that displays a confirm message for deactivating a user's account.
|
||||
|
||||
=over
|
||||
|
||||
=item method
|
||||
=head3 method
|
||||
|
||||
Auth method that the form for creating users should call
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub deactivateAccount {
|
||||
|
|
@ -351,22 +335,18 @@ sub deleteParams {
|
|||
|
||||
Superclass method that performs general functionality for viewing editable fields related to a user's account.
|
||||
|
||||
=over
|
||||
|
||||
=item method
|
||||
=head3 method
|
||||
|
||||
Auth method that the form for updating a user's account should call
|
||||
|
||||
=item vars
|
||||
=head3 vars
|
||||
|
||||
Array ref of template vars from subclass
|
||||
|
||||
=item template
|
||||
=head3 template
|
||||
|
||||
Template that this class should use for display purposes
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub displayAccount {
|
||||
|
|
@ -397,22 +377,18 @@ sub displayAccount {
|
|||
|
||||
Superclass method that performs general functionality for creating new accounts.
|
||||
|
||||
=over
|
||||
|
||||
=item method
|
||||
=head3 method
|
||||
|
||||
Auth method that the form for performing the login routine should call
|
||||
|
||||
=item vars
|
||||
=head3 vars
|
||||
|
||||
Array ref of template vars from subclass
|
||||
|
||||
=item template
|
||||
=head3 template
|
||||
|
||||
Template that this class should use for display purposes
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub displayLogin {
|
||||
|
|
@ -503,14 +479,10 @@ sub getParams {
|
|||
|
||||
Returns a setting for this authMethod instance. If none is specified, returns the system authMethod setting
|
||||
|
||||
=over
|
||||
|
||||
=item setting
|
||||
=head3 setting
|
||||
|
||||
Specify a setting to retrieve
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getSetting {
|
||||
|
|
@ -595,22 +567,18 @@ sub logout {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item authMethod
|
||||
=head3 authMethod
|
||||
|
||||
This object's authentication method
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
userId for the user requesting authentication. This defaults to $session{user}{userId}
|
||||
|
||||
=item callable
|
||||
=head3 callable
|
||||
|
||||
Array reference of methods allowed to be called externally;
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -654,14 +622,10 @@ sub profile {
|
|||
adds elements to the callable routines list. This list determines whether or not a method in this instance is
|
||||
allowed to be called externally
|
||||
|
||||
=over
|
||||
|
||||
=item callableMethods
|
||||
=head3 callableMethods
|
||||
|
||||
Array reference containing a list of methods for this authentication instance that can be called externally
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setCallable {
|
||||
|
|
@ -676,22 +640,18 @@ sub setCallable {
|
|||
|
||||
Saves the user's authentication parameters to the database.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
Specify a user id.
|
||||
|
||||
=item authMethod
|
||||
=head3 authMethod
|
||||
|
||||
Specify the authentication method to save these paramaters under.
|
||||
|
||||
=item data
|
||||
=head3 data
|
||||
|
||||
A hash reference containing parameter names and values to be saved.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub saveParams {
|
||||
|
|
|
|||
|
|
@ -63,14 +63,10 @@ sub delete {
|
|||
|
||||
Remove content from the filesystem cache where the key meets the condition of the regular expression.
|
||||
|
||||
=over
|
||||
|
||||
=item regex
|
||||
=head3 regex
|
||||
|
||||
A regular expression that will match keys in the current namespace. Example: m/^navigation_.*/
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub deleteByRegex {
|
||||
|
|
@ -100,18 +96,14 @@ sub get {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item key
|
||||
=head3 key
|
||||
|
||||
A key unique to this namespace. It is used to uniquely identify the cached content.
|
||||
|
||||
=item namespace
|
||||
=head3 namespace
|
||||
|
||||
Defaults to the config filename for the current site. The only reason to override the default is if you want the cached content to be shared among all WebGUI instances on this machine. A common alternative namespace is "URL", which is typically used when caching content using the setByHTTP method.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -130,18 +122,14 @@ sub new {
|
|||
|
||||
Save content to the filesystem cache.
|
||||
|
||||
=over
|
||||
|
||||
=item content
|
||||
=head3 content
|
||||
|
||||
A scalar variable containing the content to be set.
|
||||
|
||||
=item ttl
|
||||
=head3 ttl
|
||||
|
||||
The time to live for this content. This is the amount of time (in seconds) that the content will remain in the cache. Defaults to "60".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub set {
|
||||
|
|
@ -156,18 +144,14 @@ sub set {
|
|||
|
||||
Retrieves a document via HTTP and stores it in the cache and returns the content as a string.
|
||||
|
||||
=over
|
||||
|
||||
=item url
|
||||
=head3 url
|
||||
|
||||
The URL of the document to retrieve. It must begin with the standard "http://".
|
||||
|
||||
=item ttl
|
||||
=head3 ttl
|
||||
|
||||
The time to live for this content. This is the amount of time (in seconds) that the content will remain in the cache. Defaults to "60".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setByHTTP {
|
||||
|
|
|
|||
|
|
@ -101,14 +101,10 @@ sub deleteFile {
|
|||
|
||||
An alternative to the constructor "new", use find as a constructor by name rather than id.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the collateral item you wish to instanciate.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub find {
|
||||
|
|
@ -122,14 +118,10 @@ sub find {
|
|||
|
||||
Returns a hash reference containing all of the properties of this collateral item.
|
||||
|
||||
=over
|
||||
|
||||
=item propertyName
|
||||
=head3 propertyName
|
||||
|
||||
If an individual propertyName is specified, then only that property value is returned as a scalar.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub get {
|
||||
|
|
@ -147,14 +139,10 @@ sub get {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item collateralId
|
||||
=head3 collateralId
|
||||
|
||||
The unique identifier for this piece of collateral. If set to "new" an id will be generated.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -244,16 +232,12 @@ sub multiNew {
|
|||
|
||||
Sets the value of a property for this collateral item.
|
||||
|
||||
=over
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
A hash reference containing the list of properties to set. The valid property names are "name", "parameters", "userId", "username", "collateralFolderId", "collateralType", and "thumbnailSize".
|
||||
|
||||
If username or userId are not specified, the current user will be used.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub set {
|
||||
|
|
|
|||
|
|
@ -50,18 +50,14 @@ These subroutines are available from this package:
|
|||
|
||||
Returns a hash reference containing the configuration data. It tries to get the data out of the memory cache first, but reads the config file directly if necessary.
|
||||
|
||||
=over
|
||||
|
||||
=item webguiRoot
|
||||
=head3 webguiRoot
|
||||
|
||||
The path to the WebGUI installation.
|
||||
|
||||
=item configFile
|
||||
=head3 configFile
|
||||
|
||||
The filename of the config file to read.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getConfig {
|
||||
|
|
@ -81,14 +77,10 @@ sub getConfig {
|
|||
|
||||
Reads all the config file data for all defined sites into an in-memory cache.
|
||||
|
||||
=over
|
||||
|
||||
=item webguiRoot
|
||||
=head3 webguiRoot
|
||||
|
||||
The path to the WebGUI installation.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub loadAllConfigs {
|
||||
|
|
@ -111,18 +103,14 @@ sub loadAllConfigs {
|
|||
|
||||
Returns a hash reference containing the configuration data. It reads the config data directly from the file.
|
||||
|
||||
=over
|
||||
|
||||
=item webguiRoot
|
||||
=head3 webguiRoot
|
||||
|
||||
The path to the WebGUI installation.
|
||||
|
||||
=item configFile
|
||||
=head3 configFile
|
||||
|
||||
The filename of the config file to read.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub readConfig {
|
||||
|
|
|
|||
|
|
@ -65,14 +65,10 @@ sub getList {
|
|||
|
||||
Returns a hash containing a single database link.
|
||||
|
||||
=over
|
||||
|
||||
=item databaseLinkId
|
||||
=head3 databaseLinkId
|
||||
|
||||
A valid databaseLinkId
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub get {
|
||||
|
|
@ -85,14 +81,10 @@ sub get {
|
|||
Returns an array of hashrefs containing items which use a database link. This method will
|
||||
need to be updated any time a new item starts using Database Links.
|
||||
|
||||
=over
|
||||
|
||||
=item databaseLinkId
|
||||
=head3 databaseLinkId
|
||||
|
||||
A valid databaseLinkId
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub whatIsUsing {
|
||||
|
|
@ -178,14 +170,10 @@ sub dbh {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item databaseLinkId
|
||||
=head3 databaseLinkId
|
||||
|
||||
The databaseLinkId of the databaseLink you're creating an object reference for.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
|
|||
|
|
@ -83,26 +83,22 @@ sub dateToEpoch {
|
|||
|
||||
Returns an epoch date with the amount of time added.
|
||||
|
||||
=over
|
||||
|
||||
=item epoch
|
||||
=head3 epoch
|
||||
|
||||
The number of seconds since January 1, 1970.
|
||||
|
||||
=item years
|
||||
=head3 years
|
||||
|
||||
The number of years to add to the epoch.
|
||||
|
||||
=item months
|
||||
=head3 months
|
||||
|
||||
The number of months to add to the epoch.
|
||||
|
||||
=item days
|
||||
=head3 days
|
||||
|
||||
The number of days to add to the epoch.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub addToDate {
|
||||
|
|
@ -121,26 +117,22 @@ sub addToDate {
|
|||
|
||||
Returns an epoch date with the amount of time added.
|
||||
|
||||
=over
|
||||
|
||||
=item epoch
|
||||
=head3 epoch
|
||||
|
||||
The number of seconds since January 1, 1970.
|
||||
|
||||
=item hours
|
||||
=head3 hours
|
||||
|
||||
The number of hours to add to the epoch.
|
||||
|
||||
=item minutes
|
||||
=head3 minutes
|
||||
|
||||
The number of minutes to add to the epoch.
|
||||
|
||||
=item seconds
|
||||
=head3 seconds
|
||||
|
||||
The number of seconds to add to the epoch.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub addToTime {
|
||||
|
|
@ -159,14 +151,10 @@ sub addToTime {
|
|||
|
||||
Returns an epoch date.
|
||||
|
||||
=over
|
||||
|
||||
=item date
|
||||
=head3 date
|
||||
|
||||
An array of the format year, month, day, hour, min, sec.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub arrayToEpoch {
|
||||
|
|
@ -188,14 +176,10 @@ sub arrayToEpoch {
|
|||
|
||||
Returns the epoch dates for the start and end of the day.
|
||||
|
||||
=over
|
||||
|
||||
=item epoch
|
||||
=head3 epoch
|
||||
|
||||
The number of seconds since January 1, 1970.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub dayStartEnd {
|
||||
|
|
@ -212,14 +196,10 @@ sub dayStartEnd {
|
|||
|
||||
Returns a date array in the form of year, month, day, hour, min, sec.
|
||||
|
||||
=over
|
||||
|
||||
=item epoch
|
||||
=head3 epoch
|
||||
|
||||
An epoch date.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub epochToArray {
|
||||
|
|
@ -234,13 +214,11 @@ sub epochToArray {
|
|||
|
||||
Returns a formated date string.
|
||||
|
||||
=over
|
||||
|
||||
=item epoch
|
||||
=head3 epoch
|
||||
|
||||
The number of seconds since January 1, 1970. Defaults to NOW!
|
||||
|
||||
=item format
|
||||
=head3 format
|
||||
|
||||
A string representing the output format for the date. Defaults to '%z %Z'. You can use the following to format your date string:
|
||||
|
||||
|
|
@ -268,8 +246,6 @@ A string representing the output format for the date. Defaults to '%z %Z'. You c
|
|||
%z = The current user's date format preference.
|
||||
%Z = The current user's time format preference.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub epochToHuman {
|
||||
|
|
@ -359,18 +335,14 @@ sub epochToHuman {
|
|||
|
||||
Returns a set date (used by WebGUI::HTMLForm->date) in the format of YYYY-MM-DD.
|
||||
|
||||
=over
|
||||
|
||||
=item epoch
|
||||
=head3 epoch
|
||||
|
||||
The number of seconds since January 1, 1970.
|
||||
|
||||
=item withTime
|
||||
=head3 withTime
|
||||
|
||||
A boolean indicating that the time should be added to the output, thust turning the format into YYYY-MM-DD HH:MM:SS.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub epochToSet {
|
||||
|
|
@ -386,14 +358,10 @@ sub epochToSet {
|
|||
|
||||
Returns a string containing the calendar month name in the language of the current user.
|
||||
|
||||
=over
|
||||
|
||||
=item month
|
||||
=head3 month
|
||||
|
||||
An integer ranging from 1-12 representing the month.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getMonthName {
|
||||
|
|
@ -430,14 +398,10 @@ sub getMonthName {
|
|||
|
||||
Returns a string containing the weekday name in the language of the current user.
|
||||
|
||||
=over
|
||||
|
||||
=item day
|
||||
=head3 day
|
||||
|
||||
An integer ranging from 1-7 representing the day of the week (Sunday is 1 and Saturday is 7).
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getDayName {
|
||||
|
|
@ -465,14 +429,10 @@ sub getDayName {
|
|||
|
||||
Returns the total number of days in the month.
|
||||
|
||||
=over
|
||||
|
||||
=item epoch
|
||||
=head3 epoch
|
||||
|
||||
An epoch date.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getDaysInMonth {
|
||||
|
|
@ -488,18 +448,14 @@ sub getDaysInMonth {
|
|||
|
||||
Returns the number of days between two epoch dates.
|
||||
|
||||
=over
|
||||
|
||||
=item start
|
||||
=head3 start
|
||||
|
||||
An epoch date.
|
||||
|
||||
=item end
|
||||
=head3 end
|
||||
|
||||
An epoch date.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getDaysInInterval {
|
||||
|
|
@ -518,14 +474,10 @@ sub getDaysInInterval {
|
|||
|
||||
Returns the position (1 - 7) of the first day in the month.
|
||||
|
||||
=over
|
||||
|
||||
=item epoch
|
||||
=head3 epoch
|
||||
|
||||
An epoch date.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getFirstDayInMonthPosition {
|
||||
|
|
@ -548,14 +500,10 @@ sub getFirstDayInMonthPosition {
|
|||
|
||||
Calculates the number of seconds into the day of an epoch date the epoch datestamp is.
|
||||
|
||||
=over
|
||||
|
||||
=item epoch
|
||||
=head3 epoch
|
||||
|
||||
The number of seconds since January 1, 1970 00:00:00.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getSecondsFromEpoch {
|
||||
|
|
@ -570,14 +518,10 @@ sub getSecondsFromEpoch {
|
|||
|
||||
Returns an epoch date derived from the human date.
|
||||
|
||||
=over
|
||||
|
||||
=item date
|
||||
=head3 date
|
||||
|
||||
The human date string. YYYY-MM-DD HH:MM:SS
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub humanToEpoch {
|
||||
|
|
@ -601,18 +545,14 @@ sub humanToEpoch {
|
|||
|
||||
Returns the number of seconds derived from the interval.
|
||||
|
||||
=over
|
||||
|
||||
=item interval
|
||||
=head3 interval
|
||||
|
||||
An integer which represents the amount of time for the interval.
|
||||
|
||||
=item units
|
||||
=head3 units
|
||||
|
||||
A string which represents the units of the interval. The string must be 'years', 'months', 'weeks', 'days', 'hours', 'minutes', or 'seconds'.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub intervalToSeconds {
|
||||
|
|
@ -639,14 +579,10 @@ sub intervalToSeconds {
|
|||
|
||||
Returns an array of time elements. The elements are: years, months, days, hours, minutes, seconds, day of year, day of week, daylight savings.
|
||||
|
||||
=over
|
||||
|
||||
=item epoch
|
||||
=head3 epoch
|
||||
|
||||
The number of seconds since January 1, 1970. Defaults to now.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub localtime {
|
||||
|
|
@ -667,18 +603,14 @@ sub localtime {
|
|||
|
||||
Returns the number of months between the start and end dates (inclusive).
|
||||
|
||||
=over
|
||||
|
||||
=item startEpoch
|
||||
=head3 startEpoch
|
||||
|
||||
An epoch datestamp corresponding to the first month.
|
||||
|
||||
=item endEpoch
|
||||
=head3 endEpoch
|
||||
|
||||
An epoch datestamp corresponding to the last month.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub monthCount {
|
||||
|
|
@ -697,14 +629,10 @@ sub monthCount {
|
|||
|
||||
Returns the epoch dates for the start and end of the month.
|
||||
|
||||
=over
|
||||
|
||||
=item epoch
|
||||
=head3 epoch
|
||||
|
||||
The number of seconds since January 1, 1970.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub monthStartEnd {
|
||||
|
|
@ -721,14 +649,10 @@ sub monthStartEnd {
|
|||
|
||||
Returns an interval and units derived the number of seconds.
|
||||
|
||||
=over
|
||||
|
||||
=item seconds
|
||||
=head3 seconds
|
||||
|
||||
The number of seconds in the interval.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub secondsToInterval {
|
||||
|
|
@ -764,14 +688,10 @@ sub secondsToInterval {
|
|||
|
||||
Returns a time string of the format HH::MM::SS on a 24 hour clock. See also timeToSeconds().
|
||||
|
||||
=over
|
||||
|
||||
=item seconds
|
||||
=head3 seconds
|
||||
|
||||
A number of seconds.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub secondsToTime {
|
||||
|
|
@ -791,14 +711,10 @@ sub secondsToTime {
|
|||
|
||||
Returns an epoch date.
|
||||
|
||||
=over
|
||||
|
||||
=item set
|
||||
=head3 set
|
||||
|
||||
A string in the format of YYYY-MM-DD or YYYY-MM-DD HH:MM:SS.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setToEpoch {
|
||||
|
|
@ -842,14 +758,10 @@ sub time {
|
|||
|
||||
Returns the seconds since 00:00:00 on a 24 hour clock.
|
||||
|
||||
=over
|
||||
|
||||
=item timeString
|
||||
=head3 timeString
|
||||
|
||||
A string that looks similar to this: 15:05:32
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub timeToSeconds {
|
||||
|
|
|
|||
|
|
@ -66,14 +66,10 @@ These functions are available from this package:
|
|||
|
||||
Inserts an AUDIT type message into the WebGUI log.
|
||||
|
||||
=over
|
||||
|
||||
=item message
|
||||
=head3 message
|
||||
|
||||
Whatever message you wish to insert into the log.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub audit {
|
||||
|
|
@ -224,14 +220,10 @@ sub getWarnings {
|
|||
|
||||
Adds a SECURITY type message to the log.
|
||||
|
||||
=over
|
||||
|
||||
=item message
|
||||
=head3 message
|
||||
|
||||
The message you wish to add to the log.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub security {
|
||||
|
|
@ -340,14 +332,10 @@ sub showWarnings {
|
|||
|
||||
Generates a stamp to be added to the log file. Use this in conjunction with your message for writeLog().
|
||||
|
||||
=over
|
||||
|
||||
=item type
|
||||
=head3 type
|
||||
|
||||
The type of message this is. You may use whatever type you wish. WebGUI currently uses AUDIT, WARNING, FATAL, and SECURITY.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub stamp {
|
||||
|
|
@ -361,14 +349,10 @@ sub stamp {
|
|||
|
||||
Adds a WARNING type message to the log.
|
||||
|
||||
=over
|
||||
|
||||
=item message
|
||||
=head3 message
|
||||
|
||||
The message you wish to add to the log.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub warn {
|
||||
|
|
@ -383,14 +367,10 @@ sub warn {
|
|||
|
||||
Writes a message to the log.
|
||||
|
||||
=over
|
||||
|
||||
=item message
|
||||
=head3 message
|
||||
|
||||
The message you wish to write to the log.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub writeLog {
|
||||
|
|
|
|||
|
|
@ -64,14 +64,10 @@ These methods are available from this package:
|
|||
|
||||
Executes the export and returns html content.
|
||||
|
||||
=over
|
||||
|
||||
=item filename
|
||||
=head3 filename
|
||||
|
||||
Full path to a file.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub generate {
|
||||
|
|
@ -149,65 +145,61 @@ Constructor.
|
|||
Options can be set when a new Export object is constructed, or
|
||||
afterwards with the set method. None of the options is required.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
Sets the page to be generated. Defaults to current page.
|
||||
|
||||
=item styleId
|
||||
=head3 styleId
|
||||
|
||||
Use this to override the default styleId.
|
||||
Defaults to the page styleId.
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
Runs the export as this user. Defaults to 1 (Visitor).
|
||||
|
||||
=item altSiteURL
|
||||
=head3 altSiteURL
|
||||
|
||||
Use this to override the absolute site URL. A valid value
|
||||
would be "http://www.site.com/". Setting this negates the effect
|
||||
of the relativeUrls option.
|
||||
|
||||
=item noCache
|
||||
=head3 noCache
|
||||
|
||||
Is set to true by default. This will make sure
|
||||
that the exported page is generated and not fetched from cache.
|
||||
|
||||
=item noHttpHeader
|
||||
=head3 noHttpHeader
|
||||
|
||||
Turns off the inclusion of a HTTP header. By default this option
|
||||
is set to true.
|
||||
|
||||
=item adminOn
|
||||
=head3 adminOn
|
||||
|
||||
Turns on / off the adminbar in the generated page. Is false by
|
||||
default.
|
||||
|
||||
=item stripHTML
|
||||
=head3 stripHTML
|
||||
|
||||
Strips HTML from the document and outputs only text. Is disabled
|
||||
by default.
|
||||
|
||||
=item relativeUrls
|
||||
=head3 relativeUrls
|
||||
|
||||
If set, all navigation URL's will be constructed relative. By default
|
||||
all links will be made absolute. This option is negated if altSiteURL
|
||||
is set.
|
||||
|
||||
=item extrasURL
|
||||
=head3 extrasURL
|
||||
|
||||
You can specify an alternate URL for the extras location. By default
|
||||
the extrasURL setting from the config file is used.
|
||||
|
||||
=item uploadsURL
|
||||
=head3 uploadsURL
|
||||
|
||||
You can specify an alternate URL for the uploads location. By default
|
||||
the uploadsURL setting from the config file is used.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -239,14 +231,10 @@ sub new {
|
|||
|
||||
Gets the value for key from the class.
|
||||
|
||||
=over
|
||||
|
||||
=item key
|
||||
=head3 key
|
||||
|
||||
See documentation on the "new" constructor for an overview of all options.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub get {
|
||||
|
|
@ -261,14 +249,10 @@ sub get {
|
|||
|
||||
Sets properties for this export to the object.
|
||||
|
||||
=over
|
||||
|
||||
=item options
|
||||
=head3 options
|
||||
|
||||
See documentation on the "new" constructor for an overview of all options.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub set {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -77,14 +77,10 @@ sub _checkEmailAddy {
|
|||
|
||||
Returns an array or a carriage return ("\n") separated scalar depending upon whether you're returning the values into an array or a scalar.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub checkbox {
|
||||
|
|
@ -98,14 +94,10 @@ sub checkbox {
|
|||
|
||||
Returns an array or a carriage return ("\n") separated scalar depending upon whether you're returning the values into an array or a scalar.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub checkList {
|
||||
|
|
@ -119,14 +111,10 @@ sub checkList {
|
|||
|
||||
Returns either an array of values or a scalar value depending upon what you request.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub combo {
|
||||
|
|
@ -143,14 +131,10 @@ sub combo {
|
|||
|
||||
Returns a content type. Defaults to "mixed".
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub contentType {
|
||||
|
|
@ -163,14 +147,10 @@ sub contentType {
|
|||
|
||||
Returns an epoch datestamp.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub date {
|
||||
|
|
@ -184,14 +164,10 @@ sub date {
|
|||
|
||||
Returns an epoch datestamp.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub dateTime {
|
||||
|
|
@ -204,14 +180,10 @@ sub dateTime {
|
|||
|
||||
Returns an email address.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub email {
|
||||
|
|
@ -228,14 +200,10 @@ sub email {
|
|||
|
||||
Returns a field type. Defaults to "text".
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub fieldType {
|
||||
|
|
@ -249,14 +217,10 @@ sub fieldType {
|
|||
|
||||
Returns a scalar filter type. Defaults to "most".
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub filter {
|
||||
|
|
@ -270,14 +234,10 @@ sub filter {
|
|||
|
||||
Returns a floating point (decimal) number. Defaults to "0.0".
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub float {
|
||||
|
|
@ -294,14 +254,10 @@ sub float {
|
|||
|
||||
Returns a group Id. Defaults to 2 (registered users).
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub group {
|
||||
|
|
@ -318,14 +274,10 @@ sub group {
|
|||
|
||||
Returns a string.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub hidden {
|
||||
|
|
@ -339,14 +291,10 @@ sub hidden {
|
|||
|
||||
Returns an array or a carriage return ("\n") separated scalar depending upon whether you're returning the values into an array or a scalar.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub hiddenList {
|
||||
|
|
@ -360,14 +308,10 @@ sub hiddenList {
|
|||
|
||||
Returns a string of HTML that has been cleaned of header information.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub HTMLArea {
|
||||
|
|
@ -381,14 +325,10 @@ sub HTMLArea {
|
|||
|
||||
Returns an integer. Defaults to "0".
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub integer {
|
||||
|
|
@ -405,14 +345,10 @@ sub integer {
|
|||
|
||||
Returns an interval in seconds. Defaults to "0".
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub interval {
|
||||
|
|
@ -426,14 +362,10 @@ sub interval {
|
|||
|
||||
Returns a string.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub password {
|
||||
|
|
@ -447,14 +379,10 @@ sub password {
|
|||
|
||||
Returns a string filtered to allow only digits, spaces, and these special characters: + - ( )
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub phone {
|
||||
|
|
@ -471,22 +399,18 @@ sub phone {
|
|||
|
||||
Returns whatever would be the expected result of the method type that was specified. This method also checks to make sure that the field is not returning a string filled with nothing but whitespace.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=item type
|
||||
=head3 type
|
||||
|
||||
The type of form element this variable came from. Defaults to "text" if not specified.
|
||||
|
||||
=item default
|
||||
=head3 default
|
||||
|
||||
The default value for this variable. If the variable is undefined then the default value will be returned instead.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub process {
|
||||
|
|
@ -510,14 +434,10 @@ sub process {
|
|||
|
||||
Returns a string.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub radio {
|
||||
|
|
@ -531,14 +451,10 @@ sub radio {
|
|||
|
||||
Returns a string.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub radioList {
|
||||
|
|
@ -552,14 +468,10 @@ sub radioList {
|
|||
|
||||
Returns an array or a carriage return ("\n") separated scalar depending upon whether you're returning the values into an array or a scalar.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub selectList {
|
||||
|
|
@ -574,14 +486,10 @@ sub selectList {
|
|||
|
||||
Returns a template id. Defaults to "1".
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub template {
|
||||
|
|
@ -598,14 +506,10 @@ sub template {
|
|||
|
||||
Returns a string of text.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub text {
|
||||
|
|
@ -619,14 +523,10 @@ sub text {
|
|||
|
||||
Returns a string of text.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub textarea {
|
||||
|
|
@ -641,14 +541,10 @@ sub textarea {
|
|||
Returns the number of seconds since 00:00:00 on a 24 hour clock. Note, this will adjust for the user's time offset in the reverse manner that the form field
|
||||
adjusts for it in order to make the times come out appropriately.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub timeField {
|
||||
|
|
@ -662,14 +558,10 @@ sub timeField {
|
|||
|
||||
Returns a URL.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub url {
|
||||
|
|
@ -690,14 +582,10 @@ sub url {
|
|||
|
||||
Returns either a 1 or 0 representing yes and no. Defaults to "0".
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub yesNo {
|
||||
|
|
@ -714,14 +602,10 @@ sub yesNo {
|
|||
|
||||
Returns a string which allows uppercase alpha characters, digits, spaces, and hypens (dashes).
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub zipcode {
|
||||
|
|
|
|||
|
|
@ -68,14 +68,10 @@ These methods are available from this class:
|
|||
|
||||
Returns a boolean whether the user has the privileges required to post.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
Defaults to $session{user}{userId}. Specify a user ID to check privileges for.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub canPost {
|
||||
|
|
@ -90,14 +86,10 @@ sub canPost {
|
|||
|
||||
Returns a boolean whether the user has the privileges required to view the forum.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
Defaults to $session{user}{userId}. Specify a user ID to check privileges for.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub canView {
|
||||
|
|
@ -112,9 +104,7 @@ sub canView {
|
|||
|
||||
Creates a new forum. Returns a forum object.
|
||||
|
||||
=over
|
||||
|
||||
=item forumParams
|
||||
=head3 forumParams
|
||||
|
||||
A hash reference containing a list of the parameters to default the forum to. The valid parameters are:
|
||||
|
||||
|
|
@ -138,8 +128,6 @@ archiveAfter - interval
|
|||
postsPerPage - integer
|
||||
masterForumId - Forum ID
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub create {
|
||||
|
|
@ -181,14 +169,10 @@ sub decrementThreads {
|
|||
|
||||
Returns a hash reference containing all of the properties of the forum.
|
||||
|
||||
=over
|
||||
|
||||
=item param
|
||||
=head3 param
|
||||
|
||||
If specified then this method will return the value of this one parameter as a scalar. Param is the name of the parameter to return. See the forum table for details.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub get {
|
||||
|
|
@ -205,14 +189,10 @@ sub get {
|
|||
|
||||
Returns a thread object.
|
||||
|
||||
=over
|
||||
|
||||
=item threadId
|
||||
=head3 threadId
|
||||
|
||||
The unique identifier of a thread in this forum.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getThread {
|
||||
|
|
@ -229,14 +209,10 @@ sub getThread {
|
|||
|
||||
Returns a boolean indicating whether the user is a moderator.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
Defaults to $session{user}{userId}. A user id to test for moderator privileges.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub isModerator {
|
||||
|
|
@ -251,18 +227,14 @@ sub isModerator {
|
|||
|
||||
Increments this forum's reply counter.
|
||||
|
||||
=over
|
||||
|
||||
=item lastPostDate
|
||||
=head3 lastPostDate
|
||||
|
||||
The date of the post being added.
|
||||
|
||||
=item lastPostId
|
||||
=head3 lastPostId
|
||||
|
||||
The unique identifier of the post being added.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub incrementReplies {
|
||||
|
|
@ -276,18 +248,14 @@ sub incrementReplies {
|
|||
|
||||
Increments the thread counter for this forum.
|
||||
|
||||
=over
|
||||
|
||||
=item lastPostDate
|
||||
=head3 lastPostDate
|
||||
|
||||
The date of the post that was just added.
|
||||
|
||||
=item lastPostId
|
||||
=head3 lastPostId
|
||||
|
||||
The unique identifier of the post that was just added.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub incrementThreads {
|
||||
|
|
@ -314,14 +282,10 @@ sub incrementViews {
|
|||
|
||||
Returns a boolean indicating whether the user is subscribed to the forum.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The user to check for the subscription. Defaults to $session{user}{userId}.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub isSubscribed {
|
||||
|
|
@ -337,14 +301,10 @@ sub isSubscribed {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item forumId
|
||||
=head3 forumId
|
||||
|
||||
The unique identifier of the forum to retrieve the object for.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -428,14 +388,10 @@ sub recalculateRating {
|
|||
|
||||
Sets the forum properties both in the object and to the database.
|
||||
|
||||
=over
|
||||
|
||||
=item data
|
||||
=head3 data
|
||||
|
||||
A hash reference containing the properties to set. See the forum table for details.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub set {
|
||||
|
|
@ -453,18 +409,14 @@ sub set {
|
|||
|
||||
Sets the pertinent details for the last post. Can also be done directly using the set method.
|
||||
|
||||
=over
|
||||
|
||||
=item lastPostDate
|
||||
=head3 lastPostDate
|
||||
|
||||
The epoch date of the post.
|
||||
|
||||
=item lastPostId
|
||||
=head3 lastPostId
|
||||
|
||||
The unique id of the post.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setLastPost {
|
||||
|
|
@ -481,14 +433,10 @@ sub setLastPost {
|
|||
|
||||
Subscribes a user to this forum.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The unique identifier of the user to subscribe. Defaults to the current user.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub subscribe {
|
||||
|
|
@ -505,14 +453,10 @@ sub subscribe {
|
|||
|
||||
Unsubscribes a user from this forum.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The unique identifier of the user to unsubscribe. Defaults to the current user.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub unsubscribe {
|
||||
|
|
|
|||
|
|
@ -68,14 +68,10 @@ These methods are available from this class:
|
|||
|
||||
Returns a boolean indicating whether the user can edit the current post.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The unique identifier to check privileges against. Defaults to the current user.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub canEdit {
|
||||
|
|
@ -91,14 +87,10 @@ sub canEdit {
|
|||
|
||||
Returns a boolean indicating whether the user can view the current post.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The unique identifier to check privileges against. Defaults to the current user.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub canView {
|
||||
|
|
@ -123,14 +115,10 @@ sub canView {
|
|||
|
||||
Creates a new post.
|
||||
|
||||
=over
|
||||
|
||||
=item data
|
||||
=head3 data
|
||||
|
||||
A hash reference containing the data to use to create the post. See the forumPost table for details.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub create {
|
||||
|
|
@ -148,14 +136,10 @@ sub create {
|
|||
|
||||
Returns a hash reference containing all of the parameters of this post.
|
||||
|
||||
=over
|
||||
|
||||
=item param
|
||||
=head3 param
|
||||
|
||||
The name of a parameter to get. If specified then the method will return only the value for this parameter as a scalar.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub get {
|
||||
|
|
@ -214,18 +198,14 @@ sub getThread {
|
|||
|
||||
Returns a boolean indicating whether this user has already rated this post.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
A unique identifier for a user to check. Defaults to the current user.
|
||||
|
||||
=item ipAddress
|
||||
=head3 ipAddress
|
||||
|
||||
If the user ID equals 1 (visitor) then an IP address is used to distinguish the user. Defaults to the current user's ip address.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub hasRated {
|
||||
|
|
@ -259,14 +239,10 @@ sub incrementViews {
|
|||
|
||||
Returns a boolean indicating whether this post is marked read for the user.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
A unique id for a user that you want to check. Defaults to the current user.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub isMarkedRead {
|
||||
|
|
@ -299,14 +275,10 @@ sub isReply {
|
|||
|
||||
Marks this post read for this user.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
A unique identifier for a user. Defaults to the current user.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub markRead {
|
||||
|
|
@ -325,14 +297,10 @@ sub markRead {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item postId
|
||||
=head3 postId
|
||||
|
||||
The unique identifier for the post object you wish to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -351,22 +319,18 @@ sub new {
|
|||
|
||||
Stores a rating against this post.
|
||||
|
||||
=over
|
||||
|
||||
=item rating
|
||||
=head3 rating
|
||||
|
||||
An integer between 1 and 5 (5 being best) to rate this post with.
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The unique id for the user rating this post. Defaults to the current user.
|
||||
|
||||
=item ipAddress
|
||||
=head3 ipAddress
|
||||
|
||||
The ip address of the user doing the rating. Defaults to the current user's IP.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub rate {
|
||||
|
|
@ -402,14 +366,10 @@ sub recalculateRating {
|
|||
|
||||
Sets properties to the database and the object.
|
||||
|
||||
=over
|
||||
|
||||
=item data
|
||||
=head3 data
|
||||
|
||||
A hash reference containing the properties to set. See the forumPost table for details.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
|
|
@ -511,14 +471,10 @@ sub setStatusPending {
|
|||
|
||||
Negates the markRead method.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The unique id of the user marking unread. Defaults to the current user.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub unmarkRead {
|
||||
|
|
|
|||
|
|
@ -75,18 +75,14 @@ These methods are available from this class:
|
|||
|
||||
Creates a new thread, including the root post in that thread.
|
||||
|
||||
=over
|
||||
|
||||
=item data
|
||||
=head3 data
|
||||
|
||||
The properties of this thread. See the forumThread table for details.
|
||||
|
||||
=item postData
|
||||
=head3 postData
|
||||
|
||||
The properties of the root post in this thread. See the forumPost table and the WebGUI::Forum::Post->create method for details.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub create {
|
||||
|
|
@ -126,14 +122,10 @@ sub decrementReplies {
|
|||
|
||||
Returns a hash reference containing all the properties of this thread.
|
||||
|
||||
=over
|
||||
|
||||
=item param
|
||||
=head3 param
|
||||
|
||||
The name of a specific property. If specified only the value of that property will be return as a scalar.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub get {
|
||||
|
|
@ -184,14 +176,10 @@ sub getNextThread {
|
|||
|
||||
Returns a post object.
|
||||
|
||||
=over
|
||||
|
||||
=item postId
|
||||
=head3 postId
|
||||
|
||||
The unique id of the post object you wish to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getPost {
|
||||
|
|
@ -239,18 +227,14 @@ sub isLocked {
|
|||
|
||||
Increments the replies counter for this thread.
|
||||
|
||||
=over
|
||||
|
||||
=item lastPostDate
|
||||
=head3 lastPostDate
|
||||
|
||||
The date of the reply that caused the replies counter to be incremented.
|
||||
|
||||
=item lastPostId
|
||||
=head3 lastPostId
|
||||
|
||||
The id of the reply that caused the replies counter to be incremented.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub incrementReplies {
|
||||
|
|
@ -293,14 +277,10 @@ sub isSticky {
|
|||
|
||||
Returns a boolean indicating whether the user is subscribed to this thread.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The unique id of the user to check. Defaults to the current user.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub isSubscribed {
|
||||
|
|
@ -330,14 +310,10 @@ sub lock {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item threadId
|
||||
=head3 threadId
|
||||
|
||||
The unique id of the thread object you wish to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -374,14 +350,10 @@ sub recalculateRating {
|
|||
|
||||
Sets properties for this thread both to the object and to the database.
|
||||
|
||||
=over
|
||||
|
||||
=item data
|
||||
=head3 data
|
||||
|
||||
A hash reference containing the properties to set. See the forumThread table for details.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub set {
|
||||
|
|
@ -399,18 +371,14 @@ sub set {
|
|||
|
||||
Sets the pertinent details for the last post. Can also be done directly using the set method.
|
||||
|
||||
=over
|
||||
|
||||
=item lastPostDate
|
||||
=head3 lastPostDate
|
||||
|
||||
The epoch date of the post.
|
||||
|
||||
=item lastPostId
|
||||
=head3 lastPostId
|
||||
|
||||
The unique id of the post.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setLastPost {
|
||||
|
|
@ -507,14 +475,10 @@ sub stick {
|
|||
|
||||
Subscribes the user to this thread.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The unique id of the user. Defaults to the current user.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub subscribe {
|
||||
|
|
@ -557,14 +521,10 @@ sub unstick {
|
|||
|
||||
Negates the subscribe method.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The unique id of the user to unsubscribe. Defaults to the current user.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub unsubscribe {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -81,14 +81,10 @@ sub _create {
|
|||
|
||||
Adds groups to this group.
|
||||
|
||||
=over
|
||||
|
||||
=item groups
|
||||
=head3 groups
|
||||
|
||||
An array reference containing the list of group ids to add to this group.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub addGroups {
|
||||
|
|
@ -101,14 +97,10 @@ sub addGroups {
|
|||
|
||||
Returns an boolean stating whether users can add themselves to this group.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, the autoAdd is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub autoAdd {
|
||||
|
|
@ -130,14 +122,10 @@ sub autoAdd {
|
|||
|
||||
Returns an boolean stating whether users can delete themselves from this group.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, the autoDelete is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub autoDelete {
|
||||
|
|
@ -186,14 +174,10 @@ sub delete {
|
|||
|
||||
Deletes groups from this group.
|
||||
|
||||
=over
|
||||
|
||||
=item groups
|
||||
=head3 groups
|
||||
|
||||
An array reference containing the list of group ids to delete from this group.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub deleteGroups {
|
||||
|
|
@ -207,14 +191,10 @@ sub deleteGroups {
|
|||
|
||||
Returns the number of days after the expiration to delete the grouping.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, deleteOffset is set to this value. Defaults to "-14".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub deleteOffset {
|
||||
|
|
@ -236,14 +216,10 @@ sub deleteOffset {
|
|||
|
||||
Returns the description of this group.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, the description is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub description {
|
||||
|
|
@ -265,14 +241,10 @@ sub description {
|
|||
|
||||
Returns a boolean value whether or not to notify the user of the group expiry.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, expireNotify is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub expireNotify {
|
||||
|
|
@ -294,14 +266,10 @@ sub expireNotify {
|
|||
|
||||
Returns the message to send to the user about expiration.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, expireNotifyMessage is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub expireNotifyMessage {
|
||||
|
|
@ -324,14 +292,10 @@ sub expireNotifyMessage {
|
|||
|
||||
Returns the number of days after the expiration to notify the user.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, expireNotifyOffset is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub expireNotifyOffset {
|
||||
|
|
@ -353,14 +317,10 @@ sub expireNotifyOffset {
|
|||
|
||||
Returns the number of seconds any grouping with this group should expire after.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, expireOffset is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub expireOffset {
|
||||
|
|
@ -382,14 +342,10 @@ sub expireOffset {
|
|||
|
||||
An alternative to the constructor "new", use find as a constructor by name rather than id.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the group you wish to instanciate.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub find {
|
||||
|
|
@ -417,14 +373,10 @@ sub groupId {
|
|||
|
||||
Returns the amount of karma required to be in this group.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, the karma threshold is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub karmaThreshold {
|
||||
|
|
@ -446,14 +398,10 @@ sub karmaThreshold {
|
|||
|
||||
Returns the ip address range(s) the user must be a part of to belong to this group.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, the ipFilter is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub ipFilter {
|
||||
|
|
@ -475,14 +423,10 @@ sub ipFilter {
|
|||
|
||||
Returns a boolean value indicating whether the group should be managable from the group manager. System level groups and groups autocreated by wobjects would use this parameter.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, isEditable is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub isEditable {
|
||||
|
|
@ -517,14 +461,10 @@ sub lastUpdated {
|
|||
|
||||
Returns the name of this group.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, the name is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub name {
|
||||
|
|
@ -546,14 +486,10 @@ sub name {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item groupId
|
||||
=head3 groupId
|
||||
|
||||
The groupId of the group you're creating an object reference for. If specified as "new" then a new group will be created and assigned the next available groupId. If left blank then the object methods will just return default values for everything.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -583,14 +519,10 @@ sub new {
|
|||
|
||||
Returns the name of this group.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, the name is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub scratchFilter {
|
||||
|
|
@ -611,14 +543,10 @@ sub scratchFilter {
|
|||
|
||||
Returns a boolean value indicating whether the group should show in forms that display a list of groups. System level groups and groups autocreated by wobjects would use this parameter.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, showInForms is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub showInForms {
|
||||
|
|
@ -642,14 +570,10 @@ sub showInForms {
|
|||
|
||||
Returns the dbQuery for this group.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, the dbQuery is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub dbQuery {
|
||||
|
|
@ -670,14 +594,10 @@ sub dbQuery {
|
|||
|
||||
Returns the databaseLinkId for this group.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, the databaseLinkId is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub databaseLinkId {
|
||||
|
|
@ -698,14 +618,10 @@ sub databaseLinkId {
|
|||
|
||||
Returns the dbCacheTimeout for this group.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, the dbCacheTimeout is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub dbCacheTimeout {
|
||||
|
|
|
|||
|
|
@ -58,18 +58,14 @@ These functions are available from this package:
|
|||
|
||||
Adds groups to a group.
|
||||
|
||||
=over
|
||||
|
||||
=item groups
|
||||
=head3 groups
|
||||
|
||||
An array reference containing the list of group ids to add.
|
||||
|
||||
=item toGroups
|
||||
=head3 toGroups
|
||||
|
||||
An array reference containing the list of group ids to add the first list to.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub addGroupsToGroups {
|
||||
|
|
@ -92,22 +88,18 @@ sub addGroupsToGroups {
|
|||
|
||||
Adds users to the specified groups.
|
||||
|
||||
=over
|
||||
|
||||
=item users
|
||||
=head3 users
|
||||
|
||||
An array reference containing a list of users.
|
||||
|
||||
=item groups
|
||||
=head3 groups
|
||||
|
||||
An array reference containing a list of groups.
|
||||
|
||||
=item expireOffset
|
||||
=head3 expireOffset
|
||||
|
||||
An override for the default offset of the grouping. Specified in seconds.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub addUsersToGroups {
|
||||
|
|
@ -134,18 +126,14 @@ sub addUsersToGroups {
|
|||
|
||||
Deletes groups from these groups.
|
||||
|
||||
=over
|
||||
|
||||
=item groups
|
||||
=head3 groups
|
||||
|
||||
An array reference containing the list of group ids to delete.
|
||||
|
||||
=item fromGroups
|
||||
=head3 fromGroups
|
||||
|
||||
An array reference containing the list of group ids to delete from.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub deleteGroupsFromGroups {
|
||||
|
|
@ -163,18 +151,14 @@ sub deleteGroupsFromGroups {
|
|||
|
||||
Deletes a list of users from the specified groups.
|
||||
|
||||
=over
|
||||
|
||||
=item users
|
||||
=head3 users
|
||||
|
||||
An array reference containing a list of users.
|
||||
|
||||
=item groups
|
||||
=head3 groups
|
||||
|
||||
An array reference containing a list of groups.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub deleteUsersFromGroups {
|
||||
|
|
@ -192,14 +176,10 @@ sub deleteUsersFromGroups {
|
|||
|
||||
Returns an array reference containing a list of groups the specified group is in.
|
||||
|
||||
=over
|
||||
|
||||
=item groupId
|
||||
=head3 groupId
|
||||
|
||||
A unique identifier for the group.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getGroupsForGroup {
|
||||
|
|
@ -213,18 +193,14 @@ sub getGroupsForGroup {
|
|||
|
||||
Returns an array reference containing a list of groups the specified user is in.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
A unique identifier for the user.
|
||||
|
||||
=item withoutExpired
|
||||
=head3 withoutExpired
|
||||
|
||||
If set to "1" then the listing will not include expired groupings. Defaults to "0".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getGroupsForUser {
|
||||
|
|
@ -252,18 +228,14 @@ sub getGroupsForUser {
|
|||
|
||||
Returns an array reference containing a list of groups that belong to the specified group.
|
||||
|
||||
=over
|
||||
|
||||
=item groupId
|
||||
=head3 groupId
|
||||
|
||||
A unique identifier for the group.
|
||||
|
||||
=item recursive
|
||||
=head3 recursive
|
||||
|
||||
A boolean value to determine whether the method should return the groups directly in the group, or to follow the entire groups of groups hierarchy. Defaults to "0".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
|
|
@ -302,18 +274,14 @@ sub getGroupsInGroup {
|
|||
|
||||
Returns an array reference containing a list of users that belong to the specified group.
|
||||
|
||||
=over
|
||||
|
||||
=item groupId
|
||||
=head3 groupId
|
||||
|
||||
A unique identifier for the group.
|
||||
|
||||
=item recursive
|
||||
=head3 recursive
|
||||
|
||||
A boolean value to determine whether the method should return the users directly in the group or to follow the entire groups of groups hierarchy. Defaults to "0".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getUsersInGroup {
|
||||
|
|
@ -334,18 +302,14 @@ sub getUsersInGroup {
|
|||
|
||||
Returns a boolean (0|1) value signifying that the user has the required privileges. Always returns true for Admins.
|
||||
|
||||
=over
|
||||
|
||||
=item groupId
|
||||
=head3 groupId
|
||||
|
||||
The group that you wish to verify against the user. Defaults to group with Id 3 (the Admin group).
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The user that you wish to verify against the group. Defaults to the currently logged in user.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub isInGroup {
|
||||
|
|
@ -477,22 +441,18 @@ sub isInGroup {
|
|||
|
||||
Returns a 1 or 0 depending upon whether the user is a sub-admin for this group.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
An integer that is the unique identifier for a user.
|
||||
|
||||
=item groupId
|
||||
=head3 groupId
|
||||
|
||||
An integer that is the unique identifier for a group.
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified the admin flag will be set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub userGroupAdmin {
|
||||
|
|
@ -511,22 +471,18 @@ sub userGroupAdmin {
|
|||
|
||||
Returns the epoch date that this grouping will expire.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
An integer that is the unique identifier for a user.
|
||||
|
||||
=item groupId
|
||||
=head3 groupId
|
||||
|
||||
An integer that is the unique identifier for a group.
|
||||
|
||||
=item epoch
|
||||
=head3 epoch
|
||||
|
||||
If specified the expire date will be set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub userGroupExpireDate {
|
||||
|
|
|
|||
|
|
@ -53,16 +53,12 @@ These methods are available from this package:
|
|||
|
||||
Returns an HTML segment that has been stripped of the <BODY> tag and anything before it, as well as the </BODY> tag and anything after it. It's main purpose is to get rid of META tags and other garbage from an HTML page that will be used as a segment inside of another page.
|
||||
|
||||
NOTE: This filter does have one exception, it leaves anything before the <BODY> tag that is enclosed in <STYLE></STYLE> or <SCRIPT></SCRIPT> tags.
|
||||
B<NOTE:> This filter does have one exception, it leaves anything before the <BODY> tag that is enclosed in <STYLE></STYLE> or <SCRIPT></SCRIPT> tags.
|
||||
|
||||
=over
|
||||
|
||||
=item html
|
||||
=head3 html
|
||||
|
||||
The HTML segment you want cleaned.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub cleanSegment {
|
||||
|
|
@ -95,18 +91,14 @@ sub cleanSegment {
|
|||
|
||||
Returns HTML with unwanted tags filtered out.
|
||||
|
||||
=over
|
||||
|
||||
=item html
|
||||
=head3 html
|
||||
|
||||
The HTML content you want filtered.
|
||||
|
||||
=item filter
|
||||
=head3 filter
|
||||
|
||||
Choose from "all", "none", "macros", "javascript", or "most". Defaults to "most". "all" removes all HTML tags and macros; "none" removes no HTML tags; "javascript" removes all references to javacript and macros; "macros" removes all macros, but nothing else; and "most" removes all but simple formatting tags like bold and italics.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub filter {
|
||||
|
|
@ -151,18 +143,14 @@ sub filter {
|
|||
|
||||
Formats various text types into HTML.
|
||||
|
||||
=over
|
||||
|
||||
=item content
|
||||
=head3 content
|
||||
|
||||
The text content to be formatted.
|
||||
|
||||
=item contentType
|
||||
=head3 contentType
|
||||
|
||||
The content type to use as formatting. Valid types are 'html', 'text', 'code', and 'mixed'. Defaults to mixed. See also the contentType method in WebGUI::Form, WebGUI::HTMLForm, and WebGUI::FormProcessor.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub format {
|
||||
|
|
@ -194,14 +182,10 @@ sub format {
|
|||
Converts html to text. It currently handles only text, so tables
|
||||
or forms are not converted.
|
||||
|
||||
=over
|
||||
|
||||
=item html
|
||||
=head3 html
|
||||
|
||||
The html segment you want to convert to text.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub html2text {
|
||||
|
|
@ -240,18 +224,14 @@ sub html2text {
|
|||
|
||||
Returns html with all relative links converted to absolute.
|
||||
|
||||
=over
|
||||
|
||||
=item html
|
||||
=head3 html
|
||||
|
||||
The html to be made absolute.
|
||||
|
||||
=item baseURL
|
||||
=head3 baseURL
|
||||
|
||||
The base URL to use. Defaults to current page's url.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub makeAbsolute {
|
||||
|
|
@ -322,14 +302,10 @@ sub makeAbsolute {
|
|||
|
||||
Processes text using the WebGUI replacements system.
|
||||
|
||||
=over
|
||||
|
||||
=item content
|
||||
=head3 content
|
||||
|
||||
The content to be processed through the replacements filter.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub processReplacements {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -115,22 +115,18 @@ sub getStatus {
|
|||
|
||||
Sends a cookie to the browser.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the cookie to set. Must be unique from all other cookies from this domain or it will overwrite that cookie.
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
The value to set.
|
||||
|
||||
=item timeToLive
|
||||
=head3 timeToLive
|
||||
|
||||
The time that the cookie should remain in the browser. Defaults to "+10y" (10 years from now).
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setCookie {
|
||||
|
|
@ -152,18 +148,14 @@ sub setCookie {
|
|||
|
||||
Override the default filename for the document, which is usually the page url. Usually used with setMimeType().
|
||||
|
||||
=over
|
||||
|
||||
=item filename
|
||||
=head3 filename
|
||||
|
||||
The filename to set.
|
||||
|
||||
=item mimetype
|
||||
=head3 mimetype
|
||||
|
||||
The mimetype for this file. Defaults to "application/octet-stream".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setFilename {
|
||||
|
|
@ -180,16 +172,12 @@ sub setFilename {
|
|||
|
||||
Override mime type for the document, which is defaultly "text/html". Also see setFilename().
|
||||
|
||||
NOTE: By setting the mime type to something other than "text/html" WebGUI will automatically not process the normal page contents. Instead it will return only the content of your Wobject function or Operation.
|
||||
B<NOTE:> By setting the mime type to something other than "text/html" WebGUI will automatically not process the normal page contents. Instead it will return only the content of your Wobject function or Operation.
|
||||
|
||||
=over
|
||||
|
||||
=item mimetype
|
||||
=head3 mimetype
|
||||
|
||||
The mime type for the document.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setMimeType {
|
||||
|
|
@ -203,14 +191,10 @@ sub setMimeType {
|
|||
Disables the printing of a HTTP header. Useful in situations when content is not
|
||||
returned to a browser (export to disk for example).
|
||||
|
||||
=over
|
||||
|
||||
=item boolean
|
||||
=head3 boolean
|
||||
|
||||
Any value other than 0 will disable header printing.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setNoHeader {
|
||||
|
|
@ -223,14 +207,10 @@ sub setNoHeader {
|
|||
|
||||
Sets the necessary information in the HTTP header to redirect to another URL.
|
||||
|
||||
=over
|
||||
|
||||
=item url
|
||||
=head3 url
|
||||
|
||||
The URL to redirect to.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setRedirect {
|
||||
|
|
@ -245,14 +225,10 @@ sub setRedirect {
|
|||
|
||||
Sets the HTTP status code.
|
||||
|
||||
=over
|
||||
|
||||
=item status
|
||||
=head3 status
|
||||
|
||||
An HTTP status code. It takes the form of "NNN Message" where NNN is a 3 digit status number and Message is some text explaining the status number.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setStatus {
|
||||
|
|
|
|||
|
|
@ -89,18 +89,14 @@ sub _getBaseURL {
|
|||
|
||||
Generates a button with the word "Copy" printed on it.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub copyIcon {
|
||||
|
|
@ -117,18 +113,14 @@ sub copyIcon {
|
|||
|
||||
Generates a button with the word "Cut" printed on it.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub cutIcon {
|
||||
|
|
@ -145,18 +137,14 @@ sub cutIcon {
|
|||
|
||||
Generates a button that represents a delete operation.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub deleteIcon {
|
||||
|
|
@ -185,18 +173,14 @@ sub dragIcon {
|
|||
|
||||
Generates a button with the word "Edit" printed on it.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub editIcon {
|
||||
|
|
@ -213,18 +197,14 @@ sub editIcon {
|
|||
|
||||
Generates an export button.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub exportIcon {
|
||||
|
|
@ -266,18 +246,14 @@ sub getToolbarOptions {
|
|||
|
||||
Generates a button with the word "Help" printed on it.
|
||||
|
||||
=over
|
||||
|
||||
=item helpId
|
||||
=head3 helpId
|
||||
|
||||
The id in the help table that relates to the help documentation for your function.
|
||||
|
||||
=item namespace
|
||||
=head3 namespace
|
||||
|
||||
If your help documentation is not in the WebGUI namespace, then you must specify the namespace for this help.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub helpIcon {
|
||||
|
|
@ -294,18 +270,14 @@ sub helpIcon {
|
|||
|
||||
Generates a button that represents a management function.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub manageIcon {
|
||||
|
|
@ -322,18 +294,14 @@ sub manageIcon {
|
|||
|
||||
Generates a button with a double down arrow printed on it.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub moveBottomIcon {
|
||||
|
|
@ -350,18 +318,14 @@ sub moveBottomIcon {
|
|||
|
||||
Generates a button with a down arrow printed on it.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub moveDownIcon {
|
||||
|
|
@ -378,18 +342,14 @@ sub moveDownIcon {
|
|||
|
||||
Generates a button with a left arrow printed on it.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub moveLeftIcon {
|
||||
|
|
@ -406,18 +366,14 @@ sub moveLeftIcon {
|
|||
|
||||
Generates a button with a right arrow printed on it.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub moveRightIcon {
|
||||
|
|
@ -434,18 +390,14 @@ sub moveRightIcon {
|
|||
|
||||
Generates a button with a double up arrow printed on it.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub moveTopIcon {
|
||||
|
|
@ -462,18 +414,14 @@ sub moveTopIcon {
|
|||
|
||||
Generates a button with an up arrow printed on it.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub moveUpIcon {
|
||||
|
|
@ -502,18 +450,14 @@ sub pageIcon {
|
|||
|
||||
Generates a button with the word "Paste" printed on it.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub pasteIcon {
|
||||
|
|
@ -530,18 +474,14 @@ sub pasteIcon {
|
|||
|
||||
Generates a button with a shortcut symbol printed on it, similar to the shortcut icon in Microsoft Windows or the link Icon in Gnome.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub shortcutIcon {
|
||||
|
|
@ -558,18 +498,14 @@ sub shortcutIcon {
|
|||
|
||||
Generates a button with the word "View" printed on it.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
=head3 urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub viewIcon {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ Package WebGUI::Id
|
|||
|
||||
This package generates global unique ids, sometimes called GUIDs. A global unique ID is guaranteed to be unique everywhere and at everytime.
|
||||
|
||||
NOTE: There is no such thing as perfectly unique ID's, but the chances of a duplicate ID are so minute that they are effectively unique.
|
||||
B<NOTE:> There is no such thing as perfectly unique ID's, but the chances of a duplicate ID are so minute that they are effectively unique.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
|
|
|||
|
|
@ -53,22 +53,18 @@ These functions/methods are available from this package:
|
|||
|
||||
Returns the internationalized message string for the user's language. If there is no internationalized message, this method will return the English string.
|
||||
|
||||
=over
|
||||
|
||||
=item internationalId
|
||||
=head3 internationalId
|
||||
|
||||
An integer that relates to a message in the international table in the WebGUI database.
|
||||
|
||||
=item namespace
|
||||
=head3 namespace
|
||||
|
||||
A string that relates to the namespace field in the international table in the WebGUI database. Defaults to 'WebGUI'.
|
||||
|
||||
=item languageId
|
||||
=head3 languageId
|
||||
|
||||
An integer that specifies the language that the user should see. Defaults to the user's defined language. If the user hasn't specified a default language it defaults to '1' (English).
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub get {
|
||||
|
|
@ -100,18 +96,14 @@ sub get {
|
|||
|
||||
Returns a hash reference to a particular language's properties.
|
||||
|
||||
=over
|
||||
|
||||
=item languageId
|
||||
=head3 languageId
|
||||
|
||||
Defaults to "English". The language to retrieve the properties for.
|
||||
|
||||
=item propertyName
|
||||
=head3 propertyName
|
||||
|
||||
If this is specified, only the value of the property will be returned, instead of the hash reference to all properties. The valid values are "charset", "toolbar", and "label".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getLanguage {
|
||||
|
|
@ -165,18 +157,14 @@ sub getLanguages {
|
|||
|
||||
The constructor for the International function if using it in OO mode.
|
||||
|
||||
=over
|
||||
|
||||
=item namespace
|
||||
=head3 namespace
|
||||
|
||||
Specify a default namespace. Defaults to "WebGUI".
|
||||
|
||||
=item languageId
|
||||
=head3 languageId
|
||||
|
||||
Specify a default language. Defaults to user preference.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Package WebGUI::Macro
|
|||
|
||||
This package is the interface to the WebGUI macro system.
|
||||
|
||||
NOTE: This entire system is likely to be replaced in the near future. It has served WebGUI well since the very beginning but lacks the speed and flexibility that WebGUI users will require in the future.
|
||||
B<NOTE:> This entire system is likely to be replaced in the near future. It has served WebGUI well since the very beginning but lacks the speed and flexibility that WebGUI users will require in the future.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
|
@ -71,14 +71,10 @@ $nestedMacro = qr /(\^ # Start with carat
|
|||
|
||||
Removes all the macros from the HTML segment.
|
||||
|
||||
=over
|
||||
|
||||
=item html
|
||||
=head3 html
|
||||
|
||||
The segment to be filtered.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub filter {
|
||||
|
|
@ -96,14 +92,10 @@ sub filter {
|
|||
|
||||
A simple, but error prone mechanism for getting a prameter list from a string. Returns an array of parameters.
|
||||
|
||||
=over
|
||||
|
||||
=item parameterString
|
||||
=head3 parameterString
|
||||
|
||||
A string containing a comma separated list of paramenters.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getParams {
|
||||
|
|
@ -124,14 +116,10 @@ sub getParams {
|
|||
|
||||
Nullifies all macros in this content segment.
|
||||
|
||||
=over
|
||||
|
||||
=item html
|
||||
=head3 html
|
||||
|
||||
A string of HTML to be processed.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub negate {
|
||||
|
|
@ -147,14 +135,10 @@ sub negate {
|
|||
|
||||
Runs all the WebGUI macros to and replaces them in the HTML with their output.
|
||||
|
||||
=over
|
||||
|
||||
=item html
|
||||
=head3 html
|
||||
|
||||
A string of HTML to be processed.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub process {
|
||||
|
|
|
|||
|
|
@ -48,34 +48,30 @@ These methods are available from this class:
|
|||
|
||||
Sends an SMTP email message to the specified user.
|
||||
|
||||
=over
|
||||
|
||||
=item to
|
||||
=head3 to
|
||||
|
||||
An email address for the TO line.
|
||||
|
||||
=item subject
|
||||
=head3 subject
|
||||
|
||||
The subject line for the email.
|
||||
|
||||
=item message
|
||||
=head3 message
|
||||
|
||||
The message body for the email.
|
||||
|
||||
=item cc
|
||||
=head3 cc
|
||||
|
||||
The email address for the CC line.
|
||||
|
||||
=item from
|
||||
=head3 from
|
||||
|
||||
The email address for the FROM line. Defaults to the email address specified in the Company Settings.
|
||||
|
||||
=item bcc
|
||||
=head3 bcc
|
||||
|
||||
The email address for the BCC line.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub send {
|
||||
|
|
|
|||
|
|
@ -79,42 +79,38 @@ sub _notify {
|
|||
|
||||
Adds an entry to the message log and sends out notification to users.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The id of the user that should receive this notification.
|
||||
|
||||
NOTE: This can be left blank if you're specifying a groupId.
|
||||
B<NOTE:> This can be left blank if you're specifying a groupId.
|
||||
|
||||
=item groupId
|
||||
=head3 groupId
|
||||
|
||||
The id of the group that should receive this notification.
|
||||
|
||||
NOTE: This can be left blank if you're specifying a userId.
|
||||
B<NOTE:> This can be left blank if you're specifying a userId.
|
||||
|
||||
=item subject
|
||||
=head3 subject
|
||||
|
||||
The subject of the notification.
|
||||
|
||||
=item message
|
||||
=head3 message
|
||||
|
||||
The content of the notification.
|
||||
|
||||
=item url
|
||||
=head3 url
|
||||
|
||||
The URL of any action that should be taken based upon this notification (if any).
|
||||
|
||||
=item status
|
||||
=head3 status
|
||||
|
||||
Defaults to 'notice'. Can be 'pending', 'notice', or 'completed'.
|
||||
|
||||
=item from
|
||||
=head3 from
|
||||
|
||||
The addressee email address. Defaults to company email.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub addEntry {
|
||||
|
|
@ -151,38 +147,34 @@ sub addEntry {
|
|||
|
||||
Adds an entry to the message log using a translated message from the internationalization system and sends out notifications to users.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The id of the user that should receive this notification.
|
||||
|
||||
NOTE: This can be left blank if you're specifying a groupId.
|
||||
B<NOTE:> This can be left blank if you're specifying a groupId.
|
||||
|
||||
=item groupId
|
||||
=head3 groupId
|
||||
|
||||
The id of the group that should receive this notification.
|
||||
|
||||
NOTE: This can be left blank if you're specifying a userId.
|
||||
B<NOTE:> This can be left blank if you're specifying a userId.
|
||||
|
||||
=item url
|
||||
=head3 url
|
||||
|
||||
The URL of any action that should be taken based upon this notification (if any).
|
||||
|
||||
=item internationalId
|
||||
=head3 internationalId
|
||||
|
||||
The unique identifier from the internationalization system of the message to send.
|
||||
|
||||
=item namespace
|
||||
=head3 namespace
|
||||
|
||||
The namespace from the internationalization system of the message to send. Defaults to "WebGUI";
|
||||
|
||||
=item status
|
||||
=head3 status
|
||||
|
||||
Defaults to 'notice'. Can be 'pending', 'notice', or 'completed'.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub addInternationalizedEntry {
|
||||
|
|
@ -226,14 +218,10 @@ sub addInternationalizedEntry {
|
|||
|
||||
Set a message log entry to complete.
|
||||
|
||||
=over
|
||||
|
||||
=item messageLogId
|
||||
=head3 messageLogId
|
||||
|
||||
The id of the message to complete.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub completeEntry {
|
||||
|
|
|
|||
|
|
@ -70,14 +70,10 @@ sub getFieldTypes {
|
|||
|
||||
Deletes a field from the metadata system.
|
||||
|
||||
=over
|
||||
|
||||
=item fieldId
|
||||
=head3 fieldId
|
||||
|
||||
The fieldId to be deleted.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub deleteField {
|
||||
|
|
@ -94,19 +90,15 @@ sub deleteField {
|
|||
Returns a hash reference containing metadata field properties
|
||||
for a single field.
|
||||
|
||||
=over
|
||||
|
||||
=item fieldId
|
||||
=head3 fieldId
|
||||
|
||||
The fieldId for which you want to retrieve field properties.
|
||||
|
||||
=item wobjectId
|
||||
=head3 wobjectId
|
||||
|
||||
If specified, the method will not only get the field properties,
|
||||
but the value for this wobjectId as well.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getField {
|
||||
|
|
@ -129,19 +121,15 @@ If a wobjectId is specified, the metadata values for that wobject
|
|||
are included as well. You can limit the output to a certain
|
||||
field by specifying a fieldId.
|
||||
|
||||
=over
|
||||
|
||||
=item wobjectId
|
||||
=head3 wobjectId
|
||||
|
||||
If specified, the hashRef will contain the metadata values for
|
||||
this wobject.
|
||||
|
||||
=item fieldId
|
||||
=head3 fieldId
|
||||
|
||||
If specified, the hashRef will contain only this field.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getMetaDataFields {
|
||||
|
|
@ -176,14 +164,10 @@ sub getMetaDataFields {
|
|||
|
||||
Saves posted metadata for requested wobjectId
|
||||
|
||||
=over
|
||||
|
||||
=item wobjectId
|
||||
=head3 wobjectId
|
||||
|
||||
The Id from the wobject you want to save metadata for.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub metaDataSave {
|
||||
|
|
@ -217,14 +201,10 @@ sub metaDataSave {
|
|||
|
||||
Deletes the metadata for requested wobjectId
|
||||
|
||||
=over
|
||||
|
||||
=item wobjectId
|
||||
=head3 wobjectId
|
||||
|
||||
The Id from the wobject you want to delete metadata for.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub metaDataDelete {
|
||||
|
|
@ -238,18 +218,14 @@ sub metaDataDelete {
|
|||
|
||||
Duplicates Metadata
|
||||
|
||||
=over
|
||||
|
||||
=item fromWobjectId
|
||||
=head3 fromWobjectId
|
||||
|
||||
The original wobject Id
|
||||
|
||||
=item toWobjectId
|
||||
=head3 toWobjectId
|
||||
|
||||
The new wobject Id
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub MetaDataDuplicate {
|
||||
|
|
@ -271,9 +247,7 @@ sub MetaDataDuplicate {
|
|||
This function will search for a wobject that match a metadata criteria set.
|
||||
If no wobject is found, undef will be returned.
|
||||
|
||||
=over
|
||||
|
||||
=item hashRef
|
||||
=head3 hashRef
|
||||
|
||||
A typical hashRef for this function will look like:
|
||||
|
||||
|
|
@ -287,8 +261,6 @@ Most of the time this will be a:
|
|||
|
||||
WebGUI::SQL->quickHashRef("select * from WobjectProxy where wobjectId=$proxiedId");
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getWobjectByCriteria {
|
||||
|
|
|
|||
|
|
@ -387,15 +387,11 @@ If no identifier is specified, the class identifier will be used.
|
|||
|
||||
This routine can be called both as a method or as a function.
|
||||
|
||||
=over
|
||||
|
||||
=item identifier
|
||||
=head3 identifier
|
||||
|
||||
The configuration to use. Config is stored in the table Navigation
|
||||
in the database.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getConfig {
|
||||
|
|
@ -441,14 +437,12 @@ sub getMethodNames {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item identifier
|
||||
=head3 identifier
|
||||
|
||||
The configuration to use. Config is stored in the table Navigation
|
||||
in the database.
|
||||
|
||||
=item options
|
||||
=head3 options
|
||||
|
||||
Instead of using an existing configuration, you can also drop
|
||||
in your own parameters of the form: option => value.
|
||||
|
|
@ -460,8 +454,6 @@ $custom = WebGUI::Navigation->new(
|
|||
template=>'<tmpl_loop page_loop><tmpl_var page.title><br></tmpl_loop>'
|
||||
);
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
|
|||
|
|
@ -150,18 +150,14 @@ sub getURL {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item node1
|
||||
=head3 node1
|
||||
|
||||
The first level of the hash heirarchy.
|
||||
|
||||
=item node2
|
||||
=head3 node2
|
||||
|
||||
The second level of the hash heirarchy.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -175,22 +171,18 @@ sub new {
|
|||
|
||||
Archives this node into a tar file and then compresses it with a zlib algorithm.
|
||||
|
||||
=over
|
||||
|
||||
=item filename
|
||||
=head3 filename
|
||||
|
||||
The name of the tar file to be created. Should ideally end with ".tar.gz".
|
||||
|
||||
=item node1
|
||||
=head3 node1
|
||||
|
||||
The node where you would like to create this tar file. Defaults to "temp".
|
||||
|
||||
=item node2
|
||||
=head3 node2
|
||||
|
||||
If you need a second level node to store the file, then specify it here.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub tar {
|
||||
|
|
@ -217,22 +209,18 @@ sub tar {
|
|||
|
||||
Unarchives a file into this node.
|
||||
|
||||
=over
|
||||
|
||||
=item filename
|
||||
=head3 filename
|
||||
|
||||
The name of the tar file to be untarred.
|
||||
|
||||
=item node1
|
||||
=head3 node1
|
||||
|
||||
The node where the tar file exists. Defaults to "temp".
|
||||
|
||||
=item node2
|
||||
=head3 node2
|
||||
|
||||
If the file exists in a sub-node, then specifiy it here.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub untar {
|
||||
|
|
|
|||
|
|
@ -69,14 +69,10 @@ sub _changeWobjectPrivileges {
|
|||
This private function set an entire subtree with $page as root to the same privilege and/or
|
||||
style settings. These properties are set to be a duplicate of those in page.
|
||||
|
||||
=over
|
||||
|
||||
=item page
|
||||
=head3 page
|
||||
|
||||
This is the page whose ancestors should be changed. This must be an WebGUI::Page instance.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
# This combines _recusivelyChangePrivileges and _recusivelyChangeStyle, since there's no use in walking down a tree twice.
|
||||
sub _recursivelyChangeProperties {
|
||||
|
|
@ -179,18 +175,14 @@ sub _selectPositions {
|
|||
Walks down the page tree from page with id pageId and returns an indented list of the pages it
|
||||
walks over. Also prints edit/delete/move buttons.
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
The id of the page you want to start from
|
||||
|
||||
=item initialDepth
|
||||
=head3 initialDepth
|
||||
|
||||
The depth the tree should start with. Defaults to zero.
|
||||
|
||||
=over
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
sub _traversePageTree {
|
||||
my (%wobject, $output, $spacer, $page, $currentPage, $options, $currentPageId, $currentUrlizedTitle, $wobjects);
|
||||
|
|
@ -232,8 +224,6 @@ sub _traversePageTree {
|
|||
This will cut the page defined by $session{page}{pageId} (ie. the current page) and all it's
|
||||
children from the pagetree and place it on the clipboard.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
sub www_cutPage {
|
||||
my ($page);
|
||||
|
|
@ -256,8 +246,6 @@ sub www_cutPage {
|
|||
|
||||
This function returns an 'Are you sure' page for moving the page to the trash.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
sub www_deletePage {
|
||||
my ($output);
|
||||
|
|
@ -282,8 +270,6 @@ sub www_deletePage {
|
|||
|
||||
Actually transfers the page to the trash.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
sub www_deletePageConfirm {
|
||||
if ($session{page}{isSystem}) {
|
||||
|
|
@ -303,8 +289,6 @@ sub www_deletePageConfirm {
|
|||
|
||||
Displays the properties for a page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
sub www_editPage {
|
||||
my ($f, $endDate, $output, $subtext, $childCount, %hash, %page);
|
||||
|
|
@ -550,8 +534,6 @@ sub www_editPage {
|
|||
|
||||
Stores the data from www_editPage to the database and tree cache.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
sub www_editPageSave {
|
||||
my ($pageId, $currentPage, $page);
|
||||
|
|
@ -619,8 +601,6 @@ sub www_editPageSave {
|
|||
|
||||
Displays the export page administrative interface
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub www_exportPage {
|
||||
|
|
@ -672,8 +652,6 @@ sub www_exportPage {
|
|||
|
||||
Displays the export status page
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
|
|
@ -705,8 +683,6 @@ sub www_exportPageStatus {
|
|||
Executes the export process and displays real time status. This operation is displayed
|
||||
by exportPageStatus in an IFRAME.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
|
|
@ -800,8 +776,6 @@ sub _checkExportPath {
|
|||
|
||||
Moves page down in the context of it's sisters.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
sub www_movePageDown {
|
||||
if (WebGUI::Page::canEdit($session{page}{pageId})) {
|
||||
|
|
@ -818,8 +792,6 @@ sub www_movePageDown {
|
|||
|
||||
Moves page up in the context of it's sisters.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
sub www_movePageUp {
|
||||
if (WebGUI::Page::canEdit($session{page}{pageId})) {
|
||||
|
|
@ -836,8 +808,6 @@ sub www_movePageUp {
|
|||
|
||||
Same as www_movePageUp wit this difference that this module returns the www_viewPageTree method.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
sub www_moveTreePageUp {
|
||||
if (WebGUI::Page::canEdit($session{form}{pageId})) {
|
||||
|
|
@ -853,8 +823,6 @@ sub www_moveTreePageUp {
|
|||
|
||||
Same as www_movePageDown with this difference that this module returns the www_viewPageTree method.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
sub www_moveTreePageDown {
|
||||
if (WebGUI::Page::canEdit($session{form}{pageId})) {
|
||||
|
|
@ -871,8 +839,6 @@ sub www_moveTreePageDown {
|
|||
Move the page one level left in the tree. In other words, the page is moved up one place in the hierarchy.
|
||||
Another way to look at is that the mother of the current page becomes the elder sister of the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
sub www_moveTreePageLeft {
|
||||
if (WebGUI::Page::canEdit($session{form}{pageId})) {
|
||||
|
|
@ -935,8 +901,6 @@ sub www_rearrangeWobjects {
|
|||
|
||||
Returns a HTML formatted indented pagetree complete with edit/delete/cut/move buttons
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
sub www_viewPageTree {
|
||||
my ($output);
|
||||
|
|
|
|||
|
|
@ -86,14 +86,10 @@ sub getRequiredProfileFields {
|
|||
Checks the value of the email address passed in to see if it is duplicated in the system. Returns true of false. Will return false if the email address passed in is
|
||||
same as the email address of the current user.
|
||||
|
||||
=over
|
||||
|
||||
=item email
|
||||
=head3 email
|
||||
|
||||
email address to check for duplication
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub isDuplicateEmail {
|
||||
|
|
|
|||
|
|
@ -193,14 +193,10 @@ sub _processWobjectFunctions {
|
|||
Adds page to the right of the children of the object this method is invoked
|
||||
on. Returns the new page object.
|
||||
|
||||
=over
|
||||
|
||||
=item page
|
||||
=head3 page
|
||||
|
||||
A WebGUI::Page instance to be added to the children of the current object.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub add {
|
||||
|
|
@ -242,14 +238,10 @@ sub ancestors {
|
|||
|
||||
Returns a boolean (0|1) value signifying that the user has the required privileges.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
The unique identifier for the page that you wish to check the privileges on. Defaults to the current page id.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub canEdit {
|
||||
|
|
@ -336,14 +328,10 @@ sub canMoveUp {
|
|||
|
||||
Returns a boolean (0|1) value signifying that the user has the required privileges. Always returns users that have the rights to edit this page.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
The unique identifier for the page that you wish to check the privileges on. Defaults to the current page id.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub canView {
|
||||
|
|
@ -370,14 +358,10 @@ sub canView {
|
|||
|
||||
Returns the number of template positions in the specified page template.
|
||||
|
||||
=over
|
||||
|
||||
=item templateId
|
||||
=head3 templateId
|
||||
|
||||
The id of the page template you wish to count.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub countTemplatePositions {
|
||||
|
|
@ -440,14 +424,10 @@ sub daughters {
|
|||
Deletes the cached version of a specified page. Note that this is something else than the
|
||||
cached page tree. This funtion should be invoked in a non-OO context;
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
The id of the page to decache. Defaults to the current page id.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub deCache {
|
||||
|
|
@ -506,14 +486,10 @@ sub descendants {
|
|||
|
||||
Returns an HTML string containing a small representation of the page template.
|
||||
|
||||
=over
|
||||
|
||||
=item templateId
|
||||
=head3 templateId
|
||||
|
||||
The id of the page template you wish to draw.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub drawTemplate {
|
||||
|
|
@ -662,14 +638,10 @@ sub generation {
|
|||
|
||||
Returns a hash reference of all the page properties.
|
||||
|
||||
=over
|
||||
|
||||
=item property
|
||||
=head3 property
|
||||
|
||||
Returns a scalar containing the value of the specififed proeprty.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub get {
|
||||
|
|
@ -704,15 +676,11 @@ sub getAnonymousRoot {
|
|||
Return the first (leftmost) daughter of the current node when called in instance context,
|
||||
returns the first daughter of 'pageId' when called in class context.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
Only required if called in class context. The pageId of the page of which you want the
|
||||
daughter of. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getFirstDaughter {
|
||||
|
|
@ -737,15 +705,11 @@ sub getFirstDaughter {
|
|||
Returns the grandmother of the current node, or, when called in class context, the garndmother
|
||||
of 'pageId'.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
Only required if called in class context. The pageId of the page of which you want the
|
||||
grandmother of. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getGrandmother {
|
||||
|
|
@ -769,15 +733,11 @@ sub getGrandmother {
|
|||
Returns the left sister of the current node, or, when called in class context, the left sister
|
||||
of 'pageId'.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
Only required if called in class context. The pageId of the page of which you want the
|
||||
left sister of. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getLeftSister {
|
||||
|
|
@ -800,15 +760,11 @@ sub getLeftSister {
|
|||
Returns the mother of the current node, or, when called in class context, the left sister
|
||||
of 'pageId'.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
Only required if called in class context. The pageId of the page of which you want the
|
||||
mother of. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
|
|
@ -832,14 +788,10 @@ sub getMother {
|
|||
|
||||
Returns the page identified by 'pageId'.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
The pageId of the page you want. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getPage {
|
||||
|
|
@ -857,15 +809,11 @@ sub getPage {
|
|||
Returns the right sister of the current node, or, when called in class context, the right sister
|
||||
of 'pageId'.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
Only required if called in class context. The pageId of the page of which you want the
|
||||
right sister of. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
|
|
@ -889,15 +837,11 @@ sub getRightSister {
|
|||
Returns the top page (child of a WebGUI root, depth = 1) of the current node, or, when called in class
|
||||
context, the top of 'pageId'.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
Only required if called in class context. The pageId of the page of which you want the
|
||||
top page of. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
|
|
@ -936,14 +880,10 @@ sub getTemplateList {
|
|||
|
||||
Returns an HTML template.
|
||||
|
||||
=over
|
||||
|
||||
=item templateId
|
||||
=head3 templateId
|
||||
|
||||
The id of the page template you wish to retrieve. Defaults to the current page's template id.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getTemplate {
|
||||
|
|
@ -958,14 +898,10 @@ sub getTemplate {
|
|||
|
||||
Returns a hash reference containing the positions available in the specified page template.
|
||||
|
||||
=over
|
||||
|
||||
=item templateId
|
||||
=head3 templateId
|
||||
|
||||
The id of the page template you wish to retrieve the positions from.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getTemplatePositions {
|
||||
|
|
@ -984,15 +920,11 @@ sub getTemplatePositions {
|
|||
Returns the WebGUI root (depth = 0) of the current node, or, when called in class
|
||||
context, the WebGUI root of 'pageId'.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
Only required if called in class context. The pageId of the page of which you want the
|
||||
WebGUI root of. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getWebGUIRoot {
|
||||
|
|
@ -1061,18 +993,14 @@ sub leaves_under {
|
|||
|
||||
Returns a unique page URL.
|
||||
|
||||
=over
|
||||
|
||||
=item url
|
||||
=head3 url
|
||||
|
||||
The URL you're hoping for.
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
The page id of the page you're creating a URL for.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub makeUnique {
|
||||
|
|
@ -1103,14 +1031,10 @@ sub makeUnique {
|
|||
Moves a page to another page (ie. makes the page you execute this method on a child of newMother).
|
||||
Returns 1 if the move was succesfull, 0 otherwise.
|
||||
|
||||
=over
|
||||
|
||||
=item newMother
|
||||
=head3 newMother
|
||||
|
||||
The page under which the current page should be moved. This should be an WebGUI::Page object.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub move{
|
||||
|
|
@ -1324,14 +1248,10 @@ containing page properties. You can use the latter if you already have page prop
|
|||
something like it for example), and save a (redundant) database query. You can of course also use it to fool the
|
||||
system with dummy pages and do all kinds of magic that I can't imagine with it.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId || { properties }
|
||||
=head3 pageId || { properties }
|
||||
|
||||
You can pass either a pageId or a properties hashref. See above for an explanation
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -1362,14 +1282,10 @@ sub new {
|
|||
|
||||
Pastes a page under newMother.
|
||||
|
||||
=over
|
||||
|
||||
=item newMother
|
||||
=head3 newMother
|
||||
|
||||
The page under which the current page should be pasted. This should be an WebGUI::Page object.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub paste{
|
||||
|
|
@ -1581,14 +1497,10 @@ the state of the tree is saved to the database.
|
|||
This method purges the Navigation cache. Note that if you have to save a lot of properties in row, it's better to use
|
||||
setWithoutRecache, and call recacheNavigation manually. This saves some time.
|
||||
|
||||
=over
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
The properties you want to set. This parameter is optional and should be a hashref of the form {propertyA => valueA, propertyB => valueB, etc...}
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub set {
|
||||
|
|
@ -1608,14 +1520,10 @@ sub set {
|
|||
See set. The only difference with set is that the cached version of the pagetree is not updated. This means that you must
|
||||
update it manually by invoking recachePageTree afterwards.
|
||||
|
||||
=over
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
The properties you want to set. This parameter is optional and should be a hashref of the form {propertyA => valueA, propertyB => valueB, etc...}
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setWithoutRecache {
|
||||
|
|
@ -1639,15 +1547,11 @@ Traverses the tree from this node down in pre-order fashion and excutes (maps) t
|
|||
onto each node. Also maps onto this node except if it is the anonymous root. This has some but very limited
|
||||
compatibility with the callback property of the walk_down method of Tree::DAG_Node.
|
||||
|
||||
=over
|
||||
|
||||
=item mappingFunction
|
||||
=head3 mappingFunction
|
||||
|
||||
This should be a coderef pointing to your mapping function. The arguments that are passed to this function are
|
||||
a page object and a hashref containing only _depth for now.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub traversePreOrder {
|
||||
|
|
|
|||
|
|
@ -64,14 +64,10 @@ These methods are available from this class:
|
|||
|
||||
Adds paginator template vars to a hash reference.
|
||||
|
||||
=over
|
||||
|
||||
=item hashRef
|
||||
=head3 hashRef
|
||||
|
||||
The hash reference to append the variables to.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub appendTemplateVars {
|
||||
|
|
@ -282,16 +278,12 @@ sub getNumberOfPages {
|
|||
|
||||
Returns the data from the page specified as a string.
|
||||
|
||||
NOTE: This is really only useful if you passed in an array reference of strings when you created this object.
|
||||
B<NOTE:> This is really only useful if you passed in an array reference of strings when you created this object.
|
||||
|
||||
=over
|
||||
|
||||
=item pageNumber
|
||||
=head3 pageNumber
|
||||
|
||||
Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getPage {
|
||||
|
|
@ -305,14 +297,10 @@ sub getPage {
|
|||
|
||||
Returns the data from the page specified as an array reference.
|
||||
|
||||
=over
|
||||
|
||||
=item pageNumber
|
||||
=head3 pageNumber
|
||||
|
||||
Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getPageData {
|
||||
|
|
@ -348,14 +336,10 @@ sub getPageNumber {
|
|||
|
||||
Returns links to all pages in this paginator.
|
||||
|
||||
=over
|
||||
|
||||
=item limit
|
||||
=head3 limit
|
||||
|
||||
An integer representing the maximum number of page links to return. Defaultly all page links will be returned.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getPageLinks {
|
||||
|
|
@ -429,26 +413,22 @@ sub getRowCount {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item currentURL
|
||||
=head3 currentURL
|
||||
|
||||
The URL of the current page including attributes. The page number will be appended to this in all links generated by the paginator.
|
||||
|
||||
=item paginateAfter
|
||||
=head3 paginateAfter
|
||||
|
||||
The number of rows to display per page. If left blank it defaults to 50.
|
||||
|
||||
=item pageNumber
|
||||
=head3 pageNumber
|
||||
|
||||
By default the page number will be determined by looking at $session{form}{pn}. If that is empty the page number will be defaulted to "1". If you'd like to override the page number specify it here.
|
||||
|
||||
=item formVar
|
||||
=head3 formVar
|
||||
|
||||
Specify the form variable the paginator should use in it's links. Defaults to "pn".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -466,14 +446,10 @@ sub new {
|
|||
|
||||
Provide the paginator with data by giving it an array reference.
|
||||
|
||||
=over
|
||||
|
||||
=item arrayRef
|
||||
=head3 arrayRef
|
||||
|
||||
The array reference that contains the data to be paginated.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setDataByArrayRef {
|
||||
|
|
@ -490,24 +466,20 @@ sub setDataByArrayRef {
|
|||
|
||||
Retrieves a data set from a database and replaces whatever data set was passed in through the constructor.
|
||||
|
||||
NOTE: This retrieves only the current page's data for efficiency.
|
||||
B<NOTE:> This retrieves only the current page's data for efficiency.
|
||||
|
||||
=over
|
||||
|
||||
=item query
|
||||
=head3 query
|
||||
|
||||
An SQL query that will retrieve a data set.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
A DBI-style database handler. Defaults to the WebGUI site handler.
|
||||
|
||||
=item unconditional
|
||||
=head3 unconditional
|
||||
|
||||
A boolean indicating that the query should be read unconditionally. Defaults to "0". If set to "1" and the unconditional read results in an error, the error will be returned by this method.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setDataByQuery {
|
||||
|
|
|
|||
|
|
@ -47,14 +47,10 @@ These functions/methods are available from this package:
|
|||
|
||||
Adds a wobjectId to the passive profile log.
|
||||
|
||||
=over
|
||||
|
||||
=item wobjectId
|
||||
=head3 wobjectId
|
||||
|
||||
The wobjectId to add.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub add {
|
||||
|
|
@ -77,14 +73,10 @@ sub add {
|
|||
Adds all wobjects on current page to the passive profile log.
|
||||
Optionally you can specify an alternate pageId.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
The pageId of the page you want to log.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub addPage {
|
||||
|
|
@ -104,14 +96,10 @@ sub addPage {
|
|||
Summarizes passive profile log data using the metadata attributes. An entry
|
||||
is logged in the passiveProfileAOI table.
|
||||
|
||||
=over
|
||||
|
||||
=item hashRef
|
||||
=head3 hashRef
|
||||
|
||||
A hashRef with userId and wobjectId.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub summarizeAOI {
|
||||
|
|
|
|||
|
|
@ -124,37 +124,29 @@ more of the following keys.
|
|||
}
|
||||
}
|
||||
|
||||
=over
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
This should be a hash reference keyed by the field names of the table that
|
||||
this class refers to (and should be able to be manipulated with this classes
|
||||
get() and set() methods). The values of the hash reference should be hash
|
||||
references containing settings for each field.
|
||||
|
||||
=over
|
||||
|
||||
=item * defaultValue
|
||||
=head3 * defaultValue
|
||||
|
||||
The default value for this field (optional).
|
||||
|
||||
=item * key
|
||||
=head3 * key
|
||||
|
||||
Should be true for the primary key column (one field must be set in this way).
|
||||
|
||||
=item * quote
|
||||
=head3 * quote
|
||||
|
||||
Should be true for fields that need to be quoted in database queries.
|
||||
|
||||
=back
|
||||
|
||||
=item table
|
||||
=head3 table
|
||||
|
||||
This must be set to the name of the table that this class represents.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub classSettings {
|
||||
|
|
@ -255,14 +247,10 @@ sub minimumFields {
|
|||
|
||||
=head2 multiDelete( -where => @whereClauses, %p )
|
||||
|
||||
=over
|
||||
|
||||
=item -where
|
||||
=head3 -where
|
||||
|
||||
See multiNew().
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub multiDelete {
|
||||
|
|
@ -290,9 +278,7 @@ Unrecognised parameters are combined to form the where clause:
|
|||
|
||||
Additional, more complicated parameters maybe passed using the -where option.
|
||||
|
||||
=over
|
||||
|
||||
=item -where
|
||||
=head3 -where
|
||||
|
||||
If provided -where must be an array reference, which is evaluated to generate
|
||||
an Sql where clause using the properties in classSettings. Any left over named
|
||||
|
|
@ -307,18 +293,16 @@ Evaluates to:
|
|||
|
||||
A in (1,2) AND (B = 3 OR C = 'hello') AND D = (B * 3)
|
||||
|
||||
=item -fields
|
||||
=head3 -fields
|
||||
|
||||
This maybe an array reference of fields to be selected from the database,
|
||||
otherwise, all fields in properties are selected unless the -minimumFields
|
||||
option is true.
|
||||
|
||||
=item -minimumFields
|
||||
=head3 -minimumFields
|
||||
|
||||
If true the minimum fields are selected from the database.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub multiNew {
|
||||
|
|
@ -347,33 +331,29 @@ sub multiNew {
|
|||
|
||||
=head2 new
|
||||
|
||||
=over
|
||||
|
||||
=item -properties
|
||||
=head3 -properties
|
||||
|
||||
If a hash reference of property names to values is provided to this method,
|
||||
then the database is not queried. This is mainly used for creating new rows
|
||||
by calling set afterwards (if not specified the value of the key column is
|
||||
set to 'new', so that when set() is called, and insert takes place).
|
||||
|
||||
=item -where
|
||||
=head3 -where
|
||||
|
||||
See multiNew().
|
||||
|
||||
=item -fields
|
||||
=head3 -fields
|
||||
|
||||
See multiNew().
|
||||
|
||||
=item -minimumFields
|
||||
=head3 -minimumFields
|
||||
|
||||
See multiNew().
|
||||
|
||||
=item -noSet
|
||||
=head3 -noSet
|
||||
|
||||
If true this stops the set() method from doing writing to the database.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
|
|||
|
|
@ -97,33 +97,25 @@ sub buildWhereElement {
|
|||
|
||||
=head2 new( %p )
|
||||
|
||||
=over
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
A hashref of field name to a hash reference of property settings.
|
||||
|
||||
Currently used settings are:
|
||||
|
||||
=over
|
||||
|
||||
=item * quote
|
||||
=head3 * quote
|
||||
|
||||
If true values for this field are automatically quoted.
|
||||
|
||||
=back
|
||||
|
||||
=item table
|
||||
=head3 table
|
||||
|
||||
The name of the table to query.
|
||||
|
||||
=item where
|
||||
=head3 where
|
||||
|
||||
A hash reference or array reference of arguments to build a where clause from.
|
||||
See parseWhereArgs for details.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -172,13 +164,11 @@ sub _parsePart {
|
|||
Recursivley parses a list of where arguments joining them with "AND" or "OR". Arguments
|
||||
may take a number of forms:
|
||||
|
||||
=over
|
||||
|
||||
=item * scalar
|
||||
=head3 * scalar
|
||||
|
||||
("A = 1") is left unchanged.
|
||||
|
||||
=item * array reference
|
||||
=head3 * array reference
|
||||
|
||||
An array reference causes the joining argument to switch from 'AND' to 'OR'
|
||||
(or visa-versa) for its contents:
|
||||
|
|
@ -189,7 +179,7 @@ becomes:
|
|||
|
||||
"(A = 1 OR C = 2)"
|
||||
|
||||
=item * hash reference
|
||||
=head3 * hash reference
|
||||
|
||||
These are a convienent way of being able to dynamically build up complex
|
||||
queries gradually.
|
||||
|
|
@ -200,8 +190,6 @@ becomes:
|
|||
|
||||
"A = 1 AND C = 2"
|
||||
|
||||
=back
|
||||
|
||||
This routine is flexiable enough to be able to parse arguments of the form:
|
||||
|
||||
({A => [1,2]},[{B => 3,C => 4}],{D => 5})
|
||||
|
|
|
|||
|
|
@ -63,33 +63,25 @@ sub buildQuery {
|
|||
|
||||
=head2 new( %p )
|
||||
|
||||
=over
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
A hashref of field name to a hash reference of property settings.
|
||||
|
||||
Currently used settings are:
|
||||
|
||||
=over
|
||||
|
||||
=item * quote
|
||||
=head3 * quote
|
||||
|
||||
If true values for this field are automatically quoted.
|
||||
|
||||
=back
|
||||
|
||||
=item table
|
||||
=head3 table
|
||||
|
||||
The name of the table to query.
|
||||
|
||||
=item where
|
||||
=head3 where
|
||||
|
||||
A hash reference or array reference of arguments to build a where clause from.
|
||||
See parseWhereArgs for details.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -81,28 +81,20 @@ sub buildQuery {
|
|||
|
||||
=head2 new( %p )
|
||||
|
||||
=over
|
||||
|
||||
=item data
|
||||
=head3 data
|
||||
|
||||
A hash reference of field name to value.
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
=over
|
||||
|
||||
=item * quote
|
||||
=head3 * quote
|
||||
|
||||
If true values for this field are automatically quoted.
|
||||
|
||||
=back
|
||||
|
||||
=item table
|
||||
=head3 table
|
||||
|
||||
The name of the table to query.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
|
|||
|
|
@ -119,39 +119,33 @@ sub buildSelectFields {
|
|||
|
||||
=head2 new( %p )
|
||||
|
||||
=over
|
||||
|
||||
=item fields
|
||||
=head3 fields
|
||||
|
||||
An array reference of field names (optional).
|
||||
|
||||
=item groupBy
|
||||
=head3 groupBy
|
||||
|
||||
An array reference of fields to group results by
|
||||
|
||||
=item limit
|
||||
=head3 limit
|
||||
|
||||
A scalar limit.
|
||||
|
||||
=item orderBy
|
||||
=head3 orderBy
|
||||
|
||||
An array reference of fields to order results by
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
=over
|
||||
|
||||
=item * quote
|
||||
=head3 * quote
|
||||
|
||||
If true values for this field are automatically quoted.
|
||||
|
||||
=back
|
||||
|
||||
=item table
|
||||
=head3 table
|
||||
|
||||
The name of the table to query.
|
||||
|
||||
=item where
|
||||
=head3 where
|
||||
|
||||
A hash reference or array reference of arguments to build a where clause from.
|
||||
See WebGUI::Persistent::Query::parseWhereArgs for details.
|
||||
|
|
|
|||
|
|
@ -81,31 +81,23 @@ sub buildSet {
|
|||
|
||||
=head2 new( %p )
|
||||
|
||||
=over
|
||||
|
||||
=item data
|
||||
=head3 data
|
||||
|
||||
A hash reference of field name to value.
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
=over
|
||||
|
||||
=item * quote
|
||||
=head3 * quote
|
||||
|
||||
If true values for this field are automatically quoted.
|
||||
|
||||
=back
|
||||
=head3 table
|
||||
|
||||
=item table
|
||||
|
||||
=item where
|
||||
=head3 where
|
||||
|
||||
A hash reference or array reference of arguments to build a where clause from.
|
||||
See WebGUI::Persistent::Query::parseWhereArgs for details.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
|
|||
|
|
@ -148,38 +148,30 @@ sub canUp { $_[0]->left_sister }
|
|||
This class method must be overridden to return a hash reference with one or
|
||||
more of the following keys.
|
||||
|
||||
=over
|
||||
|
||||
=item useDummyRoot
|
||||
=head3 useDummyRoot
|
||||
|
||||
This should be set to true for classes that don't store their root node in
|
||||
the database.
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
This should be a hash reference keyed by the field names of the table that
|
||||
this class refers to (and should be able to be manipulated with this classes
|
||||
get() and set() methods). The values of the hash reference should be hash
|
||||
references containing settings for each field.
|
||||
|
||||
=over
|
||||
|
||||
=item * defaultValue
|
||||
=head3 * defaultValue
|
||||
|
||||
The default value for this field (optional).
|
||||
|
||||
=item * key
|
||||
=head3 * key
|
||||
|
||||
Should be true for the primary key column (one field must be set in this way).
|
||||
|
||||
=item * quote
|
||||
=head3 * quote
|
||||
|
||||
Should be true for fields that need to be quoted in database queries.
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -103,14 +103,10 @@ sub array {
|
|||
|
||||
Starts a transaction sequence. To be used with commit and rollback. Any writes after this point will not be applied to the database until commit is called.
|
||||
|
||||
=over
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
A database handler. Defaults to the WebGUI default database handler.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub beginTransaction {
|
||||
|
|
@ -126,18 +122,14 @@ sub beginTransaction {
|
|||
|
||||
Builds an array of data from a series of rows.
|
||||
|
||||
=over
|
||||
|
||||
=item sql
|
||||
=head3 sql
|
||||
|
||||
An SQL query. The query must select only one column of data.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub buildArray {
|
||||
|
|
@ -158,18 +150,14 @@ sub buildArray {
|
|||
|
||||
Builds an array reference of data from a series of rows.
|
||||
|
||||
=over
|
||||
|
||||
=item sql
|
||||
=head3 sql
|
||||
|
||||
An SQL query. The query must select only one column of data.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub buildArrayRef {
|
||||
|
|
@ -183,18 +171,14 @@ sub buildArrayRef {
|
|||
|
||||
Builds a hash of data from a series of rows.
|
||||
|
||||
=over
|
||||
|
||||
=item sql
|
||||
=head3 sql
|
||||
|
||||
An SQL query. The query must select at least two columns of data, the first being the key for the hash, the second being the value. If the query selects more than two columns, then the last column will be the value and the remaining columns will be joined together by an underscore "_" to form a complex key.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub buildHash {
|
||||
|
|
@ -217,18 +201,14 @@ sub buildHash {
|
|||
|
||||
Builds a hash reference of data from a series of rows.
|
||||
|
||||
=over
|
||||
|
||||
=item sql
|
||||
=head3 sql
|
||||
|
||||
An SQL query. The query must select at least two columns of data, the first being the key for the hash, the second being the value. If the query selects more than two columns, then the last column will be the value and the remaining columns will be joined together by an underscore "_" to form a complex key.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub buildHashRef {
|
||||
|
|
@ -245,14 +225,10 @@ sub buildHashRef {
|
|||
|
||||
Ends a transaction sequence. To be used with beginTransaction. Applies all of the writes since beginTransaction to the database.
|
||||
|
||||
=over
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
A database handler. Defaults to the WebGUI default database handler.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub commit {
|
||||
|
|
@ -294,14 +270,10 @@ sub errorMessage {
|
|||
|
||||
Executes a prepared SQL statement.
|
||||
|
||||
=over
|
||||
|
||||
=item values
|
||||
=head3 values
|
||||
|
||||
A list of values to be used in the placeholders defined in the prepared statement.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub execute {
|
||||
|
|
@ -344,16 +316,12 @@ sub getColumnNames {
|
|||
|
||||
Increments an incrementer of the specified type and returns the value.
|
||||
|
||||
NOTE: This is not a regular method, but is an exported subroutine.
|
||||
B<NOTE:> This is not a regular method, but is an exported subroutine.
|
||||
|
||||
=over
|
||||
|
||||
=item idName
|
||||
=head3 idName
|
||||
|
||||
Specify the name of one of the incrementers in the incrementer table.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getNextId {
|
||||
|
|
@ -369,26 +337,22 @@ sub getNextId {
|
|||
|
||||
Returns a row of data as a hash reference from the specified table.
|
||||
|
||||
=over
|
||||
|
||||
=item table
|
||||
=head3 table
|
||||
|
||||
The name of the table to retrieve the row of data from.
|
||||
|
||||
=item key
|
||||
=head3 key
|
||||
|
||||
The name of the column to use as the retrieve key. Should be a primary or unique key in the table.
|
||||
|
||||
=item keyValue
|
||||
=head3 keyValue
|
||||
|
||||
The value to search for in the key column.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
A database handler to use. Defaults to the WebGUI database handler.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getRow {
|
||||
|
|
@ -462,18 +426,14 @@ sub hashRef {
|
|||
|
||||
Returns a statement handler. To be used in creating prepared statements. Use with the execute method.
|
||||
|
||||
=over
|
||||
|
||||
=item sql
|
||||
=head3 sql
|
||||
|
||||
An SQL statement. Can use the "?" placeholder for maximum performance on multiple statements with the execute method.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
A database handler. Defaults to the WebGUI default database handler.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub prepare {
|
||||
|
|
@ -495,18 +455,14 @@ sub prepare {
|
|||
|
||||
Executes a query and returns a single row of data as an array.
|
||||
|
||||
=over
|
||||
|
||||
=item sql
|
||||
=head3 sql
|
||||
|
||||
An SQL query.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub quickArray {
|
||||
|
|
@ -524,18 +480,14 @@ sub quickArray {
|
|||
|
||||
Executes a query and returns a comma delimited text blob with column headers.
|
||||
|
||||
=over
|
||||
|
||||
=item sql
|
||||
=head3 sql
|
||||
|
||||
An SQL query.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub quickCSV {
|
||||
|
|
@ -557,18 +509,14 @@ sub quickCSV {
|
|||
|
||||
Executes a query and returns a single row of data as a hash.
|
||||
|
||||
=over
|
||||
|
||||
=item sql
|
||||
=head3 sql
|
||||
|
||||
An SQL query.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub quickHash {
|
||||
|
|
@ -589,18 +537,14 @@ sub quickHash {
|
|||
|
||||
Executes a query and returns a single row of data as a hash reference.
|
||||
|
||||
=over
|
||||
|
||||
=item sql
|
||||
=head3 sql
|
||||
|
||||
An SQL query.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub quickHashRef {
|
||||
|
|
@ -623,18 +567,14 @@ sub quickHashRef {
|
|||
|
||||
Executes a query and returns a tab delimited text blob with column headers.
|
||||
|
||||
=over
|
||||
|
||||
=item sql
|
||||
=head3 sql
|
||||
|
||||
An SQL query.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub quickTab {
|
||||
|
|
@ -655,20 +595,16 @@ sub quickTab {
|
|||
|
||||
Returns a string quoted and ready for insert into the database.
|
||||
|
||||
NOTE: This is not a regular method, but is an exported subroutine.
|
||||
B<NOTE:> This is not a regular method, but is an exported subroutine.
|
||||
|
||||
=over
|
||||
|
||||
=item string
|
||||
=head3 string
|
||||
|
||||
Any scalar variable that needs to be escaped to be inserted into the database.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
The database handler. Defaults to the WebGUI database handler.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub quote {
|
||||
|
|
@ -683,20 +619,16 @@ sub quote {
|
|||
|
||||
Returns a comma seperated string quoted and ready for insert/select into/from the database. This is typically used for a statement like "select * from someTable where field in (".quoteAndJoin(\@strings).")".
|
||||
|
||||
NOTE: This is not a regular method, but is an exported subroutine.
|
||||
B<NOTE:> This is not a regular method, but is an exported subroutine.
|
||||
|
||||
=over
|
||||
|
||||
=item arrayRef
|
||||
=head3 arrayRef
|
||||
|
||||
An array reference containing strings to be quoted.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
The database handler. Defaults to the WebGUI database handler.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub quoteAndJoin {
|
||||
|
|
@ -716,18 +648,14 @@ sub quoteAndJoin {
|
|||
|
||||
Returns a statement handler. This is a utility method that runs both a prepare and execute all in one.
|
||||
|
||||
=over
|
||||
|
||||
=item sql
|
||||
=head3 sql
|
||||
|
||||
An SQL query.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub read {
|
||||
|
|
@ -746,14 +674,10 @@ sub read {
|
|||
|
||||
Ends a transaction sequence. To be used with beginTransaction. Cancels all of the writes since beginTransaction.
|
||||
|
||||
=over
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
A database handler. Defaults to the WebGUI default database handler.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub rollback {
|
||||
|
|
@ -782,26 +706,22 @@ sub rows {
|
|||
|
||||
Inserts/updates a row of data into the database. Returns the value of the key.
|
||||
|
||||
=over
|
||||
|
||||
=item table
|
||||
=head3 table
|
||||
|
||||
The name of the table to use.
|
||||
|
||||
=item key
|
||||
=head3 key
|
||||
|
||||
The name of the primary key of the table.
|
||||
|
||||
=item data
|
||||
=head3 data
|
||||
|
||||
A hash reference containing column names and values to be set.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
A database handler to use. Defaults to the WebGUI database handler.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setRow {
|
||||
|
|
@ -829,18 +749,14 @@ sub setRow {
|
|||
|
||||
An alias of the "read" method except that it will not cause a fatal error in WebGUI if the query is invalid. This is useful for user generated queries such as those in the SQL Report. Returns a statement handler.
|
||||
|
||||
=over
|
||||
|
||||
=item sql
|
||||
=head3 sql
|
||||
|
||||
An SQL query.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub unconditionalRead {
|
||||
|
|
@ -864,18 +780,14 @@ sub unconditionalRead {
|
|||
|
||||
A method specifically designed for writing to the database in an efficient manner.
|
||||
|
||||
=over
|
||||
|
||||
=item sql
|
||||
=head3 sql
|
||||
|
||||
An SQL insert or update.
|
||||
|
||||
=item dbh
|
||||
=head3 dbh
|
||||
|
||||
By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub write {
|
||||
|
|
|
|||
|
|
@ -50,30 +50,26 @@ These methods are available from this package:
|
|||
|
||||
Generates and returns the constraints to an SQL where clause based upon input from the user.
|
||||
|
||||
=over
|
||||
|
||||
=item fieldList
|
||||
=head3 fieldList
|
||||
|
||||
An array reference that contains a list of the fields (table columns) to be considered when searching.
|
||||
|
||||
=item all
|
||||
=head3 all
|
||||
|
||||
A form param with a comma or space separated list of key words to search for in the fields of the fieldList. All the words listed here must be found to be true.
|
||||
|
||||
=item atLeastOne
|
||||
=head3 atLeastOne
|
||||
|
||||
A form param with a comma or space separated list of key words to search for in the fields of the fieldList. Any of the words may match in any of the fields for this to be true.
|
||||
|
||||
=item exactPhrase
|
||||
=head3 exactPhrase
|
||||
|
||||
A form param with a phrase to search for in the fields of the fieldList. The exact phrase must be found in one of the fields to be true.
|
||||
|
||||
=item without
|
||||
=head3 without
|
||||
|
||||
A form param with a comma or space separated list of key words to search for in the fields of the fieldList. None of the words may be found in any of the fields for this to be true.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub buildConstraints {
|
||||
|
|
@ -138,18 +134,14 @@ sub buildConstraints {
|
|||
|
||||
Generates and returns the advanced search form.
|
||||
|
||||
=over
|
||||
|
||||
=item hiddenFields
|
||||
=head3 hiddenFields
|
||||
|
||||
A hash reference that contains any name/value pairs that should be included as hidden fields in the search form.
|
||||
|
||||
=item numResults
|
||||
=head3 numResults
|
||||
|
||||
A form param that can optionally specify the number of results to display. Defaults to 25.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub form {
|
||||
|
|
@ -202,14 +194,10 @@ sub form {
|
|||
Returns a URL that toggles the value "search" in the user's scratch
|
||||
variables on and off.
|
||||
|
||||
=over
|
||||
|
||||
=item pairs
|
||||
=head3 pairs
|
||||
|
||||
URL name value pairs (this=that&foo=bar) to be passed with this toggle.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub toggleURL {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ Package WebGUI::Session
|
|||
|
||||
This package is the heart and lifeblood of WebGUI. Without it WebGUI could not exist. By using this package a package gains access to WebGUI's $session variable which contains everything WebGUI needs to know to operate.
|
||||
|
||||
NOTE: It is important to distinguish the difference between a WebGUI session and a user session. A user session is attached to a WebGUI session. A WebGUI session is all of the basic data the WebGUI needs to operate.
|
||||
B<NOTE:> It is important to distinguish the difference between a WebGUI session and a user session. A user session is attached to a WebGUI session. A WebGUI session is all of the basic data the WebGUI needs to operate.
|
||||
|
||||
TIP: The $session variable is a case-insensitive hash. The contents of the has vary, but can be seen by adding debug=1 to the end of any WebGUI URL while logged in as an admin user.
|
||||
|
||||
|
|
@ -163,18 +163,14 @@ sub close {
|
|||
|
||||
Converts a visitor session to a user session.
|
||||
|
||||
=over
|
||||
|
||||
=item sessionId
|
||||
=head3 sessionId
|
||||
|
||||
The session to convert.
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The user for the session to become.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub convertVisitorToUser {
|
||||
|
|
@ -194,14 +190,10 @@ sub convertVisitorToUser {
|
|||
|
||||
Deletes a scratch variable for all users. This function must be used with care.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the scratch variable.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub deleteAllScratch {
|
||||
|
|
@ -217,14 +209,10 @@ sub deleteAllScratch {
|
|||
|
||||
Deletes a scratch variable.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the scratch variable.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub deleteScratch {
|
||||
|
|
@ -240,14 +228,10 @@ sub deleteScratch {
|
|||
|
||||
Removes the specified user session from memory and database.
|
||||
|
||||
=over
|
||||
|
||||
=item sessionId
|
||||
=head3 sessionId
|
||||
|
||||
The session to end.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub end {
|
||||
|
|
@ -268,14 +252,10 @@ sub end {
|
|||
|
||||
Retrieves the current value of a scratch variable.
|
||||
|
||||
=over
|
||||
|
||||
=item varName
|
||||
=head3 varName
|
||||
|
||||
The name of the variable set with setScratch().
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getScratch {
|
||||
|
|
@ -289,22 +269,18 @@ sub getScratch {
|
|||
|
||||
Opens a closed ( or new ) WebGUI session.
|
||||
|
||||
=over
|
||||
|
||||
=item webguiRoot
|
||||
=head3 webguiRoot
|
||||
|
||||
The path to the WebGUI files.
|
||||
|
||||
=item configFile
|
||||
=head3 configFile
|
||||
|
||||
The filename of the config file that WebGUI should operate from.
|
||||
|
||||
=item fastcgi
|
||||
=head3 fastcgi
|
||||
|
||||
A pointer to a Fast CGI object.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub open {
|
||||
|
|
@ -385,14 +361,10 @@ sub open {
|
|||
|
||||
Updates the WebGUI session to reflect new page information.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
Specify which page you want to change to.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub refreshPageInfo {
|
||||
|
|
@ -406,16 +378,12 @@ sub refreshPageInfo {
|
|||
|
||||
Updates the user session variables from the database.
|
||||
|
||||
NOTE: This also updates the user information.
|
||||
B<NOTE:> This also updates the user information.
|
||||
|
||||
=over
|
||||
|
||||
=item sessionId
|
||||
=head3 sessionId
|
||||
|
||||
The session id to update.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub refreshSessionVars {
|
||||
|
|
@ -429,14 +397,10 @@ sub refreshSessionVars {
|
|||
|
||||
Refreshes the user's information from the database into this user session.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The user id to refresh into this session.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub refreshUserInfo {
|
||||
|
|
@ -451,18 +415,14 @@ sub refreshUserInfo {
|
|||
|
||||
Sets a scratch variable for this user session. Scratch variables are just arbitrary bits of data that a programmer may wish to store in a user session from page to page.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the scratch variable.
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
The value of the scratch variable. If the value is blank but defined or if it is set to "-delete-" then the scratch variable will be removed from the user session.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setScratch {
|
||||
|
|
@ -487,18 +447,14 @@ sub setScratch {
|
|||
|
||||
Start a new user session.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The user id of the user to create a session for.
|
||||
|
||||
=item sessionId
|
||||
=head3 sessionId
|
||||
|
||||
Session id will be generated if not specified. In almost every case you should let the system generate the session id.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub start {
|
||||
|
|
|
|||
|
|
@ -94,14 +94,10 @@ sub generateAdditionalHeadTags {
|
|||
|
||||
Retrieves the template for this style.
|
||||
|
||||
=over
|
||||
|
||||
=item templateId
|
||||
=head3 templateId
|
||||
|
||||
The unique identifier for the template to retrieve. Defaults to the style template tied to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getTemplate {
|
||||
|
|
@ -116,18 +112,14 @@ sub getTemplate {
|
|||
|
||||
Returns a parsed style with content based upon the current WebGUI session information.
|
||||
|
||||
=over
|
||||
|
||||
=item content
|
||||
=head3 content
|
||||
|
||||
The content to be parsed into the style. Usually generated by WebGUI::Page::generate().
|
||||
|
||||
=item templateId
|
||||
=head3 templateId
|
||||
|
||||
The unique identifier for the template to retrieve. Defaults to the style template tied to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub process {
|
||||
|
|
@ -184,18 +176,14 @@ sub process {
|
|||
|
||||
Sets a <link> tag into the <head> of this rendered page for this page view. This is typically used for dynamically adding references to CSS and RSS documents.
|
||||
|
||||
=over
|
||||
|
||||
=item url
|
||||
=head3 url
|
||||
|
||||
The URL to the document you are linking.
|
||||
|
||||
=item params
|
||||
=head3 params
|
||||
|
||||
A hash reference containing the other parameters to be included in the link tag, such as "rel" and "type".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setLink {
|
||||
|
|
@ -212,14 +200,10 @@ sub setLink {
|
|||
|
||||
Sets a <meta> tag into the <head> of this rendered page for this page view.
|
||||
|
||||
=over
|
||||
|
||||
=item params
|
||||
=head3 params
|
||||
|
||||
A hash reference containing the parameters of the meta tag.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setMeta {
|
||||
|
|
@ -235,14 +219,10 @@ sub setMeta {
|
|||
|
||||
Sets data to be output into the <head> of the current rendered page for this page view.
|
||||
|
||||
=over
|
||||
|
||||
=item tags
|
||||
=head3 tags
|
||||
|
||||
A raw string containing tags. This is just a raw string so you must actually pass in the full tag to use this call.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setRawHeadTags {
|
||||
|
|
@ -257,18 +237,14 @@ sub setRawHeadTags {
|
|||
|
||||
Sets a <script> tag into the <head> of this rendered page for this page view. This is typically used for dynamically adding references to Javascript or ECMA script.
|
||||
|
||||
=over
|
||||
|
||||
=item url
|
||||
=head3 url
|
||||
|
||||
The URL to your script.
|
||||
|
||||
=item params
|
||||
=head3 params
|
||||
|
||||
A hash reference containing the additional parameters to include in the script tag, such as "type" and "language".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setScript {
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ These methods are available from this class:
|
|||
|
||||
Replaces the default form header with a new definition.
|
||||
|
||||
NOTE: This uses the same syntax of the WebGUI::Form::formHeader() method.
|
||||
B<NOTE:> This uses the same syntax of the WebGUI::Form::formHeader() method.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -92,14 +92,10 @@ sub formHeader {
|
|||
|
||||
Returns a WebGUI::HTMLForm object based upon a tab name created in the constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item tabName
|
||||
=head3 tabName
|
||||
|
||||
The name of the tab to return the form object for.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getTab {
|
||||
|
|
@ -113,7 +109,7 @@ sub getTab {
|
|||
|
||||
Adds a hidden field to the form.
|
||||
|
||||
NOTE: This uses the same syntax of the WebGUI::Form::hidden() method.
|
||||
B<NOTE:> This uses the same syntax of the WebGUI::Form::hidden() method.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -128,9 +124,7 @@ sub hidden {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item tabHashRef
|
||||
=head3 tabHashRef
|
||||
|
||||
A hash reference containing the definition of the tabs. It should be constructed like this:
|
||||
|
||||
|
|
@ -148,14 +142,12 @@ A hash reference containing the definition of the tabs. It should be constructed
|
|||
}
|
||||
);
|
||||
|
||||
=item cssString
|
||||
=head3 cssString
|
||||
|
||||
A string containing the link to the tab-CascadingStyleSheet
|
||||
|
||||
default = extrasPath.'/tabs/tabs.css'
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -213,7 +205,7 @@ sub print {
|
|||
|
||||
Replaces the default submit button with a new definition.
|
||||
|
||||
NOTE: This uses the same syntax of the WebGUI::Form::submit() method.
|
||||
B<NOTE:> This uses the same syntax of the WebGUI::Form::submit() method.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
|
|||
|
|
@ -93,18 +93,14 @@ sub _execute {
|
|||
|
||||
Returns a hash reference containing all of the template parameters.
|
||||
|
||||
=over
|
||||
|
||||
=item templateId
|
||||
=head3 templateId
|
||||
|
||||
Defaults to "1". Specify the templateId of the template to retrieve.
|
||||
|
||||
=item namespace
|
||||
=head3 namespace
|
||||
|
||||
Defaults to "page". Specify the namespace of the template to retrieve.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub get {
|
||||
|
|
@ -120,14 +116,10 @@ sub get {
|
|||
|
||||
Returns a hash reference containing template ids and template names of all the templates in the specified namespace.
|
||||
|
||||
=over
|
||||
|
||||
=item namespace
|
||||
=head3 namespace
|
||||
|
||||
Defaults to "page". Specify the namespace to build the list for.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getList {
|
||||
|
|
@ -142,18 +134,14 @@ sub getList {
|
|||
|
||||
Returns a template ID by looking up the name for it.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name to look up.
|
||||
|
||||
=item namespace
|
||||
=head3 namespace
|
||||
|
||||
The namespace to focus on when searching.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getIdByName {
|
||||
|
|
@ -171,22 +159,18 @@ sub getIdByName {
|
|||
|
||||
Evaluate a template replacing template commands for HTML.
|
||||
|
||||
=over
|
||||
|
||||
=item templateId
|
||||
=head3 templateId
|
||||
|
||||
Defaults to "1". Specify the templateId of the template to retrieve.
|
||||
|
||||
=item namespace
|
||||
=head3 namespace
|
||||
|
||||
Defaults to "page". Specify the namespace of the template to retrieve.
|
||||
|
||||
=item vars
|
||||
=head3 vars
|
||||
|
||||
A hash reference containing template variables and loops. Automatically includes the entire WebGUI session.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub process {
|
||||
|
|
@ -247,18 +231,14 @@ sub process {
|
|||
|
||||
Evaluate a template replacing template commands for HTML.
|
||||
|
||||
=over
|
||||
|
||||
=item template
|
||||
=head3 template
|
||||
|
||||
A scalar variable containing the template.
|
||||
|
||||
=item vars
|
||||
=head3 vars
|
||||
|
||||
A hash reference containing template variables and loops. Automatically includes the entire WebGUI session.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub processRaw {
|
||||
|
|
@ -280,9 +260,7 @@ sub processRaw {
|
|||
|
||||
Store a template and it's metadata.
|
||||
|
||||
=over
|
||||
|
||||
=item data
|
||||
=head3 data
|
||||
|
||||
A hash reference containing the data to be stored. At minimum the hash reference must include "templateId" and "namespace". The following are the elements allowed to be stored.
|
||||
|
||||
|
|
@ -298,8 +276,6 @@ A hash reference containing the data to be stored. At minimum the hash reference
|
|||
|
||||
isEditable - A boolean indicating whether this template should be editable through the template manager.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub set {
|
||||
|
|
|
|||
|
|
@ -58,20 +58,16 @@ These subroutines are available from this package:
|
|||
|
||||
Returns a URL after adding some information to the end of it.
|
||||
|
||||
=over
|
||||
|
||||
=item url
|
||||
=head3 url
|
||||
|
||||
The URL to append information to.
|
||||
|
||||
=item pairs
|
||||
=head3 pairs
|
||||
|
||||
Name value pairs to add to the URL in the form of:
|
||||
|
||||
name1=value1&name2=value2&name3=value3
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub append {
|
||||
|
|
@ -91,16 +87,12 @@ sub append {
|
|||
|
||||
Encodes a string to make it safe to pass in a URL.
|
||||
|
||||
NOTE: See WebGUI::URL::unescape()
|
||||
B<NOTE:> See WebGUI::URL::unescape()
|
||||
|
||||
=over
|
||||
|
||||
=item string
|
||||
=head3 string
|
||||
|
||||
The string to escape.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub escape {
|
||||
|
|
@ -114,20 +106,16 @@ sub escape {
|
|||
|
||||
Generate a URL based on WebGUI's gateway script.
|
||||
|
||||
=over
|
||||
|
||||
=item pageURL
|
||||
=head3 pageURL
|
||||
|
||||
The urlized title of a page that you wish to create a URL for.
|
||||
|
||||
=item pairs
|
||||
=head3 pairs
|
||||
|
||||
Name value pairs to add to the URL in the form of:
|
||||
|
||||
name1=value1&name2=value2&name3=value3
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub gateway {
|
||||
|
|
@ -147,18 +135,14 @@ sub gateway {
|
|||
|
||||
Returns an absolute url.
|
||||
|
||||
=over
|
||||
|
||||
=item url
|
||||
=head3 url
|
||||
|
||||
The url to make absolute.
|
||||
|
||||
=item baseURL
|
||||
=head3 baseURL
|
||||
|
||||
The base URL to use. This defaults to current page url.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub makeAbsolute {
|
||||
|
|
@ -223,14 +207,10 @@ sub getSiteURL {
|
|||
|
||||
Returns a string that has made into a WebGUI compliant URL.
|
||||
|
||||
=over
|
||||
|
||||
=item string
|
||||
=head3 string
|
||||
|
||||
The string to make compliant. This is usually a page title or a filename.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub makeCompliant {
|
||||
|
|
@ -253,16 +233,12 @@ sub makeCompliant {
|
|||
|
||||
Returns the URL of the current page.
|
||||
|
||||
=over
|
||||
|
||||
=item pairs
|
||||
=head3 pairs
|
||||
|
||||
Name value pairs to add to the URL in the form of:
|
||||
|
||||
name1=value1&name2=value2&name3=value3
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub page {
|
||||
|
|
@ -282,16 +258,12 @@ sub page {
|
|||
|
||||
Decodes a string that was URL encoded.
|
||||
|
||||
NOTE: See WebGUI::URL::escape()
|
||||
B<NOTE:> See WebGUI::URL::escape()
|
||||
|
||||
=over
|
||||
|
||||
=item string
|
||||
=head3 string
|
||||
|
||||
The string to unescape.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub unescape {
|
||||
|
|
@ -304,14 +276,10 @@ sub unescape {
|
|||
|
||||
Returns a url that is safe for WebGUI pages.
|
||||
|
||||
=over
|
||||
|
||||
=item string
|
||||
=head3 string
|
||||
|
||||
The string to urlize.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub urlize {
|
||||
|
|
|
|||
|
|
@ -72,18 +72,14 @@ sub _create {
|
|||
|
||||
Adds this user to the specified groups.
|
||||
|
||||
=over
|
||||
|
||||
=item groups
|
||||
=head3 groups
|
||||
|
||||
An array reference containing a list of groups.
|
||||
|
||||
=item expireOffset
|
||||
=head3 expireOffset
|
||||
|
||||
An override for the default offset of the grouping. Specified in seconds.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub addToGroups {
|
||||
|
|
@ -96,14 +92,10 @@ sub addToGroups {
|
|||
|
||||
Returns the authentication method for this user.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, the authMethod is set to this value. The only valid values are "WebGUI" and "LDAP". When a new account is created, authMethod is defaulted to "WebGUI".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub authMethod {
|
||||
|
|
@ -160,14 +152,10 @@ sub delete {
|
|||
|
||||
Deletes this user from the specified groups.
|
||||
|
||||
=over
|
||||
|
||||
=item groups
|
||||
=head3 groups
|
||||
|
||||
An array reference containing a list of groups.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub deleteFromGroups {
|
||||
|
|
@ -194,22 +182,18 @@ sub identifier {
|
|||
|
||||
Returns the current level of karma this user has earned.
|
||||
|
||||
=over
|
||||
|
||||
=item amount
|
||||
=head3 amount
|
||||
|
||||
An integer to modify this user's karma by. Note that this number can be positive or negative.
|
||||
|
||||
=item source
|
||||
=head3 source
|
||||
|
||||
A descriptive source for this karma. Typically it would be something like "MessageBoard (49)" or "Admin (3)". Source is used to track where a karma modification came from.
|
||||
|
||||
=item description
|
||||
=head3 description
|
||||
|
||||
A description of why this user's karma was modified. For instance it could be "Message Board Post" or "He was a good boy!".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub karma {
|
||||
|
|
@ -238,14 +222,10 @@ sub lastUpdated {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item userId
|
||||
=head3 userId
|
||||
|
||||
The userId of the user you're creating an object reference for. If left blank it will default to "1" (Visitor). If specified as "new" then a new user account will be created and assigned the next available userId.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -278,18 +258,14 @@ sub new {
|
|||
|
||||
Returns a profile field's value. If "value" is specified, it also sets the field to that value.
|
||||
|
||||
=over
|
||||
|
||||
=item fieldName
|
||||
=head3 fieldName
|
||||
|
||||
The profile field name such as "language" or "email" or "cellPhone".
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
The value to set the profile field name to.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub profileField {
|
||||
|
|
@ -313,14 +289,10 @@ sub profileField {
|
|||
|
||||
Returns the unique identifier of the affiliate that referred this user to the site.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
An integer containing the unique identifier of the affiliate.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub referringAffiliate {
|
||||
|
|
@ -341,14 +313,10 @@ sub referringAffiliate {
|
|||
|
||||
Returns the status of the user.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, the status is set to this value. Possible values are 'Active', 'Selfdestructed' and 'Deactivated'.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub status {
|
||||
|
|
@ -369,14 +337,10 @@ sub status {
|
|||
|
||||
Returns the username.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
If specified, the username is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub username {
|
||||
|
|
|
|||
|
|
@ -61,14 +61,10 @@ These subroutines are available from this package:
|
|||
|
||||
Returns a number with commas applied at each third character.
|
||||
|
||||
=over
|
||||
|
||||
=item integer
|
||||
=head3 integer
|
||||
|
||||
Any old number will do.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub commify {
|
||||
|
|
@ -83,18 +79,14 @@ sub commify {
|
|||
|
||||
Returns a boolean value as to whether the value is in the array.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
=head3 value
|
||||
|
||||
The value to check for.
|
||||
|
||||
=item list
|
||||
=head3 list
|
||||
|
||||
An array to look for the value in.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub isIn {
|
||||
|
|
@ -109,14 +101,10 @@ sub isIn {
|
|||
|
||||
Searches through an array looking for commas and replaces them with semi-colons. Also replaces carriage returns with spaces. This is useful for exporting comma separated data.
|
||||
|
||||
=over
|
||||
|
||||
=item array
|
||||
=head3 array
|
||||
|
||||
A reference to the array to look through.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub makeArrayCommaSafe {
|
||||
|
|
@ -130,14 +118,10 @@ sub makeArrayCommaSafe {
|
|||
|
||||
Searches through an array looking for tabs and replaces them with four spaces. Also replaces carriage returns with a space. This is useful for exporting tab separated data.
|
||||
|
||||
=over
|
||||
|
||||
=item array
|
||||
=head3 array
|
||||
|
||||
A reference to the array to look through.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub makeArrayTabSafe {
|
||||
|
|
@ -151,14 +135,10 @@ sub makeArrayTabSafe {
|
|||
|
||||
Replaces commas with semi-colons and carriage returns with spaces.
|
||||
|
||||
=over
|
||||
|
||||
=item text
|
||||
=head3 text
|
||||
|
||||
The text to search through.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub makeCommaSafe {
|
||||
|
|
@ -173,14 +153,10 @@ sub makeCommaSafe {
|
|||
|
||||
Replaces tabs with four spaces and carriage returns with a space each.
|
||||
|
||||
=over
|
||||
|
||||
=item text
|
||||
=head3 text
|
||||
|
||||
The text to search through.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub makeTabSafe {
|
||||
|
|
@ -196,18 +172,14 @@ sub makeTabSafe {
|
|||
|
||||
Returns an integer between the low and high number.
|
||||
|
||||
=over
|
||||
|
||||
=item low
|
||||
=head3 low
|
||||
|
||||
The lowest possible value. Defaults to 0.
|
||||
|
||||
=item high
|
||||
=head3 high
|
||||
|
||||
The highest possible value. Defaults to 1.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub randint {
|
||||
|
|
@ -224,14 +196,10 @@ sub randint {
|
|||
|
||||
Resorts an array in random order.
|
||||
|
||||
=over
|
||||
|
||||
=item array
|
||||
=head3 array
|
||||
|
||||
A reference to the array to randomize.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub randomizeArray {
|
||||
|
|
@ -251,14 +219,10 @@ sub randomizeArray {
|
|||
|
||||
Resorts a hash tied to IxHash in random order. Returns a hash reference.
|
||||
|
||||
=over
|
||||
|
||||
=item hashRef
|
||||
=head3 hashRef
|
||||
|
||||
A reference hash to randomize.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub randomizeHash {
|
||||
|
|
@ -278,19 +242,15 @@ sub randomizeHash {
|
|||
|
||||
Returns an integer after rounding a floating point number.
|
||||
|
||||
=over
|
||||
|
||||
=item float
|
||||
=head3 float
|
||||
|
||||
Any floating point number.
|
||||
|
||||
=item significantDigits
|
||||
=head3 significantDigits
|
||||
|
||||
The number of digits to leave after the decimal point. Defaults to 0.
|
||||
|
||||
NOTE: If you set this higher than 0 then you'll get back another floating point number rather than an integer.
|
||||
|
||||
=back
|
||||
B<NOTE:> If you set this higher than 0 then you'll get back another floating point number rather than an integer.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -305,14 +265,10 @@ sub round {
|
|||
|
||||
Sorts a hash by its values. Returns a hash.
|
||||
|
||||
=over
|
||||
|
||||
=item hash
|
||||
=head3 hash
|
||||
|
||||
A hash to be sorted.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub sortHash {
|
||||
|
|
@ -330,14 +286,10 @@ sub sortHash {
|
|||
|
||||
Sorts a hash in decending order by its values. Returns a hash.
|
||||
|
||||
=over
|
||||
|
||||
=item hash
|
||||
=head3 hash
|
||||
|
||||
A hash to be sorted.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -122,26 +122,22 @@ sub canView {
|
|||
|
||||
=head2 confirm ( message, yesURL, [ , noURL, vitalComparison ] )
|
||||
|
||||
=over
|
||||
|
||||
=item message
|
||||
=head3 message
|
||||
|
||||
A string containing the message to prompt the user for this action.
|
||||
|
||||
=item yesURL
|
||||
=head3 yesURL
|
||||
|
||||
A URL to the web method to execute if the user confirms the action.
|
||||
|
||||
=item noURL
|
||||
=head3 noURL
|
||||
|
||||
A URL to the web method to execute if the user denies the action. Defaults back to the current page.
|
||||
|
||||
=item vitalComparison
|
||||
=head3 vitalComparison
|
||||
|
||||
A comparison expression to be used when checking whether the action should be allowed to continue. Typically this is used when the action is a delete of some sort.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub confirm {
|
||||
|
|
@ -161,22 +157,18 @@ sub confirm {
|
|||
|
||||
Deletes a row of collateral data.
|
||||
|
||||
=over
|
||||
|
||||
=item tableName
|
||||
=head3 tableName
|
||||
|
||||
The name of the table you wish to delete the data from.
|
||||
|
||||
=item keyName
|
||||
=head3 keyName
|
||||
|
||||
The name of the column that is the primary key in the table.
|
||||
|
||||
=item keyValue
|
||||
=head3 keyValue
|
||||
|
||||
An integer containing the key value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub deleteCollateral {
|
||||
|
|
@ -221,16 +213,12 @@ sub displayTitle {
|
|||
|
||||
Duplicates this wobject with a new wobject Id. Returns the new wobject Id.
|
||||
|
||||
NOTE: This method is meant to be extended by all sub-classes.
|
||||
B<NOTE:> This method is meant to be extended by all sub-classes.
|
||||
|
||||
=over
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
If specified the wobject will be duplicated to this pageId, otherwise it will be duplicated to the clipboard.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub duplicate {
|
||||
|
|
@ -266,20 +254,16 @@ sub duplicate {
|
|||
|
||||
Returns a file property form row which can be used in any Wobject properties page.
|
||||
|
||||
NOTE: This method is meant for use with www_deleteFile.
|
||||
B<NOTE:> This method is meant for use with www_deleteFile.
|
||||
|
||||
=over
|
||||
|
||||
=item name
|
||||
=head3 name
|
||||
|
||||
The name of the property that stores the filename.
|
||||
|
||||
=item labelId
|
||||
=head3 labelId
|
||||
|
||||
The internationalId of the form label for this file.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub fileProperty {
|
||||
|
|
@ -304,14 +288,10 @@ sub fileProperty {
|
|||
|
||||
Returns a hash reference containing all of the properties of this wobject instance.
|
||||
|
||||
=over
|
||||
|
||||
=item propertyName
|
||||
=head3 propertyName
|
||||
|
||||
If an individual propertyName is specified, then only that property value is returned as a scalar.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub get {
|
||||
|
|
@ -329,22 +309,18 @@ sub get {
|
|||
|
||||
Returns a hash reference containing a row of collateral data.
|
||||
|
||||
=over
|
||||
|
||||
=item tableName
|
||||
=head3 tableName
|
||||
|
||||
The name of the table you wish to retrieve the data from.
|
||||
|
||||
=item keyName
|
||||
=head3 keyName
|
||||
|
||||
The name of the column that is the primary key in the table.
|
||||
|
||||
=item keyValue
|
||||
=head3 keyValue
|
||||
|
||||
An integer containing the key value. If key value is equal to "new" or null, then an empty hashRef containing only keyName=>"new" will be returned to avoid strict errors.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getCollateral {
|
||||
|
|
@ -363,14 +339,10 @@ sub getCollateral {
|
|||
|
||||
Returns the default value for a wobject property.
|
||||
|
||||
=over
|
||||
|
||||
=item propertyName
|
||||
=head3 propertyName
|
||||
|
||||
The name of the property to retrieve the default value for.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getDefaultValue {
|
||||
|
|
@ -402,14 +374,10 @@ sub getIndexerParams {
|
|||
|
||||
Returns a value for a wobject property however possible. It first looks in form variables for the property, then looks to the value stored in the wobject instance, and if all else fails it returns the default value for the property.
|
||||
|
||||
=over
|
||||
|
||||
=item propertyName
|
||||
=head3 propertyName
|
||||
|
||||
The name of the property to retrieve the value for.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub getValue {
|
||||
|
|
@ -431,18 +399,14 @@ sub getValue {
|
|||
|
||||
Returns an internationalized message.
|
||||
|
||||
=over
|
||||
|
||||
=item id
|
||||
=head3 id
|
||||
|
||||
The identifier for the internationalized message.
|
||||
|
||||
=item namespace
|
||||
=head3 namespace
|
||||
|
||||
The namespace for the internationalized message. Defaults to the namespace of the wobject.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub i18n {
|
||||
|
|
@ -487,30 +451,26 @@ sub logView {
|
|||
|
||||
Moves a collateral data item down one position. This assumes that the collateral data table has a column called "wobjectId" that identifies the wobject, and a column called "sequenceNumber" that determines the position of the data item.
|
||||
|
||||
=over
|
||||
|
||||
=item tableName
|
||||
=head3 tableName
|
||||
|
||||
A string indicating the table that contains the collateral data.
|
||||
|
||||
=item idName
|
||||
=head3 idName
|
||||
|
||||
A string indicating the name of the column that uniquely identifies this collateral data item.
|
||||
|
||||
=item id
|
||||
=head3 id
|
||||
|
||||
An integer that uniquely identifies this collateral data item.
|
||||
|
||||
=item setName
|
||||
=head3 setName
|
||||
|
||||
By default this method assumes that the collateral will have a wobject id in the table. However, since there is not always a wobject id to separate one data set from another, you may specify another field to do that.
|
||||
|
||||
=item setValue
|
||||
=head3 setValue
|
||||
|
||||
The value of the column defined by "setName" to select a data set from.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
### NOTE: There is a redundant use of wobjectId in some of these statements on purpose to support
|
||||
|
|
@ -537,30 +497,26 @@ sub moveCollateralDown {
|
|||
|
||||
Moves a collateral data item up one position. This assumes that the collateral data table has a column called "wobjectId" that identifies the wobject, and a column called "sequenceNumber" that determines the position of the data item.
|
||||
|
||||
=over
|
||||
|
||||
=item tableName
|
||||
=head3 tableName
|
||||
|
||||
A string indicating the table that contains the collateral data.
|
||||
|
||||
=item idName
|
||||
=head3 idName
|
||||
|
||||
A string indicating the name of the column that uniquely identifies this collateral data item.
|
||||
|
||||
=item id
|
||||
=head3 id
|
||||
|
||||
An integer that uniquely identifies this collateral data item.
|
||||
|
||||
=item setName
|
||||
=head3 setName
|
||||
|
||||
By default this method assumes that the collateral will have a wobject id in the table. However, since there is not always a wobject id to separate one data set from another, you may specify another field to do that.
|
||||
|
||||
=item setValue
|
||||
=head3 setValue
|
||||
|
||||
The value of the column defined by "setName" to select a data set from.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
### NOTE: There is a redundant use of wobjectId in some of these statements on purpose to support
|
||||
|
|
@ -629,17 +585,15 @@ sub namespace {
|
|||
|
||||
Constructor.
|
||||
|
||||
NOTE: This method should never need to be overridden or extended.
|
||||
B<NOTE:> This method should never need to be overridden or extended.
|
||||
|
||||
=over
|
||||
|
||||
=item -properties
|
||||
=head3 -properties
|
||||
|
||||
A hash reference containing at minimum "wobjectId" and "namespace". wobjectId may be set to "new" if you're creating a new instance. This hash reference should be the one created by WebGUI.pm and passed to the wobject subclass.
|
||||
|
||||
NOTE: It may seem a little weird that the initial data for the wobject instance is coming from WebGUI.pm, but this was done to lessen database traffic thus increasing the speed of all wobjects.
|
||||
B<NOTE:> It may seem a little weird that the initial data for the wobject instance is coming from WebGUI.pm, but this was done to lessen database traffic thus increasing the speed of all wobjects.
|
||||
|
||||
=item -extendedProperties
|
||||
=head3 -extendedProperties
|
||||
|
||||
A hash reference containing the properties that extend the wobject class. They should match the properties that are added to this wobject's namespace table in the database. So if this wobject has a namespace of "MyWobject" and a table definition that looks like this:
|
||||
|
||||
|
|
@ -677,25 +631,23 @@ Then the extended property list would be:
|
|||
}
|
||||
}
|
||||
|
||||
NOTE: This is used to define the wobject and should only be passed in by a wobject subclass.
|
||||
B<NOTE:> This is used to define the wobject and should only be passed in by a wobject subclass.
|
||||
|
||||
=item -useDiscussion
|
||||
=head3 -useDiscussion
|
||||
|
||||
Defaults to "0". If set to "1" this will add a discussion properties tab to this wobject to enable content managers to set the properties of a discussion attached to this wobject.
|
||||
|
||||
NOTE: This is used to define the wobject and should only be passed in by a wobject subclass.
|
||||
B<NOTE:> This is used to define the wobject and should only be passed in by a wobject subclass.
|
||||
|
||||
=item -useTemplate
|
||||
=head3 -useTemplate
|
||||
|
||||
Defaults to "0". If set to "1" this will add a template field to the wobject to enable content managers to select a template to layout this wobject.
|
||||
|
||||
=item -useMetaData
|
||||
=head3 -useMetaData
|
||||
|
||||
Defaults to "0". If set to "1" this will add a Metadata properties tab to this wobject to enable content managers to set Metadata values.
|
||||
|
||||
NOTE: This is used to define the wobject and should only be passed in by a wobject subclass.
|
||||
|
||||
=back
|
||||
B<NOTE:> This is used to define the wobject and should only be passed in by a wobject subclass.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -816,14 +768,10 @@ sub new {
|
|||
Decides whether or not macros should be processed and returns the
|
||||
appropriate output.
|
||||
|
||||
=over
|
||||
|
||||
=item output
|
||||
=head3 output
|
||||
|
||||
An HTML blob to be processed for macros.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub processMacros {
|
||||
|
|
@ -836,24 +784,20 @@ sub processMacros {
|
|||
|
||||
Returns the content generated from this template.
|
||||
|
||||
NOTE: Only for use in wobjects that support templates.
|
||||
B<NOTE:> Only for use in wobjects that support templates.
|
||||
|
||||
=over
|
||||
|
||||
=item templateId
|
||||
=head3 templateId
|
||||
|
||||
An id referring to a particular template in the templates table.
|
||||
|
||||
=item hashRef
|
||||
=head3 hashRef
|
||||
|
||||
A hash reference containing variables and loops to pass to the template engine.
|
||||
|
||||
=item namespace
|
||||
=head3 namespace
|
||||
|
||||
A namespace to use for the template. Defaults to the wobject's namespace.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub processTemplate {
|
||||
|
|
@ -885,7 +829,7 @@ sub processTemplate {
|
|||
|
||||
Removes this wobject from the database and all it's attachments from the filesystem.
|
||||
|
||||
NOTE: This method is meant to be extended by all sub-classes.
|
||||
B<NOTE:> This method is meant to be extended by all sub-classes.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -911,26 +855,22 @@ sub purge {
|
|||
|
||||
Resequences collateral data. Typically useful after deleting a collateral item to remove the gap created by the deletion.
|
||||
|
||||
=over
|
||||
|
||||
=item tableName
|
||||
=head3 tableName
|
||||
|
||||
The name of the table to resequence.
|
||||
|
||||
=item keyName
|
||||
=head3 keyName
|
||||
|
||||
The key column name used to determine which data needs sorting within the table.
|
||||
|
||||
=item setName
|
||||
=head3 setName
|
||||
|
||||
Defaults to "wobjectId". This is used to define which data set to reorder.
|
||||
|
||||
=item setValue
|
||||
=head3 setValue
|
||||
|
||||
Used to define which data set to reorder. Defaults to the wobjectId for this instance. Defaults to the value of "setName" in the wobject properties.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub reorderCollateral {
|
||||
|
|
@ -954,14 +894,10 @@ sub reorderCollateral {
|
|||
|
||||
Stores the values specified in hashRef to the database.
|
||||
|
||||
=over
|
||||
|
||||
=item hashRef
|
||||
=head3 hashRef
|
||||
|
||||
A hash reference of the properties to set for this wobject instance.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub set {
|
||||
|
|
@ -1039,38 +975,34 @@ sub set {
|
|||
|
||||
Performs and insert/update of collateral data for any wobject's collateral data. Returns the primary key value for that row of data.
|
||||
|
||||
=over
|
||||
|
||||
=item tableName
|
||||
=head3 tableName
|
||||
|
||||
The name of the table to insert the data.
|
||||
|
||||
=item keyName
|
||||
=head3 keyName
|
||||
|
||||
The column name of the primary key in the table specified above. This must also be an incrementerId in the incrementer table.
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
A hash reference containing the name/value pairs to be inserted into the database where the name is the column name. Note that the primary key should be specified in this list, and if it's value is "new" or null a new row will be created.
|
||||
|
||||
=item useSequenceNumber
|
||||
=head3 useSequenceNumber
|
||||
|
||||
If set to "1", a new sequenceNumber will be generated and inserted into the row. Note that this means you must have a sequenceNumber column in the table. Also note that this requires the presence of the wobjectId column. Defaults to "1".
|
||||
|
||||
=item useWobjectId
|
||||
=head3 useWobjectId
|
||||
|
||||
If set to "1", the current wobjectId will be inserted into the table upon creation of a new row. Note that this means the table better have a wobjectId column. Defaults to "1".
|
||||
|
||||
=item setName
|
||||
=head3 setName
|
||||
|
||||
If this collateral data set is not grouped by wobjectId, but by another column then specify that column here. The useSequenceNumber parameter will then use this column name instead of wobjectId to generate the sequenceNumber.
|
||||
|
||||
=item setValue
|
||||
=head3 setValue
|
||||
|
||||
If you've specified a setName you may also set a value for that set. Defaults to the value for this id from the wobject properties.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setCollateral {
|
||||
|
|
@ -1156,7 +1088,7 @@ sub wid {
|
|||
|
||||
Copies this instance to the clipboard.
|
||||
|
||||
NOTE: Should never need to be overridden or extended.
|
||||
B<NOTE:> Should never need to be overridden or extended.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1173,7 +1105,7 @@ sub www_copy {
|
|||
|
||||
Creates a shortcut (using the wobject proxy) of this wobject on the clipboard.
|
||||
|
||||
NOTE: Should never need to be overridden or extended.
|
||||
B<NOTE:> Should never need to be overridden or extended.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1306,26 +1238,22 @@ sub www_deleteFileConfirm {
|
|||
|
||||
Displays the common properties of any/all wobjects.
|
||||
|
||||
=over
|
||||
|
||||
=item -properties, -layout, -privileges
|
||||
=head3 -properties, -layout, -privileges
|
||||
|
||||
WebGUI::HTMLForm objects that extend these tabs.
|
||||
|
||||
=item -helpId
|
||||
=head3 -helpId
|
||||
|
||||
An id in this namespace in the WebGUI help system for this edit page. If specified a help link will be created on the edit page.
|
||||
|
||||
=item -heading
|
||||
=head3 -heading
|
||||
|
||||
A text string to put in the heading of this page.
|
||||
|
||||
=item -headingId
|
||||
=head3 -headingId
|
||||
|
||||
An id this namespace of the WebGUI international system. This message will be retrieved and displayed in the heading of this edit page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub www_edit {
|
||||
|
|
@ -1521,16 +1449,12 @@ sub www_edit {
|
|||
|
||||
Saves the default properties of any/all wobjects.
|
||||
|
||||
NOTE: This method should only need to be extended if you need to do some special validation.
|
||||
B<NOTE:> This method should only need to be extended if you need to do some special validation.
|
||||
|
||||
=over
|
||||
|
||||
=item hashRef
|
||||
=head3 hashRef
|
||||
|
||||
A hash reference of extra properties to set.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub www_editSave {
|
||||
|
|
|
|||
|
|
@ -96,9 +96,7 @@ sub close {
|
|||
|
||||
Creates a new DBIx::FullTextSearch index.
|
||||
|
||||
=over
|
||||
|
||||
=item %options
|
||||
=head3 %options
|
||||
|
||||
Options to pass to DBIx::FullTextSearch.
|
||||
The default options that are used are:
|
||||
|
|
@ -107,8 +105,6 @@ The default options that are used are:
|
|||
|
||||
Please refer to the DBIx::FullTextSearch documentation for a complete list of options.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub create {
|
||||
|
|
@ -142,14 +138,10 @@ sub create {
|
|||
|
||||
Returns true if tableName exists in database.
|
||||
|
||||
=over
|
||||
|
||||
=item tableName
|
||||
=head3 tableName
|
||||
|
||||
The name of table.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub existsTable {
|
||||
|
|
@ -163,27 +155,23 @@ sub existsTable {
|
|||
|
||||
Returns an array reference containing details for each docId.
|
||||
|
||||
=over
|
||||
|
||||
=item docIdList
|
||||
=head3 docIdList
|
||||
|
||||
An array reference containing docIds.
|
||||
|
||||
=item previewLength
|
||||
=head3 previewLength
|
||||
|
||||
The maximum number of characters in each of the context sections. Defaults to "80".
|
||||
|
||||
=item highlight
|
||||
=head3 highlight
|
||||
|
||||
A boolean indicating whether or not to enable highlight. Defaults to "1".
|
||||
|
||||
=item highlightColors
|
||||
=head3 highlightColors
|
||||
|
||||
A reference to an array of CSS color identificators.
|
||||
|
||||
=item
|
||||
|
||||
=back
|
||||
=head3
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -335,23 +323,19 @@ sub _queryToWords {
|
|||
|
||||
highlight words or patterns in HTML documents.
|
||||
|
||||
=over
|
||||
|
||||
=item text
|
||||
=head3 text
|
||||
|
||||
The text to highlight
|
||||
|
||||
=item query
|
||||
=head3 query
|
||||
|
||||
A query containing the words to highlight. Defaults to the last used $search->search query.
|
||||
Special case: When query contains only an asterisk '*', no highlighting is applied.
|
||||
|
||||
=item colors
|
||||
=head3 colors
|
||||
|
||||
A reference to an array of CSS color identificators.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub highlight {
|
||||
|
|
@ -376,68 +360,64 @@ This method doesn't store the document itself. Instead, it stores information ab
|
|||
in the document in such a structured way that it makes easy and fast to look up what
|
||||
documents contain certain words and return id's of the documents.
|
||||
|
||||
=over
|
||||
|
||||
=item text
|
||||
=head3 text
|
||||
|
||||
The text to index.
|
||||
|
||||
=item location
|
||||
=head3 location
|
||||
|
||||
The location of the document. Most likely an URL.
|
||||
|
||||
=item contentType
|
||||
=head3 contentType
|
||||
|
||||
The content type of this document.
|
||||
|
||||
=item docId
|
||||
=head3 docId
|
||||
|
||||
The unique Id of this document. Defaults to the next empty docId.
|
||||
|
||||
=item pageId
|
||||
=head3 pageId
|
||||
|
||||
The pageId of the page on which this document resides. Defaults to 0.
|
||||
|
||||
=item wobjectId
|
||||
=head3 wobjectId
|
||||
|
||||
The wobjectID of the wobject that holds this document. Defaults to 0.
|
||||
|
||||
=item ownerId
|
||||
=head3 ownerId
|
||||
|
||||
The ownerId of the document. Defaults to 3.
|
||||
|
||||
=item languageId
|
||||
=head3 languageId
|
||||
|
||||
The languageId of this document. Defaults to undef.
|
||||
|
||||
=item namespace
|
||||
=head3 namespace
|
||||
|
||||
The namespace of this document. Defaults to 'WebGUI'.
|
||||
|
||||
=item page_groupIdView
|
||||
=head3 page_groupIdView
|
||||
|
||||
Id of group authorized to view this page. Defaults to '7' (everyone)
|
||||
|
||||
=item wobject_groupIdView
|
||||
=head3 wobject_groupIdView
|
||||
|
||||
Id of group authorized to view this wobject. Defaults to '7' (everyone)
|
||||
|
||||
=item wobject_special_groupIdView
|
||||
=head3 wobject_special_groupIdView
|
||||
|
||||
Id of group authorized to view the details of this wobject.
|
||||
|
||||
=item headerShortcut
|
||||
=head3 headerShortcut
|
||||
|
||||
An sql statement that returns the header (title, question, subject, name, whatever)
|
||||
of this document.
|
||||
|
||||
=item bodyShortcut
|
||||
=head3 bodyShortcut
|
||||
|
||||
An sql statement that returns the body (description, answer, message, whatever)
|
||||
of this document.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub indexDocument {
|
||||
|
|
@ -485,18 +465,14 @@ sub indexDocument {
|
|||
|
||||
Constructor.
|
||||
|
||||
=over
|
||||
|
||||
=item indexName
|
||||
=head3 indexName
|
||||
|
||||
The name of the index to open. Defaults to 'default'.
|
||||
|
||||
=item $dbh
|
||||
=head3 $dbh
|
||||
|
||||
Database handler to use. Defaults to $WebGUI::Session::session{dbh}.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -539,24 +515,20 @@ sub open {
|
|||
Returns a context preview in which words from a search query appear in the resulting documents.
|
||||
The words are always in the middle of each of the sections.
|
||||
|
||||
=over
|
||||
|
||||
=item text
|
||||
=head3 text
|
||||
|
||||
The text to preview
|
||||
|
||||
=item previewLength
|
||||
=head3 previewLength
|
||||
|
||||
The maximum number of characters in each of the context sections. Defaults to 80.
|
||||
A preview length of "0" means no preview,
|
||||
while a negative preview length returns the complete text.
|
||||
|
||||
=item query
|
||||
=head3 query
|
||||
|
||||
A query containing the words to highlight. Defaults to the last used $search->search query.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub preview {
|
||||
|
|
@ -596,14 +568,10 @@ sub preview {
|
|||
|
||||
Like create, but first drops the existing index. Useful when rebuilding the index.
|
||||
|
||||
=over
|
||||
|
||||
=item %options
|
||||
=head3 %options
|
||||
|
||||
Options to pass to WebGUI::IndexedSearch->create()
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub recreate {
|
||||
|
|
@ -624,9 +592,7 @@ sub recreate {
|
|||
Returns an array reference of docId's of documents that match the query.
|
||||
If the search has no results, undef is returned.
|
||||
|
||||
=over
|
||||
|
||||
=item query
|
||||
=head3 query
|
||||
|
||||
user input string. Will be parsed into can-include, must-include and must-not-include words and phrases.
|
||||
Special case: when query is an asterisk (*), then no full text search is done, and results are returned
|
||||
|
|
@ -636,7 +602,7 @@ Examples are:
|
|||
+"this is a phrase" -koo +bar foo
|
||||
(foo OR baz) AND (bar OR caz)
|
||||
|
||||
=item filter
|
||||
=head3 filter
|
||||
|
||||
A hash reference containing filter elements.
|
||||
|
||||
|
|
@ -646,8 +612,6 @@ Example:
|
|||
namespace => [ 'Article', 'USS' ]
|
||||
}
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub search {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue