added: DataForm can now trigger workflow when adding an entry
This commit is contained in:
parent
91812b74eb
commit
5e967d9b82
5 changed files with 156 additions and 4 deletions
|
|
@ -32,6 +32,7 @@
|
|||
- added a perltidyrc to the docs folder. we'll be using this to clean up code.
|
||||
- fixed: Site Nav navigation template can now be used more than once per page
|
||||
- added: TextArea now supports "maxlength" attribute
|
||||
- added: DataForm can now run a workflow when an entry is added
|
||||
|
||||
|
||||
7.6.1
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ changeDefaultPaginationInSearch($session);
|
|||
upgradeToYui26($session);
|
||||
addUsersOnlineMacro($session);
|
||||
addProfileExtrasField($session);
|
||||
addWorkflowToDataform( $session );
|
||||
finish($session); # this line required
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
@ -107,6 +108,23 @@ sub addProfileExtrasField {
|
|||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Add the workflow property to DataForm
|
||||
sub addWorkflowToDataform {
|
||||
my $session = shift;
|
||||
print "\tAdding Workflow to DataForm... " unless $quiet;
|
||||
|
||||
my $sth = $session->db->read('DESCRIBE `DataForm`');
|
||||
while (my ($col) = $sth->array) {
|
||||
if ( $col eq 'workflowIdAddEntry' ) {
|
||||
print "Already done, skipping.\n" unless $quiet;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$session->db->write( "ALTER TABLE DataForm ADD COLUMN workflowIdAddEntry CHAR(22) BINARY" );
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue