1
0
Fork 0

Commits vergleichen

...

3 Commits

Autor SHA1 Nachricht Datum
o.pinke
f534968026 fixes 2021-08-23 15:57:01 +02:00
o.pinke
e8b0c80921 recoding to use as plugin with CL 2020-08-20 18:30:16 +02:00
o.pinke
244621b05f generated new locale files 2020-08-20 18:28:10 +02:00
27 geänderte Dateien mit 2700 neuen und 2906 gelöschten Zeilen

1
.gitignore gevendort Normale Datei
Datei anzeigen

@ -0,0 +1 @@
/.project

61
cl_plugin.xml Normale Datei
Datei anzeigen

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<plugin>
<general active="1">
<plugin_name>ConLite Workflow</plugin_name>
<plugin_foldername>cl-workflow</plugin_foldername>
<uuid>6BAFECC4-AF63-51CE-839D-A4E5FBBEB4A9</uuid>
<description>ConLite Workflow adds a simple worflow management to your ConLite CMS</description>
<author>ConLite Team</author>
<copyright>ConLite Team</copyright>
<mail>cl-workflow@conlite.org</mail>
<website>https://conlite.org</website>
<version>0.1.0</version>
<license>GNU Lesser General Public License</license>
</general>
<requirements php="5.6">
<conlite minversion="2.1.0" />
</requirements>
<conlite>
<areas>
<area menuless="0">workflow</area>
<area parent="workflow" menuless="0">workflow_common</area>
<area parent="workflow" menuless="0">workflow_steps</area>
<area parent="workflow" menuless="0">workflow_step_edit</area>
<area parent="con" menuless="0">con_workflow</area>
</areas>
<actions>
<action area="workflow_common">workflow_show</action>
<action area="workflow_common">workflow_create</action>
<action area="workflow_common">workflow_save</action>
<action area="workflow">workflow_delete</action>
<action area="workflow_steps">workflow_step_edit</action>
<action area="workflow_steps">workflow_step_up</action>
<action area="workflow_steps">workflow_step_down</action>
<action area="workflow_steps">workflow_save_step</action>
<action area="workflow_steps">workflow_create_step</action>
<action area="workflow_steps">workflow_step_delete</action>
<action area="workflow_steps">workflow_user_up</action>
<action area="workflow_steps">workflow_user_down</action>
<action area="workflow_steps">workflow_create_user</action>
<action area="workflow_steps">workflow_user_delete</action>
<action area="str">workflow_cat_assign</action>
<action area="con">workflow_do_action</action>
<action area="str">workflow_inherit_down</action>
<action area="con_workflow">workflow_task_user_select</action>
<action area="con_workflow">workflow_do_action</action>
</actions>
<frames>
<frame area="workflow" filetype="main" name="cl-workflow/includes/include.workflow_left_top.php" frameId="1" />
<frame area="workflow" filetype="main" name="cl-workflow/includes/include.workflow_list.php" frameId="2" />
<frame area="workflow_common" filetype="main" name="cl-workflow/includes/include.workflow_edit.php" frameId="4" />
<frame area="workflow" filetype="main" name="cl-workflow/includes/include.workflow_subnav.php" frameId="3" />
<frame area="workflow_steps" filetype="main" name="cl-workflow/includes/include.workflow_steps.php" frameId="4" />
<frame area="con_workflow" filetype="main" name="cl-workflow/includes/include.workflow_tasks.php" frameId="4" />
</frames>
<nav_sub>
<nav area="workflow" level="0" navm="extra">cl-workflow/xml/lang_de_DE.xml;navigation/extra/workflow/main</nav>
<nav area="workflow_common" level="1" navm="0">cl-workflow/xml/lang_de_DE.xml;navigation/extra/workflow/settings</nav>
<nav area="workflow_steps" level="1" navm="0">cl-workflow/xml/lang_de_DE.xml;navigation/extra/workflow/steps</nav>
</nav_sub>
</conlite>
</plugin>

Datei anzeigen

@ -30,20 +30,6 @@ if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
$cfg["tab"]["workflow"] = $cfg['sql']['sqlprefix'] . "_piwf_workflow";
$cfg["tab"]["workflow_allocation"] = $cfg['sql']['sqlprefix'] . "_piwf_allocation";
$cfg["tab"]["workflow_art_allocation"] = $cfg['sql']['sqlprefix'] . "_piwf_art_allocation";
$cfg["tab"]["workflow_items"] = $cfg['sql']['sqlprefix'] . "_piwf_items";
$cfg["tab"]["workflow_user_sequences"] = $cfg['sql']['sqlprefix'] . "_piwf_user_sequences";
$cfg["tab"]["workflow_actions"] = $cfg['sql']['sqlprefix'] . "_piwf_actions";
plugin_include('workflow', 'classes/class.workflowactions.php');
plugin_include('workflow', 'classes/class.workflowallocation.php');
plugin_include('workflow', 'classes/class.workflowartallocation.php');
plugin_include('workflow', 'classes/class.workflowitems.php');
plugin_include('workflow', 'classes/class.workflowusersequence.php');
/** /**
* Class Workflows * Class Workflows
* Class for workflow management * Class for workflow management
@ -137,44 +123,3 @@ class Workflow extends Item {
} }
} }
/* Helper functions */
function getWorkflowForCat($idcat) {
global $lang, $cfg;
$idcatlang = getCatLang($idcat, $lang);
$workflows = new WorkflowAllocations;
$workflows->select("idcatlang = '$idcatlang'");
if ($obj = $workflows->next()) {
/* Sanity: Check if the workflow still exists */
$workflow = new Workflow;
$res = $workflow->loadByPrimaryKey($obj->get("idworkflow"));
if ($res == false) {
return 0;
} else {
return $obj->get("idworkflow");
}
}
}
function getCatLang($idcat, $idlang) {
global $lang, $cfg;
$db = new DB_ConLite;
/* Get the idcatlang */
$sql = "SELECT idcatlang FROM "
. $cfg["tab"]["cat_lang"] .
" WHERE idlang = '" . Contenido_Security::escapeDB($idlang, $db) . "' AND
idcat = '" . Contenido_Security::escapeDB($idcat, $db) . "'";
$db->query($sql);
if ($db->next_record()) {
return ($db->f("idcatlang"));
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -25,7 +26,6 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -43,8 +43,7 @@ class WorkflowActions extends ItemCollection {
* Constructor Function * Constructor Function
* @param string $table The table to use as information source * @param string $table The table to use as information source
*/ */
function __construct() function __construct() {
{
global $cfg; global $cfg;
parent::__construct($cfg["tab"]["workflow_actions"], "idworkflowaction"); parent::__construct($cfg["tab"]["workflow_actions"], "idworkflowaction");
$this->_setItemClass("WorkflowAction"); $this->_setItemClass("WorkflowAction");
@ -56,19 +55,16 @@ class WorkflowActions extends ItemCollection {
* @param type $action * @param type $action
* @return boolean * @return boolean
*/ */
function get($idworkflowitem, $action) function get($idworkflowitem, $action) {
{
$this->select("idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "' AND action = '" . Contenido_Security::escapeDB($action, NULL) . "'"); $this->select("idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "' AND action = '" . Contenido_Security::escapeDB($action, NULL) . "'");
if ($this->next()) if ($this->next()) {
{
return true; return true;
} else { } else {
return false; return false;
} }
} }
function getAvailableWorkflowActions () function getAvailableWorkflowActions() {
{
$availableWorkflowActions = array( $availableWorkflowActions = array(
"publish" => i18n("Publish article", "workflow"), "publish" => i18n("Publish article", "workflow"),
"lock" => i18n("Lock article", "workflow"), "lock" => i18n("Lock article", "workflow"),
@ -82,11 +78,9 @@ class WorkflowActions extends ItemCollection {
return($availableWorkflowActions); return($availableWorkflowActions);
} }
function set ($idworkflowitem, $action) function set($idworkflowitem, $action) {
{
$this->select("idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "' AND action = '" . Contenido_Security::escapeDB($action, NULL) . "'"); $this->select("idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "' AND action = '" . Contenido_Security::escapeDB($action, NULL) . "'");
if (!$this->next()) if (!$this->next()) {
{
$newitem = parent::createNewItem(); $newitem = parent::createNewItem();
$newitem->setField("idworkflowitem", $idworkflowitem); $newitem->setField("idworkflowitem", $idworkflowitem);
$newitem->setField("action", $action); $newitem->setField("action", $action);
@ -94,21 +88,19 @@ class WorkflowActions extends ItemCollection {
} }
} }
function remove ($idworkflowitem, $action) function remove($idworkflowitem, $action) {
{
$this->select("idworkflowitem = '$idworkflowitem' AND action = '$action'"); $this->select("idworkflowitem = '$idworkflowitem' AND action = '$action'");
if ($item = $this->next()) if ($item = $this->next()) {
{
$this->delete($item->getField("idworkflowaction")); $this->delete($item->getField("idworkflowaction"));
} }
} }
function select ($where = "", $group_by = "", $order_by = "", $limit = "") function select($where = "", $group_by = "", $order_by = "", $limit = "") {
{
global $client; global $client;
return parent::select($where, $group_by, $order_by, $limit); return parent::select($where, $group_by, $order_by, $limit);
} }
} }
/** /**
@ -128,5 +120,7 @@ class WorkflowAction extends Item {
global $cfg; global $cfg;
parent::__construct($cfg["tab"]["workflow_actions"], "idworkflowaction"); parent::__construct($cfg["tab"]["workflow_actions"], "idworkflowaction");
} }
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -25,12 +26,10 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
/** /**
* Class WorkflowAllocations * Class WorkflowAllocations
* Class for workflow allocation management * Class for workflow allocation management
@ -44,22 +43,19 @@ class WorkflowAllocations extends ItemCollection {
* Constructor Function * Constructor Function
* @param string $table The table to use as information source * @param string $table The table to use as information source
*/ */
function __construct() function __construct() {
{
global $cfg; global $cfg;
parent::__construct($cfg["tab"]["workflow_allocation"], "idallocation"); parent::__construct($cfg["tab"]["workflow_allocation"], "idallocation");
$this->_setItemClass("WorkflowAllocation"); $this->_setItemClass("WorkflowAllocation");
} }
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowAllocations() function WorkflowAllocations() {
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct(); $this->__construct();
} }
function delete ($idallocation) function delete($idallocation) {
{
global $cfg, $lang; global $cfg, $lang;
$obj = new WorkflowAllocation; $obj = new WorkflowAllocation;
@ -76,21 +72,17 @@ class WorkflowAllocations extends ItemCollection {
$sql = "SELECT idart FROM " . $cfg["tab"]["cat_art"] . " WHERE idcat = '" . Contenido_Security::toInteger($idcat) . "'"; $sql = "SELECT idart FROM " . $cfg["tab"]["cat_art"] . " WHERE idcat = '" . Contenido_Security::toInteger($idcat) . "'";
$db->query($sql); $db->query($sql);
while ($db->next_record()) while ($db->next_record()) {
{
$idarts[] = $db->f("idart"); $idarts[] = $db->f("idart");
} }
$idartlangs = array(); $idartlangs = array();
if (is_array($idarts)) if (is_array($idarts)) {
{ foreach ($idarts as $idart) {
foreach ($idarts as $idart)
{
$sql = "SELECT idartlang FROM " . $cfg["tab"]["art_lang"] . " WHERE idart = '" . Contenido_Security::toInteger($idart) . "' and idlang = '" . Contenido_Security::toInteger($lang) . "'"; $sql = "SELECT idartlang FROM " . $cfg["tab"]["art_lang"] . " WHERE idart = '" . Contenido_Security::toInteger($idart) . "' and idlang = '" . Contenido_Security::toInteger($lang) . "'";
$db->query($sql); $db->query($sql);
if ($db->next_record()) if ($db->next_record()) {
{
$idartlangs[] = $db->f("idartlang"); $idartlangs[] = $db->f("idartlang");
} }
} }
@ -99,8 +91,7 @@ class WorkflowAllocations extends ItemCollection {
$workflowArtAllocation = new WorkflowArtAllocation; $workflowArtAllocation = new WorkflowArtAllocation;
$workflowArtAllocations = new WorkflowArtAllocations; $workflowArtAllocations = new WorkflowArtAllocations;
foreach ($idartlangs as $idartlang) foreach ($idartlangs as $idartlang) {
{
$workflowArtAllocation->loadBy("idartlang", $idartlang); $workflowArtAllocation->loadBy("idartlang", $idartlang);
$workflowArtAllocations->delete($workflowArtAllocation->get("idartallocation")); $workflowArtAllocations->delete($workflowArtAllocation->get("idartallocation"));
} }
@ -108,12 +99,10 @@ class WorkflowAllocations extends ItemCollection {
parent::delete($idallocation); parent::delete($idallocation);
} }
function create ($idworkflow, $idcatlang) function create($idworkflow, $idcatlang) {
{
$this->select("idcatlang = '$idcatlang'"); $this->select("idcatlang = '$idcatlang'");
if ($this->next() !== false) if ($this->next() !== false) {
{
$this->lasterror = i18n("Category already has a workflow assigned", "workflow"); $this->lasterror = i18n("Category already has a workflow assigned", "workflow");
return false; return false;
} }
@ -121,21 +110,18 @@ class WorkflowAllocations extends ItemCollection {
$workflows = new Workflows; $workflows = new Workflows;
$workflows->select("idworkflow = '$idworkflow'"); $workflows->select("idworkflow = '$idworkflow'");
if ($workflows->next() === false) if ($workflows->next() === false) {
{
$this->lasterror = i18n("Workflow doesn't exist", "workflow"); $this->lasterror = i18n("Workflow doesn't exist", "workflow");
return false; return false;
} }
$newitem = parent::createNewItem(); $newitem = parent::createNewItem();
if (!$newitem->setWorkflow($idworkflow)) if (!$newitem->setWorkflow($idworkflow)) {
{
$this->lasterror = $newitem->lasterror; $this->lasterror = $newitem->lasterror;
$workflows->delete($newitem->getField("idallocation")); $workflows->delete($newitem->getField("idallocation"));
return false; return false;
} }
if (!$newitem->setCatLang($idcatlang)) if (!$newitem->setCatLang($idcatlang)) {
{
$this->lasterror = $newitem->lasterror; $this->lasterror = $newitem->lasterror;
$workflows->delete($newitem->getField("idallocation")); $workflows->delete($newitem->getField("idallocation"));
return false; return false;
@ -145,6 +131,7 @@ class WorkflowAllocations extends ItemCollection {
return ($newitem); return ($newitem);
} }
} }
/** /**
@ -160,16 +147,14 @@ class WorkflowAllocation extends Item {
* Constructor Function * Constructor Function
* @param string $table The table to use as information source * @param string $table The table to use as information source
*/ */
function __construct() function __construct() {
{
global $cfg; global $cfg;
parent::__construct($cfg["tab"]["workflow_allocation"], "idallocation"); parent::__construct($cfg["tab"]["workflow_allocation"], "idallocation");
} }
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowAllocation() function WorkflowAllocation() {
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct(); $this->__construct();
} }
@ -179,8 +164,7 @@ class WorkflowAllocation extends Item {
* @param string $field Void field since we override the usual setField function * @param string $field Void field since we override the usual setField function
* @param string $value Void field since we override the usual setField function * @param string $value Void field since we override the usual setField function
*/ */
function setField($field, $value, $bSafe = true) function setField($field, $value, $bSafe = true) {
{
die("Don't use setField for WorkflowAllocation items! Use setWorkflow instead!"); die("Don't use setField for WorkflowAllocation items! Use setWorkflow instead!");
} }
@ -188,14 +172,12 @@ class WorkflowAllocation extends Item {
* setWorkflow sets the workflow for the current item. * setWorkflow sets the workflow for the current item.
* @param int $idworkflow Workflow-ID to set the item to * @param int $idworkflow Workflow-ID to set the item to
*/ */
function setWorkflow ($idworkflow) function setWorkflow($idworkflow) {
{
$workflows = new Workflows; $workflows = new Workflows;
$workflows->select("idworkflow = '$idworkflow'"); $workflows->select("idworkflow = '$idworkflow'");
if ($workflows->next() === false) if ($workflows->next() === false) {
{
$this->lasterror = i18n("Workflow doesn't exist", "workflow"); $this->lasterror = i18n("Workflow doesn't exist", "workflow");
return false; return false;
} }
@ -210,16 +192,14 @@ class WorkflowAllocation extends Item {
* only be called by the create function. * only be called by the create function.
* @param int $idcatlang idcatlang to set. * @param int $idcatlang idcatlang to set.
*/ */
function setCatLang ($idcatlang) function setCatLang($idcatlang) {
{
global $cfg; global $cfg;
$allocations = new WorkflowAllocations; $allocations = new WorkflowAllocations;
$allocations->select("idcatlang = '$idcatlang'"); $allocations->select("idcatlang = '$idcatlang'");
if ($allocations->next() !== false) if ($allocations->next() !== false) {
{
$this->lasterror = i18n("Category already has a workflow assigned", "workflow"); $this->lasterror = i18n("Category already has a workflow assigned", "workflow");
return false; return false;
} }
@ -228,8 +208,7 @@ class WorkflowAllocation extends Item {
$sql = "SELECT idcatlang FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcatlang = '" . Contenido_Security::toInteger($idcatlang) . "'"; $sql = "SELECT idcatlang FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcatlang = '" . Contenido_Security::toInteger($idcatlang) . "'";
$db->query($sql); $db->query($sql);
if (!$db->next_record()) if (!$db->next_record()) {
{
$this->lasterror = i18n("Category doesn't exist, assignment failed", "workflow"); $this->lasterror = i18n("Category doesn't exist, assignment failed", "workflow");
return false; return false;
} }
@ -238,5 +217,7 @@ class WorkflowAllocation extends Item {
parent::store(); parent::store();
return true; return true;
} }
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -26,12 +27,10 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
/** /**
* Class WorkflowArtAllocations * Class WorkflowArtAllocations
* Class for workflow art allocation management * Class for workflow art allocation management
@ -45,38 +44,33 @@ class WorkflowArtAllocations extends ItemCollection {
* Constructor Function * Constructor Function
* @param string $table The table to use as information source * @param string $table The table to use as information source
*/ */
function __construct() function __construct() {
{
global $cfg; global $cfg;
parent::__construct($cfg["tab"]["workflow_art_allocation"], "idartallocation"); parent::__construct($cfg["tab"]["workflow_art_allocation"], "idartallocation");
$this->_setItemClass("WorkflowArtAllocation"); $this->_setItemClass("WorkflowArtAllocation");
} }
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowArtAllocations() function WorkflowArtAllocations() {
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct(); $this->__construct();
} }
function create ($idartlang) function create($idartlang) {
{
global $cfg; global $cfg;
$sql = "SELECT idartlang FROM " . $cfg["tab"]["art_lang"] . $sql = "SELECT idartlang FROM " . $cfg["tab"]["art_lang"] .
" WHERE idartlang = '" . Contenido_Security::escapeDB($idartlang, $this->db) . "'"; " WHERE idartlang = '" . Contenido_Security::escapeDB($idartlang, $this->db) . "'";
$this->db->query($sql); $this->db->query($sql);
if (!$this->db->next_record()) if (!$this->db->next_record()) {
{
$this->lasterror = i18n("Article doesn't exist", "workflow"); $this->lasterror = i18n("Article doesn't exist", "workflow");
return false; return false;
} }
$this->select("idartlang = '$idartlang'"); $this->select("idartlang = '$idartlang'");
if ($this->next() !== false) if ($this->next() !== false) {
{
$this->lasterror = i18n("Article is already assigned to a usersequence step.", "workflow"); $this->lasterror = i18n("Article is already assigned to a usersequence step.", "workflow");
return false; return false;
} }
@ -87,6 +81,7 @@ class WorkflowArtAllocations extends ItemCollection {
return ($newitem); return ($newitem);
} }
} }
/** /**
@ -102,22 +97,19 @@ class WorkflowArtAllocation extends Item {
* Constructor Function * Constructor Function
* @param string $table The table to use as information source * @param string $table The table to use as information source
*/ */
function __construct() function __construct() {
{
global $cfg; global $cfg;
parent::__construct($cfg["tab"]["workflow_art_allocation"], "idartallocation"); parent::__construct($cfg["tab"]["workflow_art_allocation"], "idartallocation");
} }
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowArtAllocation() function WorkflowArtAllocation() {
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct(); $this->__construct();
} }
function getWorkflowItem () function getWorkflowItem() {
{
$userSequence = new WorkflowUserSequence; $userSequence = new WorkflowUserSequence;
$userSequence->loadByPrimaryKey($this->values["idusersequence"]); $userSequence->loadByPrimaryKey($this->values["idusersequence"]);
@ -129,15 +121,13 @@ class WorkflowArtAllocation extends Item {
* @param string $field Void field since we override the usual setField function * @param string $field Void field since we override the usual setField function
* @param string $value Void field since we override the usual setField function * @param string $value Void field since we override the usual setField function
*/ */
function currentItemPosition() function currentItemPosition() {
{
$idworkflowitem = $this->get("idworkflowitem"); $idworkflowitem = $this->get("idworkflowitem");
$workflowItems = new WorkflowItems; $workflowItems = new WorkflowItems;
$workflowItems->select("idworkflowitem = '$idworkflowitem'"); $workflowItems->select("idworkflowitem = '$idworkflowitem'");
if ($item = $workflowItems->next()) if ($item = $workflowItems->next()) {
{
return ($item->get("position")); return ($item->get("position"));
} }
} }
@ -147,8 +137,7 @@ class WorkflowArtAllocation extends Item {
* @param string $field Void field since we override the usual setField function * @param string $field Void field since we override the usual setField function
* @param string $value Void field since we override the usual setField function * @param string $value Void field since we override the usual setField function
*/ */
function currentUserPosition() function currentUserPosition() {
{
return ($this->get("position")); return ($this->get("position"));
} }
@ -156,8 +145,7 @@ class WorkflowArtAllocation extends Item {
* Overriden store function to send mails * Overriden store function to send mails
* @param none * @param none
*/ */
function store() function store() {
{
global $cfg; global $cfg;
$sMailhost = getSystemProperty('system', 'mail_host'); $sMailhost = getSystemProperty('system', 'mail_host');
@ -172,16 +160,14 @@ class WorkflowArtAllocation extends Item {
$oMail->WordWrap = 1000; $oMail->WordWrap = 1000;
$oMail->IsMail(); $oMail->IsMail();
if (array_key_exists("idusersequence",$this->modifiedValues)) if (array_key_exists("idusersequence", $this->modifiedValues)) {
{
$usersequence = new WorkflowUserSequence; $usersequence = new WorkflowUserSequence;
$usersequence->loadByPrimaryKey($this->values["idusersequence"]); $usersequence->loadByPrimaryKey($this->values["idusersequence"]);
$email = $usersequence->get("emailnoti"); $email = $usersequence->get("emailnoti");
$escal = $usersequence->get("escalationnoti"); $escal = $usersequence->get("escalationnoti");
if ($email == 1 || $escal == 1) if ($email == 1 || $escal == 1) {
{
/* Grab the required informations */ /* Grab the required informations */
$curEditor = getGroupOrUserName($usersequence->get("iduser")); $curEditor = getGroupOrUserName($usersequence->get("iduser"));
$idartlang = $this->get("idartlang"); $idartlang = $this->get("idartlang");
@ -193,8 +179,7 @@ class WorkflowArtAllocation extends Item {
$db->query($sql); $db->query($sql);
if ($db->next_record()) if ($db->next_record()) {
{
$idart = $db->f("idart"); $idart = $db->f("idart");
$title = $db->f("title"); $title = $db->f("title");
$author = $db->f("author"); $author = $db->f("author");
@ -204,16 +189,14 @@ class WorkflowArtAllocation extends Item {
$sql = "SELECT idcat FROM " . $cfg["tab"]["cat_art"] . " WHERE idart = '" . Contenido_Security::escapeDB($idart, $db) . "'"; $sql = "SELECT idcat FROM " . $cfg["tab"]["cat_art"] . " WHERE idart = '" . Contenido_Security::escapeDB($idart, $db) . "'";
$db->query($sql); $db->query($sql);
if ($db->next_record()) if ($db->next_record()) {
{
$idcat = $db->f("idcat"); $idcat = $db->f("idcat");
} }
$sql = "SELECT name FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcat = '" . Contenido_Security::escapeDB($idcat, $db) . "'"; $sql = "SELECT name FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcat = '" . Contenido_Security::escapeDB($idcat, $db) . "'";
$db->query($sql); $db->query($sql);
if ($db->next_record()) if ($db->next_record()) {
{
$catname = $db->f("name"); $catname = $db->f("name");
} }
@ -222,8 +205,7 @@ class WorkflowArtAllocation extends Item {
$starttime = strtotime(substr_replace(substr(substr($starttime, 0, 2) . chunk_split(substr($starttime, 2, 6), 2, "-") . chunk_split(substr($starttime, 8), 2, ":"), 0, 19), " ", 10, 1)); $starttime = strtotime(substr_replace(substr(substr($starttime, 0, 2) . chunk_split(substr($starttime, 2, 6), 2, "-") . chunk_split(substr($starttime, 8), 2, ":"), 0, 19), " ", 10, 1));
switch ($timeunit) switch ($timeunit) {
{
case "Seconds": case "Seconds":
$maxtime = $starttime + $timelimit; $maxtime = $starttime + $timelimit;
break; break;
@ -249,8 +231,7 @@ class WorkflowArtAllocation extends Item {
$maxtime = $starttime + $timelimit; $maxtime = $starttime + $timelimit;
} }
if ($email == 1) if ($email == 1) {
{
$email = "Hello %s,\n\n" . $email = "Hello %s,\n\n" .
"you are assigned as the next editor for the Article %s.\n\n" . "you are assigned as the next editor for the Article %s.\n\n" .
"More informations:\n" . "More informations:\n" .
@ -272,14 +253,12 @@ class WorkflowArtAllocation extends Item {
date("Y-m-d H:i:s", $maxtime)); date("Y-m-d H:i:s", $maxtime));
$user = new User; $user = new User;
if (isGroup($usersequence->get("iduser"))) if (isGroup($usersequence->get("iduser"))) {
{
$sql = "select idgroupuser, user_id FROM " . $cfg["tab"]["groupmembers"] . " WHERE $sql = "select idgroupuser, user_id FROM " . $cfg["tab"]["groupmembers"] . " WHERE
group_id = '" . Contenido_Security::escapeDB($usersequence->get("iduser"), $db) . "'"; group_id = '" . Contenido_Security::escapeDB($usersequence->get("iduser"), $db) . "'";
$db->query($sql); $db->query($sql);
while ($db->next_record()) while ($db->next_record()) {
{
$user->loadUserByUserID($db->f("user_id")); $user->loadUserByUserID($db->f("user_id"));
//modified : 2008-06-25 - use php mailer class instead of mail() //modified : 2008-06-25 - use php mailer class instead of mail()
$oMail->AddAddress($user->getField("email"), ""); $oMail->AddAddress($user->getField("email"), "");
@ -287,7 +266,6 @@ class WorkflowArtAllocation extends Item {
$oMail->Body = $filledMail; $oMail->Body = $filledMail;
$oMail->Send(); $oMail->Send();
} }
} else { } else {
$user->loadUserByUserID($usersequence->get("iduser")); $user->loadUserByUserID($usersequence->get("iduser"));
//modified : 2008-06-25 - use php mailer class instead of mail() //modified : 2008-06-25 - use php mailer class instead of mail()
@ -296,7 +274,6 @@ class WorkflowArtAllocation extends Item {
$oMail->Body = $filledMail; $oMail->Body = $filledMail;
$oMail->Send(); $oMail->Send();
} }
} else { } else {
$email = "Hello %s,\n\n" . $email = "Hello %s,\n\n" .
"you are assigned as the escalator for the Article %s.\n\n" . "you are assigned as the escalator for the Article %s.\n\n" .
@ -320,15 +297,13 @@ class WorkflowArtAllocation extends Item {
$user = new User; $user = new User;
if (isGroup($usersequence->get("iduser"))) if (isGroup($usersequence->get("iduser"))) {
{
$sql = "select idgroupuser, user_id FROM " . $cfg["tab"]["groupmembers"] . " WHERE $sql = "select idgroupuser, user_id FROM " . $cfg["tab"]["groupmembers"] . " WHERE
group_id = '" . Contenido_Security::escapeDB($usersequence->get("iduser"), $db) . "'"; group_id = '" . Contenido_Security::escapeDB($usersequence->get("iduser"), $db) . "'";
$db->query($sql); $db->query($sql);
while ($db->next_record()) while ($db->next_record()) {
{
$user->loadUserByUserID($db->f("user_id")); $user->loadUserByUserID($db->f("user_id"));
echo "mail to " . $user->getField("email") . "<br>"; echo "mail to " . $user->getField("email") . "<br>";
//modified : 2008-06-25 - use php mailer class instead of mail() //modified : 2008-06-25 - use php mailer class instead of mail()
@ -337,7 +312,6 @@ class WorkflowArtAllocation extends Item {
$oMail->Body = $filledMail; $oMail->Body = $filledMail;
$oMail->Send(); $oMail->Send();
} }
} else { } else {
$user->loadUserByUserID($usersequence->get("iduser")); $user->loadUserByUserID($usersequence->get("iduser"));
echo "mail to " . $user->getField("email") . "<br>"; echo "mail to " . $user->getField("email") . "<br>";
@ -348,14 +322,11 @@ class WorkflowArtAllocation extends Item {
$oMail->Send(); $oMail->Send();
} }
} }
} }
} }
return parent::store(); return parent::store();
} }
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -25,12 +26,10 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
/** /**
* Class WorkflowTasks * Class WorkflowTasks
* Class for workflow task collections * Class for workflow task collections
@ -44,36 +43,32 @@ class WorkflowTasks extends ItemCollection {
* Constructor Function * Constructor Function
* @param string $table The table to use as information source * @param string $table The table to use as information source
*/ */
function __construct() function __construct() {
{
global $cfg; global $cfg;
parent::__construct($cfg["tab"]["tasks"], "idtask"); parent::__construct($cfg["tab"]["tasks"], "idtask");
$this->_setItemClass("WorkflowTask"); $this->_setItemClass("WorkflowTask");
} }
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowTasks() function WorkflowTasks() {
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct(); $this->__construct();
} }
function create () function create() {
{
$newitem = parent::createNewItem(); $newitem = parent::createNewItem();
return ($newitem); return ($newitem);
} }
function select ($where = "", $group_by = "", $order_by = "", $limit = "") function select($where = "", $group_by = "", $order_by = "", $limit = "") {
{
global $client; global $client;
if ($where != "") if ($where != "") {
{
$where = $where . " AND idclient = '" . Contenido_Security::escapeDB($client, NULL) . "'"; $where = $where . " AND idclient = '" . Contenido_Security::escapeDB($client, NULL) . "'";
} }
return parent::select($where, $group_by, $order_by, $limit); return parent::select($where, $group_by, $order_by, $limit);
} }
} }
/** /**
@ -89,18 +84,17 @@ class WorkflowTask extends Item {
* Constructor Function * Constructor Function
* @param string $table The table to use as information source * @param string $table The table to use as information source
*/ */
function __construct() function __construct() {
{
global $cfg; global $cfg;
parent::__construct($cfg["tab"]["tasks"], "idtask"); parent::__construct($cfg["tab"]["tasks"], "idtask");
} }
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowTask() function WorkflowTask() {
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct(); $this->__construct();
} }
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -25,12 +26,10 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
/** /**
* Class WorkflowUserSequences * Class WorkflowUserSequences
* Class for workflow user sequence management * Class for workflow user sequence management
@ -44,22 +43,19 @@ class WorkflowUserSequences extends ItemCollection {
* Constructor Function * Constructor Function
* @param string $table The table to use as information source * @param string $table The table to use as information source
*/ */
function __construct() function __construct() {
{
global $cfg; global $cfg;
parent::__construct($cfg["tab"]["workflow_user_sequences"], "idusersequence"); parent::__construct($cfg["tab"]["workflow_user_sequences"], "idusersequence");
$this->_setItemClass("WorkflowUserSequence"); $this->_setItemClass("WorkflowUserSequence");
} }
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowUserSequences() function WorkflowUserSequences() {
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct(); $this->__construct();
} }
function delete ($id) function delete($id) {
{
global $cfg, $idworkflow; global $cfg, $idworkflow;
$item = new WorkflowUserSequence; $item = new WorkflowUserSequence;
@ -68,8 +64,7 @@ class WorkflowUserSequences extends ItemCollection {
$pos = $item->get("position"); $pos = $item->get("position");
$idworkflowitem = $item->get("idworkflowitem"); $idworkflowitem = $item->get("idworkflowitem");
$this->select("position > $pos AND idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "'"); $this->select("position > $pos AND idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "'");
while ($obj = $this->next()) while ($obj = $this->next()) {
{
$pos = $obj->get("position") - 1; $pos = $obj->get("position") - 1;
$obj->setPosition($pos); $obj->setPosition($pos);
$obj->store(); $obj->store();
@ -100,14 +95,12 @@ class WorkflowUserSequences extends ItemCollection {
} }
} }
function create ($idworkflowitem) function create($idworkflowitem) {
{
global $auth, $client, $idworkflow; global $auth, $client, $idworkflow;
$newitem = parent::createNewItem(); $newitem = parent::createNewItem();
$workflowitems = new WorkflowItems; $workflowitems = new WorkflowItems;
if (!$workflowitems->exists($idworkflowitem)) if (!$workflowitems->exists($idworkflowitem)) {
{
$this->delete($newitem->getField("idusersequence")); $this->delete($newitem->getField("idusersequence"));
$this->lasterror = i18n("Workflow item doesn't exist. Can't create entry.", "workflow"); $this->lasterror = i18n("Workflow item doesn't exist. Can't create entry.", "workflow");
return false; return false;
@ -117,8 +110,7 @@ class WorkflowUserSequences extends ItemCollection {
$item = $this->next(); $item = $this->next();
if ($item === false) if ($item === false) {
{
$lastPos = 1; $lastPos = 1;
} else { } else {
$lastPos = $item->getField("position") + 1; $lastPos = $item->getField("position") + 1;
@ -131,11 +123,9 @@ class WorkflowUserSequences extends ItemCollection {
return ($newitem); return ($newitem);
} }
function swap ($idworkflowitem, $pos1, $pos2) function swap($idworkflowitem, $pos1, $pos2) {
{
$this->select("idworkflowitem = '$idworkflowitem' AND position = '" . Contenido_Security::escapeDB($pos1, NULL) . "'"); $this->select("idworkflowitem = '$idworkflowitem' AND position = '" . Contenido_Security::escapeDB($pos1, NULL) . "'");
if (($item = $this->next()) === false) if (($item = $this->next()) === false) {
{
$this->lasterror = i18n("Swapping items failed: Item doesn't exist", "workflow"); $this->lasterror = i18n("Swapping items failed: Item doesn't exist", "workflow");
return false; return false;
} }
@ -143,8 +133,7 @@ class WorkflowUserSequences extends ItemCollection {
$pos1ID = $item->getField("idusersequence"); $pos1ID = $item->getField("idusersequence");
$this->select("idworkflowitem = '$idworkflowitem' AND position = '" . Contenido_Security::escapeDB($pos2, NULL) . "'"); $this->select("idworkflowitem = '$idworkflowitem' AND position = '" . Contenido_Security::escapeDB($pos2, NULL) . "'");
if (($item = $this->next()) === false) if (($item = $this->next()) === false) {
{
$this->lasterror(i18n("Swapping items failed: Item doesn't exist", "workflow")); $this->lasterror(i18n("Swapping items failed: Item doesn't exist", "workflow"));
return false; return false;
} }
@ -164,6 +153,7 @@ class WorkflowUserSequences extends ItemCollection {
return (true); return (true);
} }
} }
/** /**
@ -179,15 +169,13 @@ class WorkflowUserSequence extends Item {
* Constructor Function * Constructor Function
* @param string $table The table to use as information source * @param string $table The table to use as information source
*/ */
function __construct() function __construct() {
{
global $cfg; global $cfg;
parent::__construct($cfg["tab"]["workflow_user_sequences"], "idusersequence"); parent::__construct($cfg["tab"]["workflow_user_sequences"], "idusersequence");
} }
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowUserSequence() function WorkflowUserSequence() {
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct(); $this->__construct();
} }
@ -198,12 +186,10 @@ class WorkflowUserSequence extends Item {
* @param string $field Field to set * @param string $field Field to set
* @param string $valie Value to set * @param string $valie Value to set
*/ */
function setField($field, $value, $bSafe = true) function setField($field, $value, $bSafe = true) {
{
global $cfg; global $cfg;
switch ($field) switch ($field) {
{
case "idworkflowitem": case "idworkflowitem":
die("Please use create to modify idsequence. Direct modifications are not allowed"); die("Please use create to modify idsequence. Direct modifications are not allowed");
case "idusersequence": case "idusersequence":
@ -211,28 +197,24 @@ class WorkflowUserSequence extends Item {
case "position": case "position":
die("Please use create and swap to set the position. Direct modifications are not allowed"); die("Please use create and swap to set the position. Direct modifications are not allowed");
case "iduser": case "iduser":
if ($value != 0) if ($value != 0) {
{
$db = new DB_ConLite; $db = new DB_ConLite;
$sql = "SELECT user_id FROM " . $cfg["tab"]["phplib_auth_user_md5"] . $sql = "SELECT user_id FROM " . $cfg["tab"]["phplib_auth_user_md5"] .
" WHERE user_id = '" . Contenido_Security::escapeDB($value, $db) . "'"; " WHERE user_id = '" . Contenido_Security::escapeDB($value, $db) . "'";
$db->query($sql); $db->query($sql);
if (!$db->next_record()) if (!$db->next_record()) {
{
$sql = "SELECT group_id FROM " . $cfg["tab"]["groups"] . $sql = "SELECT group_id FROM " . $cfg["tab"]["groups"] .
" WHERE group_id = '" . Contenido_Security::escapeDB($value, $db) . "'"; " WHERE group_id = '" . Contenido_Security::escapeDB($value, $db) . "'";
$db->query($sql); $db->query($sql);
if (!$db->next_record()) if (!$db->next_record()) {
{
$this->lasterror = i18n("Can't set user_id: User or group doesn't exist", "workflow"); $this->lasterror = i18n("Can't set user_id: User or group doesn't exist", "workflow");
return false; return false;
} }
} }
$idusersquence = parent::getField('idusersequence'); $idusersquence = parent::getField('idusersequence');
} }
} }
parent::setField($field, $value, $bSafe); parent::setField($field, $value, $bSafe);
@ -245,10 +227,8 @@ class WorkflowUserSequence extends Item {
* Returns the associated workflowItem for this user sequence * Returns the associated workflowItem for this user sequence
* @param none * @param none
*/ */
function getWorkflowItem () function getWorkflowItem() {
{ if (!$this->virgin) {
if (!$this->virgin)
{
$workflowItem = new WorkflowItem; $workflowItem = new WorkflowItem;
$workflowItem->loadByPrimaryKey($this->values["idworkflowitem"]); $workflowItem->loadByPrimaryKey($this->values["idworkflowitem"]);
return ($workflowItem); return ($workflowItem);
@ -261,8 +241,7 @@ class WorkflowUserSequence extends Item {
* Interface to set idworkflowitem. Should only be called by "create". * Interface to set idworkflowitem. Should only be called by "create".
* @param string $value The value to set * @param string $value The value to set
*/ */
function setWorkflowItem($value) function setWorkflowItem($value) {
{
parent::setField("idworkflowitem", $value); parent::setField("idworkflowitem", $value);
} }
@ -270,9 +249,10 @@ class WorkflowUserSequence extends Item {
* Interface to set idworkflowitem. Should only be called by "create". * Interface to set idworkflowitem. Should only be called by "create".
* @param string $value The value to set * @param string $value The value to set
*/ */
function setPosition($value) function setPosition($value) {
{
parent::setField("position", $value); parent::setField("position", $value);
} }
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -26,7 +27,6 @@
* }} * }}
* *
*/ */
define('CON_FRAMEWORK', true); define('CON_FRAMEWORK', true);
@ -35,8 +35,6 @@ include_once ('../../../includes/startup.php');
cInclude("includes", "cfg_language_de.inc.php"); cInclude("includes", "cfg_language_de.inc.php");
cInclude("includes", "functions.con.php"); cInclude("includes", "functions.con.php");
plugin_include('workflow', 'classes/class.workflow.php');
plugin_include('workflow', 'includes/functions.workflow.php'); plugin_include('workflow', 'includes/functions.workflow.php');
$workflowartallocations = new WorkflowArtAllocations; $workflowartallocations = new WorkflowArtAllocations;
@ -44,21 +42,18 @@ $workflowusersequences = new WorkflowUserSequences;
$workflowartallocations->select(); $workflowartallocations->select();
while ($obj = $workflowartallocations->next()) while ($obj = $workflowartallocations->next()) {
{
$starttime = $obj->get("starttime"); $starttime = $obj->get("starttime");
$idartlang = $obj->get("idartlang"); $idartlang = $obj->get("idartlang");
$lastidusersequence = $obj->get("lastusersequence"); $lastidusersequence = $obj->get("lastusersequence");
$usersequence = getCurrentUserSequence($idartlang, 0); $usersequence = getCurrentUserSequence($idartlang, 0);
if ($usersequence != $lastidusersequence) if ($usersequence != $lastidusersequence) {
{
$workflowusersequences->select("idusersequence = '$usersequence'"); $workflowusersequences->select("idusersequence = '$usersequence'");
if ($wfobj = $workflowusersequences->next()) if ($wfobj = $workflowusersequences->next()) {
{
$wfitem = $wfobj->get("idworkflowitem"); $wfitem = $wfobj->get("idworkflowitem");
$pos = $wfobj->get("position"); $pos = $wfobj->get("position");
$timeunit = $wfobj->get("timeunit"); $timeunit = $wfobj->get("timeunit");
@ -66,8 +61,7 @@ while ($obj = $workflowartallocations->next())
} }
$starttime = strtotime(substr_replace(substr(substr($starttime, 0, 2) . chunk_split(substr($starttime, 2, 6), 2, "-") . chunk_split(substr($starttime, 8), 2, ":"), 0, 19), " ", 10, 1)); $starttime = strtotime(substr_replace(substr(substr($starttime, 0, 2) . chunk_split(substr($starttime, 2, 6), 2, "-") . chunk_split(substr($starttime, 8), 2, ":"), 0, 19), " ", 10, 1));
switch ($timeunit) switch ($timeunit) {
{
case "Seconds": case "Seconds":
$maxtime = $starttime + $timelimit; $maxtime = $starttime + $timelimit;
break; break;
@ -95,20 +89,15 @@ while ($obj = $workflowartallocations->next())
if ($maxtime < time()) if ($maxtime < time()) {
{
$pos = $pos + 1; $pos = $pos + 1;
$workflowusersequences->select("idworkflowitem = '$wfitem' AND position = '" . Contenido_Security::escapeDB($pos, NULL) . "'"); $workflowusersequences->select("idworkflowitem = '$wfitem' AND position = '" . Contenido_Security::escapeDB($pos, NULL) . "'");
if ($wfobj = $workflowusersequences->next()) if ($wfobj = $workflowusersequences->next()) {
{
$obj->set("idusersequence", $wfobj->get("idusersequence")); $obj->set("idusersequence", $wfobj->get("idusersequence"));
$obj->store(); $obj->store();
} }
} }
} }
} }
?> ?>

Datei anzeigen

@ -0,0 +1,19 @@
<?php
$sAutoloadClassPath = strstr(dirname(dirname(__FILE__)), "conlite/plugins")."/classes/";
return array(
'Workflow' => $sAutoloadClassPath.'class.workflow.php',
'Workflows' => $sAutoloadClassPath.'class.workflow.php',
'WorkflowAction' => $sAutoloadClassPath.'class.workflowactions.php',
'WorkflowActions' => $sAutoloadClassPath.'class.workflowactions.php',
'WorkflowAllocation' => $sAutoloadClassPath.'class.workflowallocation.php',
'WorkflowAllocations' => $sAutoloadClassPath.'class.workflowallocation.php',
'WorkflowArtAllocation' => $sAutoloadClassPath.'class.workflowartallocation.php',
'WorkflowArtAllocations' => $sAutoloadClassPath.'class.workflowartallocation.php',
'WorkflowItem' => $sAutoloadClassPath.'class.workflowitems.php',
'WorkflowItems' => $sAutoloadClassPath.'class.workflowitems.php',
'WorkflowTask' => $sAutoloadClassPath.'class.workflowtasks.php',
'WorkflowTasks' => $sAutoloadClassPath.'class.workflowtasks.php',
'WorkflowUserSequence' => $sAutoloadClassPath.'class.workflowusersequence.php',
'WorkflowUserSequences' => $sAutoloadClassPath.'class.workflowusersequence.php'
);
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -22,36 +23,35 @@
* *
* $Id: config.plugin.php 128 2019-07-03 11:58:28Z oldperl $ * $Id: config.plugin.php 128 2019-07-03 11:58:28Z oldperl $
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
plugin_include('cl-workflow', 'includes/functions.workflow.php');
plugin_include('workflow', 'classes/class.workflow.php'); $sPluginName = 'cl-workflow';
plugin_include('workflow', 'includes/functions.workflow.php');
global $lngAct, $modidartlang; global $lngAct, $modidartlang;
$lngAct["workflow"]["workflow_delete"] = i18n("Delete workflow", "workflow"); $lngAct["workflow"]["workflow_delete"] = i18n("Delete workflow", $sPluginName);
$lngAct["con_workflow"]["workflow_task_user_select"] = i18n("Select workflow task", "workflow"); $lngAct["con_workflow"]["workflow_task_user_select"] = i18n("Select workflow task", $sPluginName);
$lngAct["workflow_common"]["workflow_show"] = i18n("Show workflow", "workflow"); $lngAct["workflow_common"]["workflow_show"] = i18n("Show workflow", $sPluginName);
$lngAct["workflow_common"]["workflow_create"] = i18n("Create workflow", "workflow"); $lngAct["workflow_common"]["workflow_create"] = i18n("Create workflow", $sPluginName);
$lngAct["workflow_common"]["workflow_save"] = i18n("Edit workflow", "workflow"); $lngAct["workflow_common"]["workflow_save"] = i18n("Edit workflow", $sPluginName);
$lngAct["con"]["workflow_do_action"] = i18n("Process workflow step", "workflow"); $lngAct["con"]["workflow_do_action"] = i18n("Process workflow step", $sPluginName);
$lngAct["str"]["workflow_inherit_down"] = i18n("Inherit workflow down", "workflow"); $lngAct["str"]["workflow_inherit_down"] = i18n("Inherit workflow down", $sPluginName);
$lngAct["str"]["workflow_inherit_down"] = i18n("Inherit workflow down", "workflow"); $lngAct["str"]["workflow_inherit_down"] = i18n("Inherit workflow down", $sPluginName);
$lngAct["workflow_steps"]["workflow_step_edit"] = i18n("Edit workflow step", "workflow"); $lngAct["workflow_steps"]["workflow_step_edit"] = i18n("Edit workflow step", $sPluginName);
$lngAct["workflow_steps"]["workflow_step_up"] = i18n("Move workflowstep up", "workflow"); $lngAct["workflow_steps"]["workflow_step_up"] = i18n("Move workflowstep up", $sPluginName);
$lngAct["workflow_steps"]["workflow_step_down"] = i18n("Move workflowstep down", "workflow"); $lngAct["workflow_steps"]["workflow_step_down"] = i18n("Move workflowstep down", $sPluginName);
$lngAct["workflow_steps"]["workflow_save_step"] = i18n("Save Workflowstep", "workflow"); $lngAct["workflow_steps"]["workflow_save_step"] = i18n("Save Workflowstep", $sPluginName);
$lngAct["workflow_steps"]["workflow_create_step"] = i18n("Create workflowstep", "workflow"); $lngAct["workflow_steps"]["workflow_create_step"] = i18n("Create workflowstep", $sPluginName);
$lngAct["workflow_steps"]["workflow_step_delete"] = i18n("Delete workflowstep", "workflow"); $lngAct["workflow_steps"]["workflow_step_delete"] = i18n("Delete workflowstep", $sPluginName);
$lngAct["workflow_steps"]["workflow_user_up"] = i18n("Move workflowstepuser up", "workflow"); $lngAct["workflow_steps"]["workflow_user_up"] = i18n("Move workflowstepuser up", $sPluginName);
$lngAct["workflow_steps"]["workflow_user_down"] = i18n("Move workflowstepuser down", "workflow"); $lngAct["workflow_steps"]["workflow_user_down"] = i18n("Move workflowstepuser down", $sPluginName);
$lngAct["workflow_steps"]["workflow_create_user"] = i18n("Create Workflowstepuser", "workflow"); $lngAct["workflow_steps"]["workflow_create_user"] = i18n("Create Workflowstepuser", $sPluginName);
$lngAct["workflow_steps"]["workflow_user_delete"] = i18n("Delete Workflowstepuser", "workflow"); $lngAct["workflow_steps"]["workflow_user_delete"] = i18n("Delete Workflowstepuser", $sPluginName);
$lngAct["str"]["workflow_cat_assign"] = i18n("Associate workflow with category", "workflow"); $lngAct["str"]["workflow_cat_assign"] = i18n("Associate workflow with category", $sPluginName);
$_cecRegistry->addChainFunction("Contenido.ArticleCategoryList.ListItems", "piworkflowCreateTasksFolder"); $_cecRegistry->addChainFunction("Contenido.ArticleCategoryList.ListItems", "piworkflowCreateTasksFolder");
$_cecRegistry->addChainFunction("Contenido.ArticleList.Columns", "piworkflowProcessArticleColumns"); $_cecRegistry->addChainFunction("Contenido.ArticleList.Columns", "piworkflowProcessArticleColumns");
@ -62,392 +62,10 @@ $_cecRegistry->addChainFunction("Contenido.CategoryList.Columns", "piworkflowCat
$_cecRegistry->addChainFunction("Contenido.CategoryList.RenderColumn", "piworkflowCategoryRenderColumn"); $_cecRegistry->addChainFunction("Contenido.CategoryList.RenderColumn", "piworkflowCategoryRenderColumn");
$_cecRegistry->addChainFunction("Contenido.Frontend.AllowEdit", "piworkflowAllowArticleEdit"); $_cecRegistry->addChainFunction("Contenido.Frontend.AllowEdit", "piworkflowAllowArticleEdit");
function prepareWorkflowItems ()
{
global $action, $lang, $modidcat, $workflowSelectBox, $workflowworkflows, $client, $tpl, $cfg; $cfg["tab"]["workflow"] = $cfg['sql']['sqlprefix'] . "_piwf_workflow";
$cfg["tab"]["workflow_allocation"] = $cfg['sql']['sqlprefix'] . "_piwf_allocation";
$workflowworkflows = new Workflows; $cfg["tab"]["workflow_art_allocation"] = $cfg['sql']['sqlprefix'] . "_piwf_art_allocation";
$cfg["tab"]["workflow_items"] = $cfg['sql']['sqlprefix'] . "_piwf_items";
if ($action === 'workflow_inherit_down') $cfg["tab"]["workflow_user_sequences"] = $cfg['sql']['sqlprefix'] . "_piwf_user_sequences";
{ $cfg["tab"]["workflow_actions"] = $cfg['sql']['sqlprefix'] . "_piwf_actions";
$tmp = strDeeperCategoriesArray($modidcat);
$asworkflow = getWorkflowForCat($modidcat);
$wfa = new WorkflowAllocations;
foreach ($tmp as $tmp_cat)
{
$idcatlang = getCatLang ($tmp_cat, $lang);
if ($asworkflow == 0)
{
$wfa->select("idcatlang = '$idcatlang'");
if ($item = $wfa->next())
{
$wfa->delete($item->get("idallocation"));
# delete user sequences for listing in tasklist for each included article
$oArticles = new ArticleCollection(array('idcat' => $idcatlang, 'start' => true, 'offline' => true));
while ($oArticle = $oArticles->nextArticle()) {
setUserSequence($oArticle->getField('idartlang'), -1);
}
}
} else {
$wfa->select("idcatlang = '$idcatlang'");
if ($item = $wfa->next())
{
$item->setWorkflow($asworkflow);
$item->store();
} else {
$wfa->create($asworkflow, $idcatlang);
# generate user sequences for listing in tasklist for each included article
$oArticles = new ArticleCollection(array('idcat' => $tmp_cat, 'start' => true, 'offline' => true));
while ($oArticle = $oArticles->nextArticle()) {
setUserSequence($oArticle->getField('idartlang'), $asworkflow);
}
}
}
}
}
if ($action == "workflow_cat_assign")
{
$seltpl = "wfselect".$modidcat;
$wfa = new WorkflowAllocations;
$idcatlang = getCatLang($modidcat, $lang);
#associate workflow with category
if ($GLOBALS[$seltpl] != 0)
{
$wfa->select("idcatlang = '$idcatlang'");
if ($item = $wfa->next())
{
$item->setWorkflow($GLOBALS[$seltpl]);
$item->store();
} else {
$wfa->create($GLOBALS[$seltpl], $idcatlang);
}
# generate user sequences for listing in tasklist for each included article
$oArticles = new ArticleCollection(array('idcat' => $modidcat, 'start' => true, 'offline' => true));
while ($oArticle = $oArticles->nextArticle()) {
setUserSequence($oArticle->getField('idartlang'), $GLOBALS[$seltpl]);
}
#unlink workflow with category
} else {
$wfa->select("idcatlang = '$idcatlang'");
if ($item = $wfa->next())
{
$alloc = $item->get("idallocation");
}
$wfa->delete($alloc);
# delete user sequences for listing in tasklist for each included article
$oArticles = new ArticleCollection(array('idcat' => $modidcat, 'start' => true, 'offline' => true));
while ($oArticle = $oArticles->nextArticle()) {
setUserSequence($oArticle->getField('idartlang'), -1);
}
}
}
$workflowSelectBox = new cHTMLSelectElement("foo");
$workflowSelectBox->setClass("text_medium");
$workflowworkflows->select("idclient = '$client' AND idlang = '".Contenido_Security::escapeDB($lang, null)."'");
$workflowOption = new cHTMLOptionElement("--- ".i18n("None", "workflow")." ---", 0);
$workflowSelectBox->addOptionElement(0,$workflowOption);
while ($workflow = $workflowworkflows->next())
{
$workflowOption = new cHTMLOptionElement($workflow->get("name"), $workflow->get("idworkflow"));
$workflowSelectBox->addOptionElement($workflow->get("idworkflow"),$workflowOption);
}
$workflowSelectBox->updateAttributes(array("id" => "wfselect{IDCAT}"));
$workflowSelectBox->updateAttributes(array("name" => "wfselect{IDCAT}"));
$tpl->set('s', 'PLUGIN_WORKFLOW', $workflowSelectBox->render().'<a href="javascript:setWorkflow({IDCAT}, \\\'wfselect{IDCAT}\\\')"><img src="'.$cfg["path"]["images"].'submit.gif" class="spaced"></a>');
$tpl->set('s', 'PLUGIN_WORKFLOW_TRANSLATION', i18n("Inherit workflow down", "workflow"));
}
function piworkflowCategoryRenderColumn ($idcat, $type)
{
switch ($type)
{
case "workflow":
$value = workflowInherit($idcat).'<script type="text/javascript" id="wf'.$idcat.'">printWorkflowSelect('.$idcat.', '.(int)getWorkflowForCat($idcat).');</script>';
break;
}
return ($value);
}
function piworkflowCategoryColumns ($array)
{
prepareWorkflowItems();
$myarray = array("workflow" => i18n("Workflow", "workflow"));
return ($myarray);
}
function piworkflowProcessActions ($array)
{
global $idcat;
$defaultidworkflow = getWorkflowForCat($idcat);
if ($defaultidworkflow != 0)
{
$narray = array("todo",
"wfartconf",
"wftplconf",
"wfonline",
"wflocked",
"duplicate",
"delete",
"usetime");
} else {
$narray = $array;
}
return ($narray);
}
function piworkflowRenderAction ($idcat, $idart, $idartlang, $type)
{
global $area, $frame, $idtpl, $cfg, $alttitle, $tmp_articletitle;
global $tmp_artconf, $onlinelink, $lockedlink, $tplconf_link;
$defaultidworkflow = getWorkflowForCat($idcat);
$idusersequence = getCurrentUserSequence($idartlang,$defaultidworkflow);
$associatedUserSequence = new WorkflowUserSequence;
$associatedUserSequence->loadByPrimaryKey($idusersequence);
$currentEditor = $associatedUserSequence->get("iduser");
$workflowItem = $associatedUserSequence->getWorkflowItem();
if (isCurrentEditor($associatedUserSequence->get("iduser")))
{
/* Query rights for this user */
$wfRights = $workflowItem->getStepRights();
$mayEdit = true;
} else {
$wfRights = "";
$mayEdit = false;
}
switch ($type)
{
case "wfartconf":
if ($wfRights["propertyedit"] == true)
{
return $tmp_artconf;
}
break;
case "wfonline":
if ($wfRights["publish"] == true)
{
return $onlinelink;
}
break;
case "wflocked":
if ($wfRights["lock"] == true)
{
return $lockedlink;
}
break;
case "wftplconf":
if ($wfRights["templateedit"] == true)
{
return $tplconf_link;
}
default:
break;
}
return "";
}
function piworkflowProcessArticleColumns ($array)
{
global $idcat, $action, $modidartlang;
if ($action == "workflow_do_action")
{
$selectedAction = "wfselect".$modidartlang;
doWorkflowAction($modidartlang, $GLOBALS[$selectedAction]);
}
$defaultidworkflow = getWorkflowForCat($idcat);
if ($defaultidworkflow != 0)
{
$narray = array();
$bInserted = false;
foreach ($array as $sKey => $sValue) {
$narray[$sKey] = $sValue;
if ($sKey == 'title' && !$bInserted) {
$narray["wftitle"] = $array["title"];
$narray["wfstep"] = i18n("Workflow Step", "workflow");
$narray["wfaction"] = i18n("Workflow Action", "workflow");
$narray["wfeditor"] = i18n("Workflow Editor", "workflow");
$narray["wflaststatus"] = i18n("Last status", "workflow");
$bInserted = true;
}
}
unset ($narray['title']);
unset ($narray['changeddate']);
unset ($narray['publisheddate']);
unset ($narray['sortorder']);
} else {
$narray = $array;
}
return ($narray);
}
function piworkflowAllowArticleEdit ($idlang, $idcat, $idart, $user)
{
$defaultidworkflow = getWorkflowForCat($idcat);
if ($defaultidworkflow == 0)
{
return true;
}
$idartlang = getArtLang($idart, $idlang);
$idusersequence = getCurrentUserSequence($idartlang,$defaultidworkflow);
$associatedUserSequence = new WorkflowUserSequence;
$associatedUserSequence->loadByPrimaryKey($idusersequence);
$currentEditor = $associatedUserSequence->get("iduser");
$workflowItem = $associatedUserSequence->getWorkflowItem();
if (isCurrentEditor($associatedUserSequence->get("iduser")))
{
$wfRights = $workflowItem->getStepRights();
$mayEdit = true;
} else {
$wfRights = "";
$mayEdit = false;
}
if ($wfRights["articleedit"] == true)
{
return true;
} else {
return false;
}
}
function piworkflowRenderColumn ($idcat, $idart, $idartlang, $column)
{
global $area, $frame, $idtpl, $cfg, $alttitle, $tmp_articletitle;
$defaultidworkflow = getWorkflowForCat($idcat);
$idusersequence = getCurrentUserSequence($idartlang,$defaultidworkflow);
$associatedUserSequence = new WorkflowUserSequence;
$associatedUserSequence->loadByPrimaryKey($idusersequence);
$currentEditor = $associatedUserSequence->get("iduser");
$workflowItem = $associatedUserSequence->getWorkflowItem();
if (isCurrentEditor($associatedUserSequence->get("iduser")))
{
$wfRights = $workflowItem->getStepRights();
$mayEdit = true;
} else {
$wfRights = "";
$mayEdit = false;
}
switch ($column)
{
case "wftitle":
if ($wfRights["articleedit"] == true)
{
$mtitle = $tmp_articletitle;
} else {
$mtitle = strip_tags($tmp_articletitle);
}
return ($mtitle);
case "wfstep":
if ($workflowItem === false)
{
return "nobody";
}
return ($workflowItem->get("position").".) ".$workflowItem->get("name"));
case "wfeditor":
$sEditor = getGroupOrUserName($currentEditor);
if (!$sEditor) {
$sEditor = "nobody";
}
return $sEditor;
case "wfaction":
$defaultidworkflow = getWorkflowForCat($idcat);
$idusersequence = getCurrentUserSequence($idartlang,$defaultidworkflow);
$sActionSelect = getActionSelect($idartlang, $idusersequence);
if (!$sActionSelect) {
$mayEdit = false;
}
$form = new UI_Form("wfaction".$idartlang, "main.php", "get");
$form->setVar("area",$area);
$form->setVar("action","workflow_do_action");
$form->setVar("frame", $frame);
$form->setVar("idcat", $idcat);
$form->setVar("modidartlang", $idartlang);
$form->setVar("idtpl", $idtpl);
$form->add("select", '<table cellspacing="0" border="0"><tr><td>'.$sActionSelect.'</td><td>');
$form->add("button", '<input type="image" src="'.$cfg["path"]["htmlpath"].$cfg["path"]["images"]."submit.gif".'"></tr></table>');
if ($mayEdit == true)
{
return ($form->render(true));
} else {
return '--- ' . i18n("None") . ' ---';
}
case "wflaststatus":
$sStatus = getLastWorkflowStatus($idartlang);
if (!$sStatus) {
$sStatus = '--- ' . i18n("None") . ' ---';
}
return $sStatus;
}
}
function piworkflowCreateTasksFolder ()
{
global $sess, $cfg;
$item = array();
/* Create workflow tasks folder */
$tmp_mstr = '<a href="javascript://" onclick="javascript:conMultiLink(\'%s\', \'%s\', \'%s\', \'%s\')">%s</a>';
$mstr = sprintf($tmp_mstr, 'right_bottom',
$sess->url("main.php?area=con_workflow&frame=4"),
'right_top',
$sess->url("main.php?area=con_workflow&frame=3"),
'Workflow / Todo');
$item["image"] = '<img src="'.$cfg["path"]["contenido_fullhtml"].$cfg["path"]["plugins"].'workflow/images/workflow_erstellen.gif">';
$item["title"] = $mstr;
return ($item);
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -17,16 +18,7 @@
* @license http://www.contenido.org/license/LIZENZ.txt * @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de * @link http://www.4fb.de
* @link http://www.contenido.org * @link http://www.contenido.org
*
* {@internal
* created 2003-07-28
* modified 2009-11-06, Murat Purc, replaced deprecated functions (PHP 5.3 ready)
*
* $Id: functions.workflow.php 128 2019-07-03 11:58:28Z oldperl $
* }}
*
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -34,10 +26,7 @@ if(!defined('CON_FRAMEWORK')) {
cInclude("includes", "functions.con.php"); cInclude("includes", "functions.con.php");
plugin_include('workflow', 'classes/class.workflowitems.php'); function getUsers($listid, $default) {
function getUsers ($listid, $default)
{
global $idclient, $cfg, $auth; global $idclient, $cfg, $auth;
$userlist = new Users; $userlist = new Users;
@ -52,25 +41,21 @@ function getUsers ($listid, $default)
$tpl2->set('d', 'VALUE', 0); $tpl2->set('d', 'VALUE', 0);
$tpl2->set('d', 'CAPTION', '--- ' . i18n("None", "workflow") . ' ---'); $tpl2->set('d', 'CAPTION', '--- ' . i18n("None", "workflow") . ' ---');
if ($default == 0) if ($default == 0) {
{
$tpl2->set('d', 'SELECTED', 'SELECTED'); $tpl2->set('d', 'SELECTED', 'SELECTED');
} else { } else {
$tpl2->set('d', 'SELECTED', ''); $tpl2->set('d', 'SELECTED', '');
} }
$tpl2->next(); $tpl2->next();
if ( is_array($users) ) if (is_array($users)) {
{
foreach ($users as $key => $value) foreach ($users as $key => $value) {
{
$tpl2->set('d', 'VALUE', $key); $tpl2->set('d', 'VALUE', $key);
$tpl2->set('d', 'CAPTION', $value["realname"] . " (" . $value["username"] . ")"); $tpl2->set('d', 'CAPTION', $value["realname"] . " (" . $value["username"] . ")");
if ($default == $key) if ($default == $key) {
{
$tpl2->set('d', 'SELECTED', 'SELECTED'); $tpl2->set('d', 'SELECTED', 'SELECTED');
} else { } else {
$tpl2->set('d', 'SELECTED', ''); $tpl2->set('d', 'SELECTED', '');
@ -85,17 +70,14 @@ function getUsers ($listid, $default)
$tpl2->set('d', 'SELECTED', 'disabled'); $tpl2->set('d', 'SELECTED', 'disabled');
$tpl2->next(); $tpl2->next();
if ( is_array($groups) ) if (is_array($groups)) {
{
foreach ($groups as $key => $value) foreach ($groups as $key => $value) {
{
$tpl2->set('d', 'VALUE', $key); $tpl2->set('d', 'VALUE', $key);
$tpl2->set('d', 'CAPTION', $value["groupname"]); $tpl2->set('d', 'CAPTION', $value["groupname"]);
if ($default == $key) if ($default == $key) {
{
$tpl2->set('d', 'SELECTED', 'SELECTED'); $tpl2->set('d', 'SELECTED', 'SELECTED');
} else { } else {
$tpl2->set('d', 'SELECTED', ''); $tpl2->set('d', 'SELECTED', '');
@ -103,21 +85,17 @@ function getUsers ($listid, $default)
$tpl2->next(); $tpl2->next();
} }
} }
return $tpl2->generate($cfg['path']['templates'] . $cfg['templates']['generic_select'], true); return $tpl2->generate($cfg['path']['templates'] . $cfg['templates']['generic_select'], true);
} }
function isCurrentEditor ($uid) function isCurrentEditor($uid) {
{
global $auth, $cfg; global $auth, $cfg;
/* Check if the UID is a group. If yes, check if we are in it */ /* Check if the UID is a group. If yes, check if we are in it */
$user = new User; $user = new User;
if ($user->loadUserByUserID($uid) == false) if ($user->loadUserByUserID($uid) == false) {
{
$db2 = new DB_ConLite; $db2 = new DB_ConLite;
/* Yes, it's a group. Let's try to load the group members! */ /* Yes, it's a group. Let's try to load the group members! */
@ -127,16 +105,13 @@ function isCurrentEditor ($uid)
$db2->query($sql); $db2->query($sql);
while ($db2->next_record()) while ($db2->next_record()) {
{ if ($db2->f("user_id") == $auth->auth["uid"]) {
if ($db2->f("user_id") == $auth->auth["uid"])
{
return true; return true;
} }
} }
} else { } else {
if ($uid == $auth->auth["uid"]) if ($uid == $auth->auth["uid"]) {
{
return true; return true;
} }
} }
@ -144,8 +119,7 @@ function isCurrentEditor ($uid)
return false; return false;
} }
function getActionSelect ($idartlang, $idusersequence) function getActionSelect($idartlang, $idusersequence) {
{
global $cfg; global $cfg;
$workflowActions = new WorkflowActions; $workflowActions = new WorkflowActions;
@ -161,8 +135,7 @@ function getActionSelect ($idartlang, $idusersequence)
$workflowItem = $userSequence->getWorkflowItem(); $workflowItem = $userSequence->getWorkflowItem();
if ($workflowItem === false) if ($workflowItem === false) {
{
return; return;
} }
@ -171,14 +144,12 @@ function getActionSelect ($idartlang, $idusersequence)
$artAllocation = new WorkflowArtAllocations; $artAllocation = new WorkflowArtAllocations;
$artAllocation->select("idartlang = '$idartlang'"); $artAllocation->select("idartlang = '$idartlang'");
if ($obj = $artAllocation->next()) if ($obj = $artAllocation->next()) {
{
$laststep = $obj->get("lastusersequence"); $laststep = $obj->get("lastusersequence");
} }
$bExistOption = false; $bExistOption = false;
if ($laststep != $idusersequence) if ($laststep != $idusersequence) {
{
$wfSelect->set('d', 'VALUE', 'next'); $wfSelect->set('d', 'VALUE', 'next');
$wfSelect->set('d', 'CAPTION', i18n("Confirm", "workflow")); $wfSelect->set('d', 'CAPTION', i18n("Confirm", "workflow"));
$wfSelect->set('d', 'SELECTED', 'SELECTED'); $wfSelect->set('d', 'SELECTED', 'SELECTED');
@ -186,8 +157,7 @@ function getActionSelect ($idartlang, $idusersequence)
$bExistOption = true; $bExistOption = true;
} }
if ($wfRights["last"] == true) if ($wfRights["last"] == true) {
{
$wfSelect->set('d', 'VALUE', 'last'); $wfSelect->set('d', 'VALUE', 'last');
$wfSelect->set('d', 'CAPTION', i18n("Back to last editor", "workflow")); $wfSelect->set('d', 'CAPTION', i18n("Back to last editor", "workflow"));
$wfSelect->set('d', 'SELECTED', ''); $wfSelect->set('d', 'SELECTED', '');
@ -195,8 +165,7 @@ function getActionSelect ($idartlang, $idusersequence)
$bExistOption = true; $bExistOption = true;
} }
if ($wfRights["reject"] == true) if ($wfRights["reject"] == true) {
{
$wfSelect->set('d', 'VALUE', 'reject'); $wfSelect->set('d', 'VALUE', 'reject');
$wfSelect->set('d', 'CAPTION', i18n("Reject article", "workflow")); $wfSelect->set('d', 'CAPTION', i18n("Reject article", "workflow"));
$wfSelect->set('d', 'SELECTED', ''); $wfSelect->set('d', 'SELECTED', '');
@ -204,8 +173,7 @@ function getActionSelect ($idartlang, $idusersequence)
$bExistOption = true; $bExistOption = true;
} }
if ($wfRights["revise"] == true) if ($wfRights["revise"] == true) {
{
$wfSelect->set('d', 'VALUE', 'revise'); $wfSelect->set('d', 'VALUE', 'revise');
$wfSelect->set('d', 'CAPTION', i18n("Revise article", "workflow")); $wfSelect->set('d', 'CAPTION', i18n("Revise article", "workflow"));
$wfSelect->set('d', 'SELECTED', ''); $wfSelect->set('d', 'SELECTED', '');
@ -221,13 +189,13 @@ function getActionSelect ($idartlang, $idusersequence)
} }
#function for inserting todos in wokflow_art_allocation used, when a workflow is associated with a category in content->category #function for inserting todos in wokflow_art_allocation used, when a workflow is associated with a category in content->category
function setUserSequence($idartlang, $defaultidworkflow) { function setUserSequence($idartlang, $defaultidworkflow) {
$wfaa = new WorkflowArtAllocations; $wfaa = new WorkflowArtAllocations;
$wfaa->select("idartlang = '$idartlang'"); $wfaa->select("idartlang = '$idartlang'");
$idusersequence = 0; $idusersequence = 0;
if ($associatedUserSequence = $wfaa->next()) if ($associatedUserSequence = $wfaa->next()) {
{
$idartallocation = $associatedUserSequence->get("idartallocation"); $idartallocation = $associatedUserSequence->get("idartallocation");
$wfaa->delete($idartallocation); $wfaa->delete($idartallocation);
} }
@ -235,8 +203,7 @@ function setUserSequence ($idartlang, $defaultidworkflow) {
if ($defaultidworkflow != -1) { if ($defaultidworkflow != -1) {
$newObj = $wfaa->create($idartlang); $newObj = $wfaa->create($idartlang);
if (!$newObj) if (!$newObj) {
{
/* Try to load */ /* Try to load */
$newObj = new WorkflowArtAllocation; $newObj = new WorkflowArtAllocation;
@ -248,16 +215,14 @@ function setUserSequence ($idartlang, $defaultidworkflow) {
$workflowItems = new WorkflowItems; $workflowItems = new WorkflowItems;
$workflowItems->select("idworkflow = '$defaultidworkflow' AND position = '1'"); $workflowItems->select("idworkflow = '$defaultidworkflow' AND position = '1'");
if ($obj = $workflowItems->next()) if ($obj = $workflowItems->next()) {
{
$firstitem = $obj->get("idworkflowitem"); $firstitem = $obj->get("idworkflowitem");
} }
$workflowUserSequences = new WorkflowUserSequences; $workflowUserSequences = new WorkflowUserSequences;
$workflowUserSequences->select("idworkflowitem = '$firstitem' AND position = '1'"); $workflowUserSequences->select("idworkflowitem = '$firstitem' AND position = '1'");
if ($obj = $workflowUserSequences->next()) if ($obj = $workflowUserSequences->next()) {
{
$firstIDUserSequence = $obj->get("idusersequence"); $firstIDUserSequence = $obj->get("idusersequence");
} }
@ -269,27 +234,22 @@ function setUserSequence ($idartlang, $defaultidworkflow) {
} }
} }
function getCurrentUserSequence ($idartlang, $defaultidworkflow) function getCurrentUserSequence($idartlang, $defaultidworkflow) {
{
$wfaa = new WorkflowArtAllocations; $wfaa = new WorkflowArtAllocations;
$wfaa->select("idartlang = '$idartlang'"); $wfaa->select("idartlang = '$idartlang'");
$idusersequence = 0; $idusersequence = 0;
if ($associatedUserSequence = $wfaa->next()) if ($associatedUserSequence = $wfaa->next()) {
{
$idusersequence = $associatedUserSequence->get("idusersequence"); $idusersequence = $associatedUserSequence->get("idusersequence");
} }
if ($idusersequence == 0) if ($idusersequence == 0) {
{ if ($associatedUserSequence != false) {
if ($associatedUserSequence != false)
{
$newObj = $associatedUserSequence; $newObj = $associatedUserSequence;
} else { } else {
$newObj = $wfaa->create($idartlang); $newObj = $wfaa->create($idartlang);
if (!$newObj) if (!$newObj) {
{
/* Try to load */ /* Try to load */
$newObj = new WorkflowArtAllocation; $newObj = new WorkflowArtAllocation;
@ -302,16 +262,14 @@ function getCurrentUserSequence ($idartlang, $defaultidworkflow)
$workflowItems = new WorkflowItems; $workflowItems = new WorkflowItems;
$workflowItems->select("idworkflow = '$defaultidworkflow' AND position = '1'"); $workflowItems->select("idworkflow = '$defaultidworkflow' AND position = '1'");
if ($obj = $workflowItems->next()) if ($obj = $workflowItems->next()) {
{
$firstitem = $obj->get("idworkflowitem"); $firstitem = $obj->get("idworkflowitem");
} }
$workflowUserSequences = new WorkflowUserSequences; $workflowUserSequences = new WorkflowUserSequences;
$workflowUserSequences->select("idworkflowitem = '$firstitem' AND position = '1'"); $workflowUserSequences->select("idworkflowitem = '$firstitem' AND position = '1'");
if ($obj = $workflowUserSequences->next()) if ($obj = $workflowUserSequences->next()) {
{
$firstIDUserSequence = $obj->get("idusersequence"); $firstIDUserSequence = $obj->get("idusersequence");
} }
@ -325,21 +283,18 @@ function getCurrentUserSequence ($idartlang, $defaultidworkflow)
return ($idusersequence); return ($idusersequence);
} }
function getLastWorkflowStatus ($idartlang) function getLastWorkflowStatus($idartlang) {
{
$wfaa = new WorkflowArtAllocations; $wfaa = new WorkflowArtAllocations;
$wfaa->select("idartlang = '$idartlang'"); $wfaa->select("idartlang = '$idartlang'");
if ($associatedUserSequence = $wfaa->next()) if ($associatedUserSequence = $wfaa->next()) {
{
$laststatus = $associatedUserSequence->get("laststatus"); $laststatus = $associatedUserSequence->get("laststatus");
} else { } else {
return false; return false;
} }
switch ($laststatus) switch ($laststatus) {
{
case "reject": case "reject":
return (i18n("Rejected", "workflow")); return (i18n("Rejected", "workflow"));
break; break;
@ -359,18 +314,15 @@ function getLastWorkflowStatus ($idartlang)
return (""); return ("");
} }
function doWorkflowAction ($idartlang, $action) function doWorkflowAction($idartlang, $action) {
{
global $cfg, $idcat; global $cfg, $idcat;
switch ($action) switch ($action) {
{
case "last": case "last":
$artAllocations = new WorkflowArtAllocations; $artAllocations = new WorkflowArtAllocations;
$artAllocations->select("idartlang = '$idartlang'"); $artAllocations->select("idartlang = '$idartlang'");
if ($obj = $artAllocations->next()) if ($obj = $artAllocations->next()) {
{
$usersequence = new WorkflowUserSequence; $usersequence = new WorkflowUserSequence;
$usersequence->loadByPrimaryKey($obj->get("idusersequence")); $usersequence->loadByPrimaryKey($obj->get("idusersequence"));
@ -379,22 +331,19 @@ function doWorkflowAction ($idartlang, $action)
$idworkflow = $workflowitem->get("idworkflow"); $idworkflow = $workflowitem->get("idworkflow");
$newpos = $workflowitem->get("position") - 1; $newpos = $workflowitem->get("position") - 1;
if ($newpos < 1) if ($newpos < 1) {
{
$newpos = 1; $newpos = 1;
} }
$workflowitems = new WorkflowItems; $workflowitems = new WorkflowItems;
$workflowitems->select("idworkflow = '$idworkflow' AND position = '" . Contenido_Security::escapeDB($newpos, NULL) . "'"); $workflowitems->select("idworkflow = '$idworkflow' AND position = '" . Contenido_Security::escapeDB($newpos, NULL) . "'");
if ($nextObj = $workflowitems->next()) if ($nextObj = $workflowitems->next()) {
{
$userSequences = new WorkflowUserSequences; $userSequences = new WorkflowUserSequences;
$idworkflowitem = $nextObj->get("idworkflowitem"); $idworkflowitem = $nextObj->get("idworkflowitem");
$userSequences->select("idworkflowitem = '$idworkflowitem'"); $userSequences->select("idworkflowitem = '$idworkflowitem'");
if ($nextSeqObj = $userSequences->next()) if ($nextSeqObj = $userSequences->next()) {
{
$obj->set("lastusersequence", $obj->get("idusersequence")); $obj->set("lastusersequence", $obj->get("idusersequence"));
$obj->set("idusersequence", $nextSeqObj->get("idusersequence")); $obj->set("idusersequence", $nextSeqObj->get("idusersequence"));
$obj->set("laststatus", "last"); $obj->set("laststatus", "last");
@ -407,8 +356,7 @@ function doWorkflowAction ($idartlang, $action)
$artAllocations = new WorkflowArtAllocations; $artAllocations = new WorkflowArtAllocations;
$artAllocations->select("idartlang = '$idartlang'"); $artAllocations->select("idartlang = '$idartlang'");
if ($obj = $artAllocations->next()) if ($obj = $artAllocations->next()) {
{
$usersequence = new WorkflowUserSequence; $usersequence = new WorkflowUserSequence;
$usersequence->loadByPrimaryKey($obj->get("idusersequence")); $usersequence->loadByPrimaryKey($obj->get("idusersequence"));
@ -420,14 +368,12 @@ function doWorkflowAction ($idartlang, $action)
$workflowitems = new WorkflowItems; $workflowitems = new WorkflowItems;
$workflowitems->select("idworkflow = '$idworkflow' AND position = '" . Contenido_Security::escapeDB($newpos, NULL) . "'"); $workflowitems->select("idworkflow = '$idworkflow' AND position = '" . Contenido_Security::escapeDB($newpos, NULL) . "'");
if ($nextObj = $workflowitems->next()) if ($nextObj = $workflowitems->next()) {
{
$userSequences = new WorkflowUserSequences; $userSequences = new WorkflowUserSequences;
$idworkflowitem = $nextObj->get("idworkflowitem"); $idworkflowitem = $nextObj->get("idworkflowitem");
$userSequences->select("idworkflowitem = '$idworkflowitem'"); $userSequences->select("idworkflowitem = '$idworkflowitem'");
if ($nextSeqObj = $userSequences->next()) if ($nextSeqObj = $userSequences->next()) {
{
$obj->set("lastusersequence", '10'); $obj->set("lastusersequence", '10');
$obj->set("idusersequence", $nextSeqObj->get("idusersequence")); $obj->set("idusersequence", $nextSeqObj->get("idusersequence"));
$obj->set("laststatus", "confirm"); $obj->set("laststatus", "confirm");
@ -435,14 +381,12 @@ function doWorkflowAction ($idartlang, $action)
} }
} else { } else {
$workflowitems->select("idworkflow = '$idworkflow' AND position = '" . Contenido_Security::escapeDB($workflowitem->get("position"), NULL) . "'"); $workflowitems->select("idworkflow = '$idworkflow' AND position = '" . Contenido_Security::escapeDB($workflowitem->get("position"), NULL) . "'");
if ($nextObj = $workflowitems->next()) if ($nextObj = $workflowitems->next()) {
{
$userSequences = new WorkflowUserSequences; $userSequences = new WorkflowUserSequences;
$idworkflowitem = $nextObj->get("idworkflowitem"); $idworkflowitem = $nextObj->get("idworkflowitem");
$userSequences->select("idworkflowitem = '$idworkflowitem'"); $userSequences->select("idworkflowitem = '$idworkflowitem'");
if ($nextSeqObj = $userSequences->next()) if ($nextSeqObj = $userSequences->next()) {
{
$obj->set("lastusersequence", $obj->get("idusersequence")); $obj->set("lastusersequence", $obj->get("idusersequence"));
$obj->set("idusersequence", $nextSeqObj->get("idusersequence")); $obj->set("idusersequence", $nextSeqObj->get("idusersequence"));
$obj->set("laststatus", "confirm"); $obj->set("laststatus", "confirm");
@ -450,15 +394,13 @@ function doWorkflowAction ($idartlang, $action)
} }
} }
} }
} }
break; break;
case "reject": case "reject":
$artAllocations = new WorkflowArtAllocations; $artAllocations = new WorkflowArtAllocations;
$artAllocations->select("idartlang = '$idartlang'"); $artAllocations->select("idartlang = '$idartlang'");
if ($obj = $artAllocations->next()) if ($obj = $artAllocations->next()) {
{
$usersequence = new WorkflowUserSequence; $usersequence = new WorkflowUserSequence;
$usersequence->loadByPrimaryKey($obj->get("idusersequence")); $usersequence->loadByPrimaryKey($obj->get("idusersequence"));
@ -470,14 +412,12 @@ function doWorkflowAction ($idartlang, $action)
$workflowitems = new WorkflowItems; $workflowitems = new WorkflowItems;
$workflowitems->select("idworkflow = '$idworkflow' AND position = '" . Contenido_Security::escapeDB($newpos, NULL) . "'"); $workflowitems->select("idworkflow = '$idworkflow' AND position = '" . Contenido_Security::escapeDB($newpos, NULL) . "'");
if ($nextObj = $workflowitems->next()) if ($nextObj = $workflowitems->next()) {
{
$userSequences = new WorkflowUserSequences; $userSequences = new WorkflowUserSequences;
$idworkflowitem = $nextObj->get("idworkflowitem"); $idworkflowitem = $nextObj->get("idworkflowitem");
$userSequences->select("idworkflowitem = '$idworkflowitem'"); $userSequences->select("idworkflowitem = '$idworkflowitem'");
if ($nextSeqObj = $userSequences->next()) if ($nextSeqObj = $userSequences->next()) {
{
$obj->set("lastusersequence", $obj->get("idusersequence")); $obj->set("lastusersequence", $obj->get("idusersequence"));
$obj->set("idusersequence", $nextSeqObj->get("idusersequence")); $obj->set("idusersequence", $nextSeqObj->get("idusersequence"));
$obj->set("laststatus", "reject"); $obj->set("laststatus", "reject");
@ -502,30 +442,26 @@ function doWorkflowAction ($idartlang, $action)
} }
} }
function getWorkflowForUserSequence ($usersequence) function getWorkflowForUserSequence($usersequence) {
{
$usersequences = new WorkflowUserSequences; $usersequences = new WorkflowUserSequences;
$workflowitems = new WorkflowItems; $workflowitems = new WorkflowItems;
$usersequences->select("idusersequence = '$usersequence'"); $usersequences->select("idusersequence = '$usersequence'");
if ($obj = $usersequences->next()) if ($obj = $usersequences->next()) {
{
$idworkflowitem = $obj->get("idworkflowitem"); $idworkflowitem = $obj->get("idworkflowitem");
} else { } else {
return false; return false;
} }
$workflowitems->select("idworkflowitem = '$idworkflowitem'"); $workflowitems->select("idworkflowitem = '$idworkflowitem'");
if ($obj = $workflowitems->next()) if ($obj = $workflowitems->next()) {
{
return $obj->get("idworkflow"); return $obj->get("idworkflow");
} else { } else {
return false; return false;
} }
} }
function workflowSelect ($listid, $default, $idcat) function workflowSelect($listid, $default, $idcat) {
{
global $idclient, $cfg, $frame, $area, $workflowworkflows, $client, $lang, $wfcache, $workflowSelectBox; global $idclient, $cfg, $frame, $area, $workflowworkflows, $client, $lang, $wfcache, $workflowSelectBox;
$oSelectBox = new cHTMLSelectElement('workflow'); $oSelectBox = new cHTMLSelectElement('workflow');
@ -541,12 +477,395 @@ function workflowSelect ($listid, $default, $idcat)
return $workflowSelectBox->render() . $sButton; return $workflowSelectBox->render() . $sButton;
} }
function workflowInherit ($idcat) function workflowInherit($idcat) {
{
global $idclient, $cfg, $frame, $area, $workflowworkflows, $sess; global $idclient, $cfg, $frame, $area, $workflowworkflows, $sess;
$sUrl = $sess->url("main.php?area=$area&frame=$frame&modidcat=$idcat&action=workflow_inherit_down"); $sUrl = $sess->url("main.php?area=$area&frame=$frame&modidcat=$idcat&action=workflow_inherit_down");
$sButton = '<a href="' . $sUrl . '"><img src="' . $cfg["path"]["images"] . 'pfeil_runter.gif" class="spaced"></a>'; $sButton = '<a href="' . $sUrl . '"><img src="' . $cfg["path"]["images"] . 'pfeil_runter.gif" class="spaced"></a>';
return $sButton; return $sButton;
} }
?> /* Helper functions */
function getWorkflowForCat($idcat) {
global $lang, $cfg;
$idcatlang = getCatLang($idcat, $lang);
$workflows = new WorkflowAllocations;
$workflows->select("idcatlang = '$idcatlang'");
if ($obj = $workflows->next()) {
/* Sanity: Check if the workflow still exists */
$workflow = new Workflow;
$res = $workflow->loadByPrimaryKey($obj->get("idworkflow"));
if ($res == false) {
return 0;
} else {
return $obj->get("idworkflow");
}
}
}
function getCatLang($idcat, $idlang) {
global $lang, $cfg;
$db = new DB_ConLite;
/* Get the idcatlang */
$sql = "SELECT idcatlang FROM "
. $cfg["tab"]["cat_lang"] .
" WHERE idlang = '" . Contenido_Security::escapeDB($idlang, $db) . "' AND
idcat = '" . Contenido_Security::escapeDB($idcat, $db) . "'";
$db->query($sql);
if ($db->next_record()) {
return ($db->f("idcatlang"));
}
}
function prepareWorkflowItems() {
global $action, $lang, $modidcat, $workflowSelectBox, $workflowworkflows, $client, $tpl, $cfg;
$workflowworkflows = new Workflows;
if ($action === 'workflow_inherit_down') {
$tmp = strDeeperCategoriesArray($modidcat);
$asworkflow = getWorkflowForCat($modidcat);
$wfa = new WorkflowAllocations;
foreach ($tmp as $tmp_cat) {
$idcatlang = getCatLang($tmp_cat, $lang);
if ($asworkflow == 0) {
$wfa->select("idcatlang = '$idcatlang'");
if ($item = $wfa->next()) {
$wfa->delete($item->get("idallocation"));
# delete user sequences for listing in tasklist for each included article
$oArticles = new ArticleCollection(array('idcat' => $idcatlang, 'start' => true, 'offline' => true));
while ($oArticle = $oArticles->nextArticle()) {
setUserSequence($oArticle->getField('idartlang'), -1);
}
}
} else {
$wfa->select("idcatlang = '$idcatlang'");
if ($item = $wfa->next()) {
$item->setWorkflow($asworkflow);
$item->store();
} else {
$wfa->create($asworkflow, $idcatlang);
# generate user sequences for listing in tasklist for each included article
$oArticles = new ArticleCollection(array('idcat' => $tmp_cat, 'start' => true, 'offline' => true));
while ($oArticle = $oArticles->nextArticle()) {
setUserSequence($oArticle->getField('idartlang'), $asworkflow);
}
}
}
}
}
if ($action == "workflow_cat_assign") {
$seltpl = "wfselect" . $modidcat;
$wfa = new WorkflowAllocations;
$idcatlang = getCatLang($modidcat, $lang);
#associate workflow with category
if ($GLOBALS[$seltpl] != 0) {
$wfa->select("idcatlang = '$idcatlang'");
if ($item = $wfa->next()) {
$item->setWorkflow($GLOBALS[$seltpl]);
$item->store();
} else {
$wfa->create($GLOBALS[$seltpl], $idcatlang);
}
# generate user sequences for listing in tasklist for each included article
$oArticles = new ArticleCollection(array('idcat' => $modidcat, 'start' => true, 'offline' => true));
while ($oArticle = $oArticles->nextArticle()) {
setUserSequence($oArticle->getField('idartlang'), $GLOBALS[$seltpl]);
}
#unlink workflow with category
} else {
$wfa->select("idcatlang = '$idcatlang'");
if ($item = $wfa->next()) {
$alloc = $item->get("idallocation");
}
$wfa->delete($alloc);
# delete user sequences for listing in tasklist for each included article
$oArticles = new ArticleCollection(array('idcat' => $modidcat, 'start' => true, 'offline' => true));
while ($oArticle = $oArticles->nextArticle()) {
setUserSequence($oArticle->getField('idartlang'), -1);
}
}
}
$workflowSelectBox = new cHTMLSelectElement("foo");
$workflowSelectBox->setClass("text_medium");
$workflowworkflows->select("idclient = '$client' AND idlang = '" . Contenido_Security::escapeDB($lang, null) . "'");
$workflowOption = new cHTMLOptionElement("--- " . i18n("None", "workflow") . " ---", 0);
$workflowSelectBox->addOptionElement(0, $workflowOption);
while ($workflow = $workflowworkflows->next()) {
$workflowOption = new cHTMLOptionElement($workflow->get("name"), $workflow->get("idworkflow"));
$workflowSelectBox->addOptionElement($workflow->get("idworkflow"), $workflowOption);
}
$workflowSelectBox->updateAttributes(array("id" => "wfselect{IDCAT}"));
$workflowSelectBox->updateAttributes(array("name" => "wfselect{IDCAT}"));
$tpl->set('s', 'PLUGIN_WORKFLOW', $workflowSelectBox->render() . '<a href="javascript:setWorkflow({IDCAT}, \\\'wfselect{IDCAT}\\\')"><img src="' . $cfg["path"]["images"] . 'submit.gif" class="spaced"></a>');
$tpl->set('s', 'PLUGIN_WORKFLOW_TRANSLATION', i18n("Inherit workflow down", "workflow"));
}
function piworkflowCategoryRenderColumn($idcat, $type) {
switch ($type) {
case "workflow":
$value = workflowInherit($idcat) . '<script type="text/javascript" id="wf' . $idcat . '">printWorkflowSelect(' . $idcat . ', ' . (int) getWorkflowForCat($idcat) . ');</script>';
break;
}
return ($value);
}
function piworkflowCategoryColumns($array) {
prepareWorkflowItems();
$myarray = array("workflow" => i18n("Workflow", "workflow"));
return ($myarray);
}
function piworkflowProcessActions($array) {
global $idcat;
$defaultidworkflow = getWorkflowForCat($idcat);
if ($defaultidworkflow != 0) {
$narray = array("todo",
"wfartconf",
"wftplconf",
"wfonline",
"wflocked",
"duplicate",
"delete",
"usetime");
} else {
$narray = $array;
}
return ($narray);
}
function piworkflowRenderAction($idcat, $idart, $idartlang, $type) {
global $area, $frame, $idtpl, $cfg, $alttitle, $tmp_articletitle;
global $tmp_artconf, $onlinelink, $lockedlink, $tplconf_link;
$defaultidworkflow = getWorkflowForCat($idcat);
$idusersequence = getCurrentUserSequence($idartlang, $defaultidworkflow);
$associatedUserSequence = new WorkflowUserSequence;
$associatedUserSequence->loadByPrimaryKey($idusersequence);
$currentEditor = $associatedUserSequence->get("iduser");
$workflowItem = $associatedUserSequence->getWorkflowItem();
if (isCurrentEditor($associatedUserSequence->get("iduser"))) {
/* Query rights for this user */
$wfRights = $workflowItem->getStepRights();
$mayEdit = true;
} else {
$wfRights = "";
$mayEdit = false;
}
switch ($type) {
case "wfartconf":
if ($wfRights["propertyedit"] == true) {
return $tmp_artconf;
}
break;
case "wfonline":
if ($wfRights["publish"] == true) {
return $onlinelink;
}
break;
case "wflocked":
if ($wfRights["lock"] == true) {
return $lockedlink;
}
break;
case "wftplconf":
if ($wfRights["templateedit"] == true) {
return $tplconf_link;
}
default:
break;
}
return "";
}
function piworkflowProcessArticleColumns($array) {
global $idcat, $action, $modidartlang;
if ($action == "workflow_do_action") {
$selectedAction = "wfselect" . $modidartlang;
doWorkflowAction($modidartlang, $GLOBALS[$selectedAction]);
}
$defaultidworkflow = getWorkflowForCat($idcat);
if ($defaultidworkflow != 0) {
$narray = array();
$bInserted = false;
foreach ($array as $sKey => $sValue) {
$narray[$sKey] = $sValue;
if ($sKey == 'title' && !$bInserted) {
$narray["wftitle"] = $array["title"];
$narray["wfstep"] = i18n("Workflow Step", "cl-workflow");
$narray["wfaction"] = i18n("Workflow Action", "cl-workflow");
$narray["wfeditor"] = i18n("Workflow Editor", "cl-workflow");
$narray["wflaststatus"] = i18n("Last status", "cl-workflow");
$bInserted = true;
}
}
unset($narray['title']);
unset($narray['changeddate']);
unset($narray['publisheddate']);
unset($narray['sortorder']);
} else {
$narray = $array;
}
return ($narray);
}
function piworkflowAllowArticleEdit($idlang, $idcat, $idart, $user) {
$defaultidworkflow = getWorkflowForCat($idcat);
if ($defaultidworkflow == 0) {
return true;
}
$idartlang = getArtLang($idart, $idlang);
$idusersequence = getCurrentUserSequence($idartlang, $defaultidworkflow);
$associatedUserSequence = new WorkflowUserSequence;
$associatedUserSequence->loadByPrimaryKey($idusersequence);
$currentEditor = $associatedUserSequence->get("iduser");
$workflowItem = $associatedUserSequence->getWorkflowItem();
if (isCurrentEditor($associatedUserSequence->get("iduser"))) {
$wfRights = $workflowItem->getStepRights();
$mayEdit = true;
} else {
$wfRights = "";
$mayEdit = false;
}
if ($wfRights["articleedit"] == true) {
return true;
} else {
return false;
}
}
function piworkflowRenderColumn($idcat, $idart, $idartlang, $column) {
global $area, $frame, $idtpl, $cfg, $alttitle, $tmp_articletitle;
$defaultidworkflow = getWorkflowForCat($idcat);
$idusersequence = getCurrentUserSequence($idartlang, $defaultidworkflow);
$associatedUserSequence = new WorkflowUserSequence;
$associatedUserSequence->loadByPrimaryKey($idusersequence);
$currentEditor = $associatedUserSequence->get("iduser");
$workflowItem = $associatedUserSequence->getWorkflowItem();
if (isCurrentEditor($associatedUserSequence->get("iduser"))) {
$wfRights = $workflowItem->getStepRights();
$mayEdit = true;
} else {
$wfRights = "";
$mayEdit = false;
}
switch ($column) {
case "wftitle":
if ($wfRights["articleedit"] == true) {
$mtitle = $tmp_articletitle;
} else {
$mtitle = strip_tags($tmp_articletitle);
}
return ($mtitle);
case "wfstep":
if ($workflowItem === false) {
return "nobody";
}
return ($workflowItem->get("position") . ".) " . $workflowItem->get("name"));
case "wfeditor":
$sEditor = getGroupOrUserName($currentEditor);
if (!$sEditor) {
$sEditor = "nobody";
}
return $sEditor;
case "wfaction":
$defaultidworkflow = getWorkflowForCat($idcat);
$idusersequence = getCurrentUserSequence($idartlang, $defaultidworkflow);
$sActionSelect = getActionSelect($idartlang, $idusersequence);
if (!$sActionSelect) {
$mayEdit = false;
}
$form = new UI_Form("wfaction" . $idartlang, "main.php", "get");
$form->setVar("area", $area);
$form->setVar("action", "workflow_do_action");
$form->setVar("frame", $frame);
$form->setVar("idcat", $idcat);
$form->setVar("modidartlang", $idartlang);
$form->setVar("idtpl", $idtpl);
$form->add("select", '<table cellspacing="0" border="0"><tr><td>' . $sActionSelect . '</td><td>');
$form->add("button", '<input type="image" src="' . $cfg["path"]["htmlpath"] . $cfg["path"]["images"] . "submit.gif" . '"></tr></table>');
if ($mayEdit == true) {
return ($form->render(true));
} else {
return '--- ' . i18n("None") . ' ---';
}
case "wflaststatus":
$sStatus = getLastWorkflowStatus($idartlang);
if (!$sStatus) {
$sStatus = '--- ' . i18n("None") . ' ---';
}
return $sStatus;
}
}
function piworkflowCreateTasksFolder() {
global $sess, $cfg;
$item = array();
/* Create workflow tasks folder */
$tmp_mstr = '<a href="javascript://" onclick="javascript:conMultiLink(\'%s\', \'%s\', \'%s\', \'%s\')">%s</a>';
$mstr = sprintf($tmp_mstr, 'right_bottom',
$sess->url("main.php?area=con_workflow&frame=4"),
'right_top',
$sess->url("main.php?area=con_workflow&frame=3"),
'Workflow / Todo');
$item["image"] = '<img src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . 'workflow/images/workflow_erstellen.gif">';
$item["title"] = $mstr;
return ($item);
}

Datei anzeigen

@ -31,7 +31,7 @@ if(!defined('CON_FRAMEWORK')) {
} }
plugin_include('workflow', 'classes/class.workflow.php'); plugin_include('cl-workflow', 'classes/class.workflow.php');
$form = new UI_Table_Form("workflow_edit"); $form = new UI_Table_Form("workflow_edit");
$userclass = new User; $userclass = new User;
@ -83,10 +83,10 @@ $form->setVar("frame", $frame);
if ($workflow->virgin) if ($workflow->virgin)
{ {
$name = i18n("New Workflow", "workflow"); $name = i18n("New Workflow", "cl-workflow");
$header = i18n("Create new workflow", "workflow"); $header = i18n("Create new workflow", "cl-workflow");
} else { } else {
$header = i18n("Edit workflow", "workflow"); $header = i18n("Edit workflow", "cl-workflow");
$description = $workflow->get("description"); $description = $workflow->get("description");
$name = $workflow->get("name"); $name = $workflow->get("name");
$created = $workflow->get("created"); $created = $workflow->get("created");
@ -94,10 +94,10 @@ if ($workflow->virgin)
} }
$form->addHeader($header); $form->addHeader($header);
$form->add(i18n("Workflow name", "workflow"),formGenerateField("text","wfname",$name,40,255)); $form->add(i18n("Workflow name", "cl-workflow"),formGenerateField("text","wfname",$name,40,255));
$form->add(i18n("Description", "workflow"),formGenerateField("textbox","wfdescription",$description,50,10)); $form->add(i18n("Description", "cl-workflow"),formGenerateField("textbox","wfdescription",$description,50,10));
$form->add(i18n("Author", "workflow"),$author); $form->add(i18n("Author", "cl-workflow"),$author);
$form->add(i18n("Created", "workflow"),$created); $form->add(i18n("Created", "cl-workflow"),$created);
$page = new UI_Page; $page = new UI_Page;
$page->setContent($form->render(true)); $page->setContent($form->render(true));

Datei anzeigen

@ -34,7 +34,7 @@ if(!defined('CON_FRAMEWORK')) {
$create = new Link; $create = new Link;
$create->setMultiLink("workflow","","workflow_common","workflow_create"); $create->setMultiLink("workflow","","workflow_common","workflow_create");
//$create->setCLink("workflow_common",4,"workflow_create"); //$create->setCLink("workflow_common",4,"workflow_create");
$create->setContent(i18n("Create workflow", "workflow")); $create->setContent(i18n("Create workflow", "cl-workflow"));
$create->setCustom("idworkflow","-1"); $create->setCustom("idworkflow","-1");
$aAttributes = array(); $aAttributes = array();

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -25,7 +26,6 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -33,12 +33,9 @@ if(!defined('CON_FRAMEWORK')) {
$iIdMarked = (int) $_GET['idworkflow']; $iIdMarked = (int) $_GET['idworkflow'];
plugin_include('workflow', 'classes/class.workflow.php');
$workflows = new Workflows; $workflows = new Workflows;
$sScript = ''; $sScript = '';
if ($action == "workflow_delete") if ($action == "workflow_delete") {
{
$workflows->delete($idworkflow); $workflows->delete($idworkflow);
$sScript = '<script type="text/javascript"> $sScript = '<script type="text/javascript">
var right_top = top.content.frames["right"].frames["right_top"]; var right_top = top.content.frames["right"].frames["right_top"];
@ -56,8 +53,7 @@ if ($action == "workflow_delete")
$ui = new UI_Menu; $ui = new UI_Menu;
$workflows->select("idclient = '$client' AND idlang = '$lang'"); $workflows->select("idclient = '$client' AND idlang = '$lang'");
while ($workflow = $workflows->next()) while ($workflow = $workflows->next()) {
{
$wfid = $workflow->getField("idworkflow"); $wfid = $workflow->getField("idworkflow");
$wfname = $workflow->getField("name"); $wfname = $workflow->getField("name");
$wfdescription = $workflow->getField("description"); $wfdescription = $workflow->getField("description");
@ -68,8 +64,8 @@ while ($workflow = $workflows->next())
$link->setAlt($wfdescription); $link->setAlt($wfdescription);
$link->setCustom("idworkflow", $wfid); $link->setCustom("idworkflow", $wfid);
$delTitle = i18n("Delete workflow", "workflow"); $delTitle = i18n("Delete workflow", "cl-workflow");
$delDescr = sprintf(i18n("Do you really want to delete the following workflow:<br><br>%s<br>", "workflow"),$wfname); $delDescr = sprintf(i18n("Do you really want to delete the following workflow:<br><br>%s<br>", "cl-workflow"), $wfname);
$delete = '<a title="' . $delTitle . '" href="javascript://" onclick="box.confirm(\'' . $delTitle . '\', \'' . $delDescr . '\', \'deleteWorkflow(\\\'' . $wfid . '\\\')\')"><img src="' . $cfg['path']['images'] . 'delete.gif" border="0" title="' . $delTitle . '" alt="' . $delTitle . '"></a>'; $delete = '<a title="' . $delTitle . '" href="javascript://" onclick="box.confirm(\'' . $delTitle . '\', \'' . $delDescr . '\', \'deleteWorkflow(\\\'' . $wfid . '\\\')\')"><img src="' . $cfg['path']['images'] . 'delete.gif" border="0" title="' . $delTitle . '" alt="' . $delTitle . '"></a>';
$ui->setTitle($wfid, $wfname); $ui->setTitle($wfid, $wfname);
@ -80,7 +76,6 @@ while ($workflow = $workflows->next())
if ($wfid == $iIdMarked) { if ($wfid == $iIdMarked) {
$ui->setExtra($wfid, 'id="marked" '); $ui->setExtra($wfid, 'id="marked" ');
} }
} }
$content = $ui->render(false); $content = $ui->render(false);
@ -125,5 +120,3 @@ $page->addScript('refresh', $sScript);
$page->setMargin(0); $page->setMargin(0);
$page->setContent($content . $sInitRowMark); $page->setContent($content . $sInitRowMark);
$page->render(); $page->render();
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -27,14 +28,10 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
plugin_include('workflow', 'classes/class.workflow.php');
plugin_include('workflow', 'includes/functions.workflow.php');
cInclude("includes", "functions.encoding.php"); cInclude("includes", "functions.encoding.php");
$iIdMarked = (int) $_GET['idworkflowitem']; $iIdMarked = (int) $_GET['idworkflowitem'];
@ -43,7 +40,7 @@ $availableWorkflowActions= WorkflowActions :: getAvailableWorkflowActions();
$sCurrentEncoding = getEncodingByLanguage($db, $lang, $cfg); $sCurrentEncoding = getEncodingByLanguage($db, $lang, $cfg);
if (clHtmlEntities($adduser, ENT_COMPAT, $sCurrentEncoding) == i18n("Add User", "workflow")) { if (clHtmlEntities($adduser, ENT_COMPAT, $sCurrentEncoding) == i18n("Add User", "cl-workflow")) {
$action = "workflow_create_user"; $action = "workflow_create_user";
} }
@ -75,7 +72,7 @@ if ($action == "workflow_user_down") {
if ($action == "workflow_create_step") { if ($action == "workflow_create_step") {
$workflowitems = new WorkflowItems; $workflowitems = new WorkflowItems;
$item = $workflowitems->create($idworkflow); $item = $workflowitems->create($idworkflow);
$item->set("name", i18n("New Workflow Step", "workflow")); $item->set("name", i18n("New Workflow Step", "cl-workflow"));
$item->store(); $item->store();
$idworkflowitem = $item->get("idworkflowitem"); $idworkflowitem = $item->get("idworkflowitem");
} }
@ -131,7 +128,6 @@ if ($action == "workflow_save_step" || $action == "workflow_create_user") {
$usersequence->set("emailnoti", $wfemailnoti[$usersequence->get("idusersequence")]); $usersequence->set("emailnoti", $wfemailnoti[$usersequence->get("idusersequence")]);
$usersequence->set("escalationnoti", $wfescalnoti[$usersequence->get("idusersequence")]); $usersequence->set("escalationnoti", $wfescalnoti[$usersequence->get("idusersequence")]);
$usersequence->store(); $usersequence->store();
} }
} }
@ -139,15 +135,15 @@ function getTimeUnitSelector($listid, $default) {
global $idclient, $cfg, $auth; global $idclient, $cfg, $auth;
$timeunits = array(); $timeunits = array();
$timeunits['Seconds'] = i18n("Seconds", "workflow"); $timeunits['Seconds'] = i18n("Seconds", "cl-workflow");
$timeunits['Minutes'] = i18n("Minutes", "workflow"); $timeunits['Minutes'] = i18n("Minutes", "cl-workflow");
$timeunits['Hours'] = i18n("Hours", "workflow"); $timeunits['Hours'] = i18n("Hours", "cl-workflow");
$timeunits['Days'] = i18n("Days", "workflow"); $timeunits['Days'] = i18n("Days", "cl-workflow");
$timeunits['Weeks'] = i18n("Weeks", "workflow"); $timeunits['Weeks'] = i18n("Weeks", "cl-workflow");
$timeunits['Months'] = i18n("Months", "workflow"); $timeunits['Months'] = i18n("Months", "cl-workflow");
$timeunits['Years'] = i18n("Years", "workflow"); $timeunits['Years'] = i18n("Years", "cl-workflow");
$tpl2= new Template; $tpl2 = new Template();
$tpl2->set('s', 'NAME', 'time' . $listid); $tpl2->set('s', 'NAME', 'time' . $listid);
$tpl2->set('s', 'CLASS', 'text_small'); $tpl2->set('s', 'CLASS', 'text_small');
$tpl2->set('s', 'OPTIONS', 'size=1'); $tpl2->set('s', 'OPTIONS', 'size=1');
@ -167,7 +163,6 @@ function getTimeUnitSelector($listid, $default) {
} }
return $tpl2->generate($cfg['path']['templates'] . $cfg['templates']['generic_select'], true); return $tpl2->generate($cfg['path']['templates'] . $cfg['templates']['generic_select'], true);
} }
function getWorkflowList() { function getWorkflowList() {
@ -194,16 +189,16 @@ function getWorkflowList() {
$moveup->setCustom("idworkflowitem", $id); $moveup->setCustom("idworkflowitem", $id);
$moveup->setCustom("idworkflow", $idworkflow); $moveup->setCustom("idworkflow", $idworkflow);
$moveup->setCustom("position", $pos); $moveup->setCustom("position", $pos);
$moveup->setAlt(i18n("Move step up", "workflow")); $moveup->setAlt(i18n("Move step up", "cl-workflow"));
$moveup->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/no_verschieben.gif" . '">'); $moveup->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "cl-workflow/images/no_verschieben.gif" . '">');
$movedown = new Link; $movedown = new Link;
$movedown->setCLink("workflow_steps", 4, "workflow_step_down"); $movedown->setCLink("workflow_steps", 4, "workflow_step_down");
$movedown->setCustom("idworkflowitem", $id); $movedown->setCustom("idworkflowitem", $id);
$movedown->setCustom("idworkflow", $idworkflow); $movedown->setCustom("idworkflow", $idworkflow);
$movedown->setCustom("position", $pos); $movedown->setCustom("position", $pos);
$movedown->setAlt(i18n("Move step down", "workflow")); $movedown->setAlt(i18n("Move step down", "cl-workflow"));
$movedown->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/nu_verschieben.gif" . '">'); $movedown->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "cl-workflow/images/nu_verschieben.gif" . '">');
@ -212,8 +207,8 @@ function getWorkflowList() {
$deletestep->setCustom("idworkflowitem", $id); $deletestep->setCustom("idworkflowitem", $id);
$deletestep->setCustom("idworkflow", $idworkflow); $deletestep->setCustom("idworkflow", $idworkflow);
$deletestep->setCustom("position", $pos); $deletestep->setCustom("position", $pos);
$deletestep->setAlt(i18n("Delete step", "workflow")); $deletestep->setAlt(i18n("Delete step", "cl-workflow"));
$deletestep->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/workflow_step_delete.gif" . '">'); $deletestep->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "cl-workflow/images/workflow_step_delete.gif" . '">');
$ui->setTitle($id, "$pos. $name"); $ui->setTitle($id, "$pos. $name");
$ui->setLink($id, $edititem); $ui->setLink($id, $edititem);
@ -254,15 +249,14 @@ function createNewWorkflow() {
$createstep->setCustom("idworkflow", $idworkflow); $createstep->setCustom("idworkflow", $idworkflow);
#$ui->setLink("spacer", NULL); #$ui->setLink("spacer", NULL);
$ui->setTitle("create", i18n("Create new step", "workflow")); $ui->setTitle("create", i18n("Create new step", "cl-workflow"));
$ui->setImage("create", $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/workflow_step_new.gif"); $ui->setImage("create", $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "cl-workflow/images/workflow_step_new.gif");
$ui->setLink("create", $createstep); $ui->setLink("create", $createstep);
$ui->setRowmark($rowmark); $ui->setRowmark($rowmark);
$ui->setBgColor("create", $cfg['color']['table_header']); $ui->setBgColor("create", $cfg['color']['table_header']);
$content = $ui->render(false); $content = $ui->render(false);
return $content; return $content;
} }
function editWorkflowStep($idworkflowitem) { function editWorkflowStep($idworkflowitem) {
@ -289,16 +283,16 @@ function editWorkflowStep($idworkflowitem) {
$form->setVar("idworkflowitem", $idworkflowitem); $form->setVar("idworkflowitem", $idworkflowitem);
$form->setVar("frame", $frame); $form->setVar("frame", $frame);
$form->addHeader(i18n("Edit workflow step", "workflow")); $form->addHeader(i18n("Edit workflow step", "cl-workflow"));
$form->add(i18n("Step name", "workflow"), formGenerateField("text", "wfstepname", $stepname, 40, 255)); $form->add(i18n("Step name", "cl-workflow"), formGenerateField("text", "wfstepname", $stepname, 40, 255));
$form->add(i18n("Step description", "workflow"), formGenerateField("textbox", "wfstepdescription", $stepdescription, 60, 10)); $form->add(i18n("Step description", "cl-workflow"), formGenerateField("textbox", "wfstepdescription", $stepdescription, 60, 10));
foreach ($availableWorkflowActions as $key => $value) { foreach ($availableWorkflowActions as $key => $value) {
$actions .= formGenerateCheckbox("wfactions[" . $key . "]", "1", $workflowactions->get($id, $key)) . '<label for="wfactions[' . $key . ']1">' . $value . '</label>' . "<br>"; $actions .= formGenerateCheckbox("wfactions[" . $key . "]", "1", $workflowactions->get($id, $key)) . '<label for="wfactions[' . $key . ']1">' . $value . '</label>' . "<br>";
} }
$form->add(i18n("Actions", "workflow"), $actions); $form->add(i18n("Actions", "cl-workflow"), $actions);
$form->add(i18n("Assigned users", "workflow"), getWorkflowUsers($idworkflowitem)); $form->add(i18n("Assigned users", "cl-workflow"), getWorkflowUsers($idworkflowitem));
return $form->render(true); return $form->render(true);
} }
@ -326,17 +320,17 @@ function getWorkflowUsers($idworkflowitem) {
$moveup->setCustom("idworkflowitem", $idworkflowitem); $moveup->setCustom("idworkflowitem", $idworkflowitem);
$moveup->setCustom("idworkflow", $idworkflow); $moveup->setCustom("idworkflow", $idworkflow);
$moveup->setCustom("position", $pos); $moveup->setCustom("position", $pos);
$moveup->setAlt(i18n("Move user up", "workflow")); $moveup->setAlt(i18n("Move user up", "cl-workflow"));
#$moveup->setContent('<img border="0" style="padding-left: 2px" src="images/pfeil_hoch.gif">'); #$moveup->setContent('<img border="0" style="padding-left: 2px" src="images/pfeil_hoch.gif">');
$moveup->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/no_verschieben.gif" . '">'); $moveup->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "cl-workflow/images/no_verschieben.gif" . '">');
$movedown = new Link; $movedown = new Link;
$movedown->setCLink("workflow_steps", 4, "workflow_user_down"); $movedown->setCLink("workflow_steps", 4, "workflow_user_down");
$movedown->setCustom("idworkflowitem", $idworkflowitem); $movedown->setCustom("idworkflowitem", $idworkflowitem);
$movedown->setCustom("idworkflow", $idworkflow); $movedown->setCustom("idworkflow", $idworkflow);
$movedown->setCustom("position", $pos); $movedown->setCustom("position", $pos);
$movedown->setAlt(i18n("Move user down", "workflow")); $movedown->setAlt(i18n("Move user down", "cl-workflow"));
$movedown->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/nu_verschieben.gif" . '">'); $movedown->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "cl-workflow/images/nu_verschieben.gif" . '">');
@ -346,16 +340,16 @@ function getWorkflowUsers($idworkflowitem) {
$deletestep->setCustom("idworkflow", $idworkflow); $deletestep->setCustom("idworkflow", $idworkflow);
$deletestep->setCustom("position", $pos); $deletestep->setCustom("position", $pos);
$deletestep->setCustom("idusersequence", $id); $deletestep->setCustom("idusersequence", $id);
$deletestep->setAlt(i18n("Delete user", "workflow")); $deletestep->setAlt(i18n("Delete user", "cl-workflow"));
$deletestep->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/workflow_step_delete.gif" . '">'); $deletestep->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "cl-workflow/images/workflow_step_delete.gif" . '">');
$title = "$pos. " . getUsers($id, $iduser); $title = "$pos. " . getUsers($id, $iduser);
$title .= formGenerateField("text", "wftimelimit" . $id, $timelimit, 3, 6); $title .= formGenerateField("text", "wftimelimit" . $id, $timelimit, 3, 6);
$title .= getTimeUnitSelector($id, $timeunit); $title .= getTimeUnitSelector($id, $timeunit);
$altmail= i18n("Notify this user via E-Mail", "workflow"); $altmail = i18n("Notify this user via E-Mail", "cl-workflow");
$altnoti= i18n("Escalate to this user via E-Mail", "workflow"); $altnoti = i18n("Escalate to this user via E-Mail", "cl-workflow");
$title .= formGenerateCheckbox("wfemailnoti[" . $id . "]", "1", $email) . '<label for="wfemailnoti[' . $id . ']1"><img alt="' . $altmail . '" title="' . $altmail . '" style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/workflow_email_noti.gif" . '"></label>'; $title .= formGenerateCheckbox("wfemailnoti[" . $id . "]", "1", $email) . '<label for="wfemailnoti[' . $id . ']1"><img alt="' . $altmail . '" title="' . $altmail . '" style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "cl-workflow/images/workflow_email_noti.gif" . '"></label>';
$title .= formGenerateCheckbox("wfescalnoti[" . $id . "]", "1", $escalation) . '<label for="wfescalnoti[' . $id . ']1"><img alt="' . $altnoti . '" title="' . $altnoti . '" style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/workflow_escal_noti.gif" . '"></label>'; $title .= formGenerateCheckbox("wfescalnoti[" . $id . "]", "1", $escalation) . '<label for="wfescalnoti[' . $id . ']1"><img alt="' . $altnoti . '" title="' . $altnoti . '" style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "cl-workflow/images/workflow_escal_noti.gif" . '"></label>';
$ui->setTitle($id, $title); $ui->setTitle($id, $title);
$ui->setLink($id, NULL); $ui->setLink($id, NULL);
@ -374,8 +368,7 @@ function getWorkflowUsers($idworkflowitem) {
$ui->setActions($id, "delete", $deletestep->render()); $ui->setActions($id, "delete", $deletestep->render());
$ui->setImage($id, $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/workflow_user.gif"); $ui->setImage($id, $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "cl-workflow/images/workflow_user.gif");
} }
$createstep = new Link; $createstep = new Link;
@ -385,21 +378,21 @@ function getWorkflowUsers($idworkflowitem) {
$ui->setLink("spacer", NULL); $ui->setLink("spacer", NULL);
$ui->setTitle("create", '<input class="text_medium" type="submit" name="adduser" value="' . i18n("Add User", "workflow") . '">'); $ui->setTitle("create", '<input class="text_medium" type="submit" name="adduser" value="' . i18n("Add User", "cl-workflow") . '">');
$ui->setLink("create", NULL); $ui->setLink("create", NULL);
$content = $ui->render(false); $content = $ui->render(false);
return ($content); return ($content);
} }
$tpl= new Template; $tpl = new Template();
$tpl->setDomain('cl-workflow');
$tpl->set('s', 'NEW', createNewWorkflow()); $tpl->set('s', 'NEW', createNewWorkflow());
$tpl->set('s', 'STEPS', getWorkflowList()); $tpl->set('s', 'STEPS', getWorkflowList());
$tpl->set('s', 'EDITSTEP', editWorkflowStep($idworkflowitem)); $tpl->set('s', 'EDITSTEP', editWorkflowStep($idworkflowitem));
$tpl->set('s', 'BORDERCOLOR', $cfg["color"]["table_border"]); $tpl->set('s', 'BORDERCOLOR', $cfg["color"]["table_border"]);
$frame= $tpl->generate($cfg["path"]["contenido"] . $cfg["path"]["plugins"] . "workflow/templates/template.workflow_steps.html", true); $frame = $tpl->generate($cfg["path"]["contenido"] . $cfg["path"]["plugins"] . "cl-workflow/templates/template.workflow_steps.html", true);
$page = new UI_Page; $page = new UI_Page;
$page->setContent($frame); $page->setContent($frame);
$page->render(); $page->render();
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -26,7 +27,6 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -85,12 +85,10 @@ if (!defined('CON_FRAMEWORK')) {
$tpl->set("d", "CLASS", ''); $tpl->set("d", "CLASS", '');
$tpl->set("d", "OPTIONS", ''); $tpl->set("d", "OPTIONS", '');
$tpl->set("d", "CAPTION", '<a class="white" onclick="sub.clicked(this)" target="right_bottom" href="' . $sess->url("main.php?area=$tmp_area&frame=4&idworkflow=$idworkflow") . '">' . $caption . '</a>'); $tpl->set("d", "CAPTION", '<a class="white" onclick="sub.clicked(this)" target="right_bottom" href="' . $sess->url("main.php?area=$tmp_area&frame=4&idworkflow=$idworkflow") . '">' . $caption . '</a>');
if ($area == $tmp_area) if ($area == $tmp_area) {
{
$tpl->set('s', 'DEFAULT', markSubMenuItem($tpl->dyn_cnt, true)); $tpl->set('s', 'DEFAULT', markSubMenuItem($tpl->dyn_cnt, true));
} }
$tpl->next(); $tpl->next();
} }
$tpl->set('s', 'COLSPAN', ($tpl->dyn_cnt * 2) + 2); $tpl->set('s', 'COLSPAN', ($tpl->dyn_cnt * 2) + 2);
@ -102,12 +100,8 @@ if (!defined('CON_FRAMEWORK')) {
# Generate the third # Generate the third
# navigation layer # navigation layer
if ($idworkflow <= 0) if ($idworkflow <= 0) {
{
$tpl->generate($cfg["path"]["templates"] . $cfg["templates"]["subnav_blank"]); $tpl->generate($cfg["path"]["templates"] . $cfg["templates"]["subnav_blank"]);
} else { } else {
$tpl->generate($cfg["path"]["templates"] . $cfg["templates"]["subnav"]); $tpl->generate($cfg["path"]["templates"] . $cfg["templates"]["subnav"]);
} }
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -25,13 +26,10 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
plugin_include('workflow', 'classes/class.workflow.php');
plugin_include('workflow', 'includes/functions.workflow.php'); plugin_include('workflow', 'includes/functions.workflow.php');
global $sess; global $sess;
@ -44,26 +42,22 @@ $db2 = new DB_ConLite;
ob_start(); ob_start();
if ($usershow == "") if ($usershow == "") {
{
$usershow = $auth->auth["uid"]; $usershow = $auth->auth["uid"];
} }
if (!$perm->have_perm_area_action($area, "workflow_task_user_select")) if (!$perm->have_perm_area_action($area, "workflow_task_user_select")) {
{
$usershow = $auth->auth["uid"]; $usershow = $auth->auth["uid"];
} }
if ($action == "workflow_do_action") if ($action == "workflow_do_action") {
{
$selectedAction = "wfselect" . $modidartlang; $selectedAction = "wfselect" . $modidartlang;
doWorkflowAction($modidartlang, $GLOBALS[$selectedAction]); doWorkflowAction($modidartlang, $GLOBALS[$selectedAction]);
} }
$wfa->select(); $wfa->select();
while ($wfaitem = $wfa->next()) while ($wfaitem = $wfa->next()) {
{
$wfaid = $wfaitem->get("idartallocation"); $wfaid = $wfaitem->get("idartallocation");
$usersequence[$wfaid] = $wfaitem->get("idusersequence"); $usersequence[$wfaid] = $wfaitem->get("idusersequence");
$lastusersequence[$wfaid] = $wfaitem->get("lastusersequence"); $lastusersequence[$wfaid] = $wfaitem->get("lastusersequence");
@ -71,53 +65,42 @@ while ($wfaitem = $wfa->next())
} }
if (is_array($usersequence)) if (is_array($usersequence)) {
{ foreach ($usersequence as $key => $value) {
foreach ($usersequence as $key => $value)
{
$wfu->select("idusersequence = '$value'"); $wfu->select("idusersequence = '$value'");
if ($obj = $wfu->next()) if ($obj = $wfu->next()) {
{
$userids[$key] = $obj->get("iduser"); $userids[$key] = $obj->get("iduser");
} }
} }
} }
if (is_array($userids)) if (is_array($userids)) {
{ foreach ($userids as $key => $value) {
foreach ($userids as $key=>$value)
{
$isCurrent[$key] = false; $isCurrent[$key] = false;
if ($usershow == $value) if ($usershow == $value) {
{
$isCurrent[$key] = true; $isCurrent[$key] = true;
} }
if ($users->loadUserByUserID($value) == false) if ($users->loadUserByUserID($value) == false) {
{
/* Yes, it's a group. Let's try to load the group members! */ /* Yes, it's a group. Let's try to load the group members! */
$sql = "SELECT user_id FROM " $sql = "SELECT user_id FROM "
. $cfg["tab"]["groupmembers"] . " . $cfg["tab"]["groupmembers"] . "
WHERE group_id = '" . $value . "'"; WHERE group_id = '" . $value . "'";
$db2->query(Contenido_Security::escapeDB($sql, $db2)); $db2->query(Contenido_Security::escapeDB($sql, $db2));
while ($db2->next_record()) while ($db2->next_record()) {
{ if ($db2->f("user_id") == $usershow) {
if ($db2->f("user_id") == $usershow)
{
$isCurrent[$key] = true; $isCurrent[$key] = true;
} }
} }
} else { } else {
if ($value == $usershow) if ($value == $usershow) {
{
$isCurrent[$key] = true; $isCurrent[$key] = true;
} }
} }
if ($lastusersequence[$key] == $usersequence[$key]) if ($lastusersequence[$key] == $usersequence[$key]) {
{
$isCurrent[$key] = false; $isCurrent[$key] = false;
} }
} }
@ -130,14 +113,13 @@ $tpl->set('s', 'SESSNAME', $sess->name);
$iIDCat = 0; $iIDCat = 0;
$iIDTpl = 0; $iIDTpl = 0;
if ($perm->have_perm_area_action($area, "workflow_task_user_select")) if ($perm->have_perm_area_action($area, "workflow_task_user_select")) {
{
$form = new UI_Form("showusers", $sess->url("main.php?area=$area&frame=$frame")); $form = new UI_Form("showusers", $sess->url("main.php?area=$area&frame=$frame"));
$form->setVar("area", $area); $form->setVar("area", $area);
$form->setEvent("submit", "setUsershow();"); $form->setEvent("submit", "setUsershow();");
$form->setVar("frame", $frame); $form->setVar("frame", $frame);
$form->setVar("action", "workflow_task_user_select"); $form->setVar("action", "workflow_task_user_select");
$form->add("select",i18n("Show users").": ".getUsers("show",$usershow)); $form->add("select", i18n("Show users", 'cl-workflow') . ": " . getUsers("show", $usershow));
$form->add("button", '<input style="vertical-align:middle;" type="image" src="' . $cfg["path"]["htmlpath"] . $cfg["path"]["images"] . "submit.gif" . '">'); $form->add("button", '<input style="vertical-align:middle;" type="image" src="' . $cfg["path"]["htmlpath"] . $cfg["path"]["images"] . "submit.gif" . '">');
$tpl->set('s', 'USERSELECT', $form->render(true)); $tpl->set('s', 'USERSELECT', $form->render(true));
@ -145,29 +127,26 @@ if ($perm->have_perm_area_action($area, "workflow_task_user_select"))
$tpl->set('s', 'USERSELECT', ''); $tpl->set('s', 'USERSELECT', '');
} }
$pageTitle = i18n('Search results').' - '.i18n('Workflow tasks', 'workflow'); $pageTitle = i18n('Search results', 'cl-workflow') . ' - ' . i18n('Workflow tasks', 'cl-workflow');
$tpl->set('s', 'PAGE_TITLE', $pageTitle); $tpl->set('s', 'PAGE_TITLE', $pageTitle);
$tpl->set('s', 'TH_START', i18n("Article")); $tpl->set('s', 'TH_START', i18n("Article", 'cl-workflow'));
$tpl->set('s', 'TH_TEMPLATE', i18n("Template")); $tpl->set('s', 'TH_TEMPLATE', i18n("Template", 'cl-workflow'));
$tpl->set('s', 'TH_ACTIONS', i18n("Actions")); $tpl->set('s', 'TH_ACTIONS', i18n("Actions", 'cl-workflow'));
$tpl->set('s', 'TH_TITLE', i18n("Title")); $tpl->set('s', 'TH_TITLE', i18n("Title", 'cl-workflow'));
$tpl->set('s', 'TH_CHANGED', i18n("Changed")); $tpl->set('s', 'TH_CHANGED', i18n("Changed", 'cl-workflow'));
$tpl->set('s', 'TH_PUBLISHED', i18n("Published")); $tpl->set('s', 'TH_PUBLISHED', i18n("Published", 'cl-workflow'));
$tpl->set('s', 'TH_WORKFLOW_STEP', i18n("Workflow Step", 'workflow')); $tpl->set('s', 'TH_WORKFLOW_STEP', i18n("Workflow Step", 'cl-workflow'));
$tpl->set('s', 'TH_WORKFLOW_ACTION', i18n("Workflow Action", 'workflow')); $tpl->set('s', 'TH_WORKFLOW_ACTION', i18n("Workflow Action", 'cl-workflow'));
$tpl->set('s', 'TH_WORKFLOW_EDITOR', i18n("Workflow Editor")); $tpl->set('s', 'TH_WORKFLOW_EDITOR', i18n("Workflow Editor", 'cl-workflow'));
$tpl->set('s', 'TH_LAST_STATUS', i18n("Last status", 'workflow')); $tpl->set('s', 'TH_LAST_STATUS', i18n("Last status", 'cl-workflow'));
$currentUserSequence = new WorkflowUserSequence; $currentUserSequence = new WorkflowUserSequence;
if (is_array($isCurrent)) if (is_array($isCurrent)) {
{
foreach ($isCurrent as $key => $value) foreach ($isCurrent as $key => $value) {
{ if ($value == true) {
if ($value == true)
{
$idartlang = Contenido_Security::toInteger($article[$key]); $idartlang = Contenido_Security::toInteger($article[$key]);
$lang = Contenido_Security::toInteger($lang); $lang = Contenido_Security::toInteger($lang);
$client = Contenido_Security::toInteger($client); $client = Contenido_Security::toInteger($client);
@ -189,8 +168,7 @@ foreach ($isCurrent as $key => $value)
$db->query($sql); $db->query($sql);
if ($db->next_record()) if ($db->next_record()) {
{
global $area; global $area;
//$area = "con"; //$area = "con";
$idcat = $db->f("idcat"); $idcat = $db->f("idcat");
@ -222,15 +200,15 @@ foreach ($isCurrent as $key => $value)
$makeStartarticle = "<img src=\"images/isstart0.gif\" border=\"0\" title=\"{$sFlagTitle}\" alt=\"{$sFlagTitle}\">"; $makeStartarticle = "<img src=\"images/isstart0.gif\" border=\"0\" title=\"{$sFlagTitle}\" alt=\"{$sFlagTitle}\">";
} }
$todoListeSubject = i18n("Reminder"); $todoListeSubject = i18n("Reminder", 'cl-workflow');
$sReminder = i18n("Set reminder / add to todo list"); $sReminder = i18n("Set reminder / add to todo list", 'cl-workflow');
$sReminderHtml = "<a id=\"m1\" onclick=\"javascript:window.open('main.php?subject=$todoListeSubject&amp;area=todo&amp;frame=1&amp;itemtype=idart&amp;itemid=$idart&amp;contenido=$sSession', 'todo', 'scrollbars=yes, height=300, width=550');\" alt=\"$sReminder\" title=\"$sReminder\" href=\"#\"><img id=\"m2\" style=\"padding-left: 2px; padding-right: 2px;\" alt=\"$sReminder\" src=\"images/but_setreminder.gif\" border=\"0\"></a>"; $sReminderHtml = "<a id=\"m1\" onclick=\"javascript:window.open('main.php?subject=$todoListeSubject&amp;area=todo&amp;frame=1&amp;itemtype=idart&amp;itemid=$idart&amp;contenido=$sSession', 'todo', 'scrollbars=yes, height=300, width=550');\" alt=\"$sReminder\" title=\"$sReminder\" href=\"#\"><img id=\"m2\" style=\"padding-left: 2px; padding-right: 2px;\" alt=\"$sReminder\" src=\"images/but_setreminder.gif\" border=\"0\"></a>";
$templatename = $db->f('tpl_name'); $templatename = $db->f('tpl_name');
if (!empty($templatename)) { if (!empty($templatename)) {
$templatename = clHtmlEntities($templatename); $templatename = clHtmlEntities($templatename);
} else { } else {
$templatename = '--- ' . i18n("None") . ' ---'; $templatename = '--- ' . i18n("None", 'cl-workflow') . ' ---';
} }
if ($i == 0) { if ($i == 0) {
@ -259,7 +237,7 @@ foreach ($isCurrent as $key => $value)
if ($i > 0) { if ($i > 0) {
$tpl->set('s', 'NO_ARTICLES_ROW'); $tpl->set('s', 'NO_ARTICLES_ROW');
} else { } else {
$sRow = '<tr><td colspan="8" class="bordercell">' . i18n("No article found.") . '</td></tr>'; $sRow = '<tr><td colspan="8" class="bordercell">' . i18n("No article found.", 'cl-workflow') . '</td></tr>';
$tpl->set('s', 'NO_ARTICLES_ROW', $sRow); $tpl->set('s', 'NO_ARTICLES_ROW', $sRow);
} }
@ -270,5 +248,3 @@ $frame = ob_get_contents();
ob_end_clean(); ob_end_clean();
$tpl->generate($cfg["path"]['contenido'] . $cfg["path"]["plugins"] . "workflow/templates/template.workflow_tasks.html"); $tpl->generate($cfg["path"]['contenido'] . $cfg["path"]["plugins"] . "workflow/templates/template.workflow_tasks.html");
?>

Datei anzeigen

@ -8,162 +8,371 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-05-18 11:03+0200\n" "POT-Creation-Date: 2020-08-20 18:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: includes/config.plugin.php:40 includes/include.workflow_list.php:71 #: classes/class.workflowusersequence.php:105
msgid "Delete workflow" msgid "Workflow item doesn't exist. Can't create entry."
msgstr "" msgstr ""
#: includes/config.plugin.php:41 #: classes/class.workflowusersequence.php:129
msgid "Select workflow task" #: classes/class.workflowusersequence.php:137
#: classes/class.workflowitems.php:125 classes/class.workflowitems.php:133
msgid "Swapping items failed: Item doesn't exist"
msgstr "" msgstr ""
#: includes/config.plugin.php:42 #: classes/class.workflowusersequence.php:212
msgid "Show workflow" msgid "Can't set user_id: User or group doesn't exist"
msgstr "" msgstr ""
#: includes/config.plugin.php:43 includes/include.workflow_left_top.php:37 #: classes/class.workflowactions.php:69
msgid "Create workflow" msgid "Publish article"
msgstr "" msgstr ""
#: includes/config.plugin.php:44 includes/include.workflow_edit.php:89 #: classes/class.workflowactions.php:70
msgid "Edit workflow" msgid "Lock article"
msgstr "" msgstr ""
#: includes/config.plugin.php:45 #: classes/class.workflowactions.php:71
msgid "Process workflow step" msgid "Move back to last editor"
msgstr "" msgstr ""
#: includes/config.plugin.php:46 includes/config.plugin.php:47 #: classes/class.workflowactions.php:72 includes/functions.workflow.php:170
#: includes/config.plugin.php:178 msgid "Reject article"
msgid "Inherit workflow down"
msgstr "" msgstr ""
#: includes/config.plugin.php:48 includes/include.workflow_steps.php:292 #: classes/class.workflowactions.php:73
msgid "Edit workflow step" msgid "Edit article content"
msgstr "" msgstr ""
#: includes/config.plugin.php:49 #: classes/class.workflowactions.php:74
msgid "Move workflowstep up" msgid "Edit article properties"
msgstr "" msgstr ""
#: includes/config.plugin.php:50 #: classes/class.workflowactions.php:75
msgid "Move workflowstep down" msgid "Edit template"
msgstr "" msgstr ""
#: includes/config.plugin.php:51 #: classes/class.workflowactions.php:76 includes/functions.workflow.php:178
msgid "Save Workflowstep" msgid "Revise article"
msgstr "" msgstr ""
#: includes/config.plugin.php:52 #: classes/class.workflowartallocation.php:67
msgid "Create workflowstep" msgid "Article doesn't exist"
msgstr "" msgstr ""
#: includes/config.plugin.php:53 #: classes/class.workflowartallocation.php:74
msgid "Delete workflowstep" msgid "Article is already assigned to a usersequence step."
msgstr "" msgstr ""
#: includes/config.plugin.php:54 #: classes/class.workflowartallocation.php:265
msgid "Move workflowstepuser up" #: classes/class.workflowartallocation.php:273
msgid "Workflow notification"
msgstr "" msgstr ""
#: includes/config.plugin.php:55 #: classes/class.workflowartallocation.php:311
msgid "Move workflowstepuser down" #: classes/class.workflowartallocation.php:320
msgid "Workflow escalation"
msgstr "" msgstr ""
#: includes/config.plugin.php:56 #: classes/class.workflowitems.php:158
msgid "Create Workflowstepuser" msgid "Can't add item to workflow: Workflow doesn't exist"
msgstr "" msgstr ""
#: includes/config.plugin.php:57 #: classes/class.workflowitems.php:233
msgid "Delete Workflowstepuser" msgid "No item loaded"
msgstr "" msgstr ""
#: includes/config.plugin.php:58 #: classes/class.workflowitems.php:253
msgid "Associate workflow with category" msgid "Requested task doesn't exist, can't assign"
msgstr "" msgstr ""
#: includes/config.plugin.php:165 includes/config.plugin.php:421 #: classes/class.workflowitems.php:274 classes/class.workflowallocation.php:114
#: includes/config.plugin.php:427 includes/include.workflow_tasks.php:233 #: classes/class.workflowallocation.php:181
#: includes/functions.workflow.php:54 includes/functions.workflow.php:356 msgid "Workflow doesn't exist"
msgid "None"
msgstr "" msgstr ""
#: includes/config.plugin.php:197 #: classes/class.workflowitems.php:281
msgid "Workflow" msgid "Position in this workflow already exists."
msgstr "" msgstr ""
#: includes/config.plugin.php:300 includes/include.workflow_tasks.php:157 #: classes/class.workflowallocation.php:106
msgid "Workflow Step" #: classes/class.workflowallocation.php:203
msgid "Category already has a workflow assigned"
msgstr "" msgstr ""
#: includes/config.plugin.php:301 includes/include.workflow_tasks.php:158 #: classes/class.workflowallocation.php:212
msgid "Workflow Action" msgid "Category doesn't exist, assignment failed"
msgstr "" msgstr ""
#: includes/config.plugin.php:302 includes/include.workflow_tasks.php:159 #: includes/include.workflow_tasks.php:124
msgid "Workflow Editor"
msgstr ""
#: includes/config.plugin.php:303 includes/include.workflow_tasks.php:160
msgid "Last status"
msgstr ""
#: includes/include.workflow_tasks.php:140
msgid "Show users" msgid "Show users"
msgstr "" msgstr ""
#: includes/include.workflow_tasks.php:148 #: includes/include.workflow_tasks.php:132
msgid "Search results" msgid "Search results"
msgstr "" msgstr ""
#: includes/include.workflow_tasks.php:148 #: includes/include.workflow_tasks.php:132
msgid "Workflow tasks" msgid "Workflow tasks"
msgstr "" msgstr ""
#: includes/include.workflow_tasks.php:151 #: includes/include.workflow_tasks.php:135
msgid "Article" msgid "Article"
msgstr "" msgstr ""
#: includes/include.workflow_tasks.php:152 #: includes/include.workflow_tasks.php:136
msgid "Template" msgid "Template"
msgstr "" msgstr ""
#: includes/include.workflow_tasks.php:153 #: includes/include.workflow_tasks.php:137
#: includes/include.workflow_steps.php:300 #: includes/include.workflow_steps.php:297
msgid "Actions" msgid "Actions"
msgstr "" msgstr ""
#: includes/include.workflow_tasks.php:154 #: includes/include.workflow_tasks.php:138
msgid "Title" msgid "Title"
msgstr "" msgstr ""
#: includes/include.workflow_tasks.php:155 #: includes/include.workflow_tasks.php:139
msgid "Changed" msgid "Changed"
msgstr "" msgstr ""
#: includes/include.workflow_tasks.php:156 #: includes/include.workflow_tasks.php:140
msgid "Published" msgid "Published"
msgstr "" msgstr ""
#: includes/include.workflow_tasks.php:225 #: includes/include.workflow_tasks.php:141 includes/functions.workflow.php:730
msgid "Workflow Step"
msgstr ""
#: includes/include.workflow_tasks.php:142 includes/functions.workflow.php:731
msgid "Workflow Action"
msgstr ""
#: includes/include.workflow_tasks.php:143 includes/functions.workflow.php:732
msgid "Workflow Editor"
msgstr ""
#: includes/include.workflow_tasks.php:144 includes/functions.workflow.php:733
msgid "Last status"
msgstr ""
#: includes/include.workflow_tasks.php:205
msgid "Reminder" msgid "Reminder"
msgstr "" msgstr ""
#: includes/include.workflow_tasks.php:226 #: includes/include.workflow_tasks.php:206
msgid "Set reminder / add to todo list" msgid "Set reminder / add to todo list"
msgstr "" msgstr ""
#: includes/include.workflow_tasks.php:262 #: includes/include.workflow_tasks.php:213 includes/functions.workflow.php:43
#: includes/functions.workflow.php:311 includes/functions.workflow.php:611
#: includes/functions.workflow.php:841 includes/functions.workflow.php:847
msgid "None"
msgstr ""
#: includes/include.workflow_tasks.php:242
msgid "No article found." msgid "No article found."
msgstr "" msgstr ""
#: includes/include.workflow_left_top.php:37 includes/config.plugin.php:39
msgid "Create workflow"
msgstr ""
#: includes/config.plugin.php:36 includes/include.workflow_list.php:69
msgid "Delete workflow"
msgstr ""
#: includes/config.plugin.php:37
msgid "Select workflow task"
msgstr ""
#: includes/config.plugin.php:38
msgid "Show workflow"
msgstr ""
#: includes/config.plugin.php:40 includes/include.workflow_edit.php:89
msgid "Edit workflow"
msgstr ""
#: includes/config.plugin.php:41
msgid "Process workflow step"
msgstr ""
#: includes/config.plugin.php:42 includes/config.plugin.php:43
#: includes/functions.workflow.php:623
msgid "Inherit workflow down"
msgstr ""
#: includes/config.plugin.php:44 includes/include.workflow_steps.php:289
msgid "Edit workflow step"
msgstr ""
#: includes/config.plugin.php:45
msgid "Move workflowstep up"
msgstr ""
#: includes/config.plugin.php:46
msgid "Move workflowstep down"
msgstr ""
#: includes/config.plugin.php:47
msgid "Save Workflowstep"
msgstr ""
#: includes/config.plugin.php:48
msgid "Create workflowstep"
msgstr ""
#: includes/config.plugin.php:49
msgid "Delete workflowstep"
msgstr ""
#: includes/config.plugin.php:50
msgid "Move workflowstepuser up"
msgstr ""
#: includes/config.plugin.php:51
msgid "Move workflowstepuser down"
msgstr ""
#: includes/config.plugin.php:52
msgid "Create Workflowstepuser"
msgstr ""
#: includes/config.plugin.php:53
msgid "Delete Workflowstepuser"
msgstr ""
#: includes/config.plugin.php:54
msgid "Associate workflow with category"
msgstr ""
#: includes/functions.workflow.php:154
msgid "Confirm"
msgstr ""
#: includes/functions.workflow.php:162
msgid "Back to last editor"
msgstr ""
#: includes/functions.workflow.php:299
msgid "Rejected"
msgstr ""
#: includes/functions.workflow.php:302
msgid "Revised"
msgstr ""
#: includes/functions.workflow.php:305
msgid "Last"
msgstr ""
#: includes/functions.workflow.php:308
msgid "Confirmed"
msgstr ""
#: includes/functions.workflow.php:639
msgid "Workflow"
msgstr ""
#: includes/include.workflow_steps.php:43
#: includes/include.workflow_steps.php:385
msgid "Add User"
msgstr ""
#: includes/include.workflow_steps.php:75
msgid "New Workflow Step"
msgstr ""
#: includes/include.workflow_steps.php:139
msgid "Seconds"
msgstr ""
#: includes/include.workflow_steps.php:140
msgid "Minutes"
msgstr ""
#: includes/include.workflow_steps.php:141
msgid "Hours"
msgstr ""
#: includes/include.workflow_steps.php:142
msgid "Days"
msgstr ""
#: includes/include.workflow_steps.php:143
msgid "Weeks"
msgstr ""
#: includes/include.workflow_steps.php:144
msgid "Months"
msgstr ""
#: includes/include.workflow_steps.php:145
msgid "Years"
msgstr ""
#: includes/include.workflow_steps.php:194
msgid "Move step up"
msgstr ""
#: includes/include.workflow_steps.php:202
msgid "Move step down"
msgstr ""
#: includes/include.workflow_steps.php:212
msgid "Delete step"
msgstr ""
#: includes/include.workflow_steps.php:254
msgid "Create new step"
msgstr ""
#: includes/include.workflow_steps.php:290
msgid "Step name"
msgstr ""
#: includes/include.workflow_steps.php:291
msgid "Step description"
msgstr ""
#: includes/include.workflow_steps.php:298
msgid "Assigned users"
msgstr ""
#: includes/include.workflow_steps.php:326
msgid "Move user up"
msgstr ""
#: includes/include.workflow_steps.php:335
msgid "Move user down"
msgstr ""
#: includes/include.workflow_steps.php:346
msgid "Delete user"
msgstr ""
#: includes/include.workflow_steps.php:352
msgid "Notify this user via E-Mail"
msgstr ""
#: includes/include.workflow_steps.php:353
msgid "Escalate to this user via E-Mail"
msgstr ""
#: includes/include.workflow_list.php:70
#, php-format
msgid "Do you really want to delete the following workflow:<br><br>%s<br>"
msgstr ""
#: includes/include.workflow_edit.php:86 #: includes/include.workflow_edit.php:86
msgid "New Workflow" msgid "New Workflow"
msgstr "" msgstr ""
@ -187,212 +396,3 @@ msgstr ""
#: includes/include.workflow_edit.php:100 #: includes/include.workflow_edit.php:100
msgid "Created" msgid "Created"
msgstr "" msgstr ""
#: includes/include.workflow_list.php:72
#, php-format
msgid "Do you really want to delete the following workflow:<br><br>%s<br>"
msgstr ""
#: includes/include.workflow_steps.php:46
#: includes/include.workflow_steps.php:388
msgid "Add User"
msgstr ""
#: includes/include.workflow_steps.php:78
msgid "New Workflow Step"
msgstr ""
#: includes/include.workflow_steps.php:142
msgid "Seconds"
msgstr ""
#: includes/include.workflow_steps.php:143
msgid "Minutes"
msgstr ""
#: includes/include.workflow_steps.php:144
msgid "Hours"
msgstr ""
#: includes/include.workflow_steps.php:145
msgid "Days"
msgstr ""
#: includes/include.workflow_steps.php:146
msgid "Weeks"
msgstr ""
#: includes/include.workflow_steps.php:147
msgid "Months"
msgstr ""
#: includes/include.workflow_steps.php:148
msgid "Years"
msgstr ""
#: includes/include.workflow_steps.php:197
msgid "Move step up"
msgstr ""
#: includes/include.workflow_steps.php:205
msgid "Move step down"
msgstr ""
#: includes/include.workflow_steps.php:215
msgid "Delete step"
msgstr ""
#: includes/include.workflow_steps.php:257
msgid "Create new step"
msgstr ""
#: includes/include.workflow_steps.php:293
msgid "Step name"
msgstr ""
#: includes/include.workflow_steps.php:294
msgid "Step description"
msgstr ""
#: includes/include.workflow_steps.php:301
msgid "Assigned users"
msgstr ""
#: includes/include.workflow_steps.php:329
msgid "Move user up"
msgstr ""
#: includes/include.workflow_steps.php:338
msgid "Move user down"
msgstr ""
#: includes/include.workflow_steps.php:349
msgid "Delete user"
msgstr ""
#: includes/include.workflow_steps.php:355
msgid "Notify this user via E-Mail"
msgstr ""
#: includes/include.workflow_steps.php:356
msgid "Escalate to this user via E-Mail"
msgstr ""
#: includes/functions.workflow.php:183
msgid "Confirm"
msgstr ""
#: includes/functions.workflow.php:192
msgid "Back to last editor"
msgstr ""
#: includes/functions.workflow.php:201 classes/class.workflowactions.php:77
msgid "Reject article"
msgstr ""
#: includes/functions.workflow.php:210 classes/class.workflowactions.php:81
msgid "Revise article"
msgstr ""
#: includes/functions.workflow.php:344
msgid "Rejected"
msgstr ""
#: includes/functions.workflow.php:347
msgid "Revised"
msgstr ""
#: includes/functions.workflow.php:350
msgid "Last"
msgstr ""
#: includes/functions.workflow.php:353
msgid "Confirmed"
msgstr ""
#: classes/class.workflowartallocation.php:72
msgid "Article doesn't exist"
msgstr ""
#: classes/class.workflowartallocation.php:80
msgid "Article is already assigned to a usersequence step."
msgstr ""
#: classes/class.workflowartallocation.php:286
#: classes/class.workflowartallocation.php:295
msgid "Workflow notification"
msgstr ""
#: classes/class.workflowartallocation.php:336
#: classes/class.workflowartallocation.php:346
msgid "Workflow escalation"
msgstr ""
#: classes/class.workflowallocation.php:117
#: classes/class.workflowallocation.php:223
msgid "Category already has a workflow assigned"
msgstr ""
#: classes/class.workflowallocation.php:126
#: classes/class.workflowallocation.php:199
#: classes/class.workflowitems.php:299
msgid "Workflow doesn't exist"
msgstr ""
#: classes/class.workflowallocation.php:233
msgid "Category doesn't exist, assignment failed"
msgstr ""
#: classes/class.workflowitems.php:133 classes/class.workflowitems.php:142
#: classes/class.workflowusersequence.php:139
#: classes/class.workflowusersequence.php:148
msgid "Swapping items failed: Item doesn't exist"
msgstr ""
#: classes/class.workflowitems.php:169
msgid "Can't add item to workflow: Workflow doesn't exist"
msgstr ""
#: classes/class.workflowitems.php:251
msgid "No item loaded"
msgstr ""
#: classes/class.workflowitems.php:276
msgid "Requested task doesn't exist, can't assign"
msgstr ""
#: classes/class.workflowitems.php:307
msgid "Position in this workflow already exists."
msgstr ""
#: classes/class.workflowactions.php:74
msgid "Publish article"
msgstr ""
#: classes/class.workflowactions.php:75
msgid "Lock article"
msgstr ""
#: classes/class.workflowactions.php:76
msgid "Move back to last editor"
msgstr ""
#: classes/class.workflowactions.php:78
msgid "Edit article content"
msgstr ""
#: classes/class.workflowactions.php:79
msgid "Edit article properties"
msgstr ""
#: classes/class.workflowactions.php:80
msgid "Edit template"
msgstr ""
#: classes/class.workflowusersequence.php:112
msgid "Workflow item doesn't exist. Can't create entry."
msgstr ""
#: classes/class.workflowusersequence.php:229
msgid "Can't set user_id: User or group doesn't exist"
msgstr ""

Binäre Datei nicht angezeigt.

Datei anzeigen

@ -1,179 +1,240 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: CL-Workflow V1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-05-18 11:03+0200\n" "POT-Creation-Date: 2020-08-20 19:27+0200\n"
"PO-Revision-Date: 2011-05-18 11:17+0100\n" "PO-Revision-Date: 2020-08-21 10:53+0200\n"
"Last-Translator: Ortwin Pinke <translation@dceonline.de>\n" "Last-Translator: Ortwin Pinke <translation@dceonline.de>\n"
"Language-Team: \n" "Language-Team: CL-Dev <locale@conlite.org>\n"
"Language: de_DE\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Basepath: M:\\Projekte_Persoenlich\\timo.hummel\\plugin_sources\\\n" "X-Poedit-Basepath: ../../..\n"
"X-Poedit-KeywordsList: i18n\n" "X-Poedit-KeywordsList: i18n\n"
"X-Poedit-SearchPath-0: workflow\n" "X-Generator: Poedit 2.0.6\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-SearchPath-0: .\n"
#: includes/config.plugin.php:40 #: classes/class.workflowactions.php:69
#: includes/include.workflow_list.php:71 msgid "Publish article"
msgstr "Artikel ver&ouml;ffentlichen"
#: classes/class.workflowactions.php:70
msgid "Lock article"
msgstr "Artikel sperren"
#: classes/class.workflowactions.php:71
msgid "Move back to last editor"
msgstr "Zur&uuml;ck zum letzten Bearbeiter"
#: classes/class.workflowactions.php:72 includes/functions.workflow.php:170
msgid "Reject article"
msgstr "Artikel ablehnen"
#: classes/class.workflowactions.php:73
msgid "Edit article content"
msgstr "Artikelinhalt bearbeiten"
#: classes/class.workflowactions.php:74
msgid "Edit article properties"
msgstr "Artikeleigenschaften bearbeiten"
#: classes/class.workflowactions.php:75
msgid "Edit template"
msgstr "Template bearbeiten"
#: classes/class.workflowactions.php:76 includes/functions.workflow.php:178
msgid "Revise article"
msgstr "Artikel &uuml;berarbeiten"
#: classes/class.workflowallocation.php:106
#: classes/class.workflowallocation.php:203
msgid "Category already has a workflow assigned"
msgstr "Kategorie ist bereits Workflow zugeordnet"
#: classes/class.workflowallocation.php:114
#: classes/class.workflowallocation.php:181 classes/class.workflowitems.php:274
msgid "Workflow doesn't exist"
msgstr "Workflow existiert nicht"
#: classes/class.workflowallocation.php:212
msgid "Category doesn't exist, assignment failed"
msgstr "Kategorie existiert nicht, Zuordnung fehlgeschlagen"
#: classes/class.workflowartallocation.php:67
msgid "Article doesn't exist"
msgstr "Artikel existiert nicht"
#: classes/class.workflowartallocation.php:74
msgid "Article is already assigned to a usersequence step."
msgstr "Artikel ist bereits Benutzerschritt zugeordnet."
#: classes/class.workflowartallocation.php:265
#: classes/class.workflowartallocation.php:273
msgid "Workflow notification"
msgstr "Workflow Notifikation"
#: classes/class.workflowartallocation.php:311
#: classes/class.workflowartallocation.php:320
msgid "Workflow escalation"
msgstr "Workflow Steigerung"
#: classes/class.workflowitems.php:125 classes/class.workflowitems.php:133
#: classes/class.workflowusersequence.php:129
#: classes/class.workflowusersequence.php:137
msgid "Swapping items failed: Item doesn't exist"
msgstr "Tausch der Eintr&auml;ge fehlgeschlagen: Eintrag nicht vorhanden"
#: classes/class.workflowitems.php:158
msgid "Can't add item to workflow: Workflow doesn't exist"
msgstr ""
"Zuordnung des Eintrags zum Workflow nicht m&ouml;glich: Workflow existiert "
"nicht"
#: classes/class.workflowitems.php:233
msgid "No item loaded"
msgstr "Kein Eintrag geladen"
#: classes/class.workflowitems.php:253
msgid "Requested task doesn't exist, can't assign"
msgstr "Gew&uuml;nschte Aufgabe existiert nicht, Zuordnung nicht m&ouml;glich"
#: classes/class.workflowitems.php:281
msgid "Position in this workflow already exists."
msgstr "Position existiert bereits in diesem Workflow."
#: classes/class.workflowusersequence.php:105
msgid "Workflow item doesn't exist. Can't create entry."
msgstr "Workflow existiert nicht. Eintrag kann nicht erstellt werden."
#: classes/class.workflowusersequence.php:212
msgid "Can't set user_id: User or group doesn't exist"
msgstr "Kann Benutzer-Id nicht zuweisen: Benutzer oder Gruppe nicht vorhanden"
#: includes/config.plugin.php:36 includes/include.workflow_list.php:67
msgid "Delete workflow" msgid "Delete workflow"
msgstr "Workflow l&ouml;schen" msgstr "Workflow l&ouml;schen"
#: includes/config.plugin.php:41 #: includes/config.plugin.php:37
msgid "Select workflow task" msgid "Select workflow task"
msgstr "Workflow-Aufgabe auswählen" msgstr "Workflow-Aufgabe auswählen"
#: includes/config.plugin.php:42 #: includes/config.plugin.php:38
msgid "Show workflow" msgid "Show workflow"
msgstr "Workflow zeigen" msgstr "Workflow zeigen"
#: includes/config.plugin.php:43 #: includes/config.plugin.php:39 includes/include.workflow_left_top.php:37
#: includes/include.workflow_left_top.php:37
msgid "Create workflow" msgid "Create workflow"
msgstr "Neuer Workflow" msgstr "Neuer Workflow"
#: includes/config.plugin.php:44 #: includes/config.plugin.php:40 includes/include.workflow_edit.php:89
#: includes/include.workflow_edit.php:89
msgid "Edit workflow" msgid "Edit workflow"
msgstr "Workflow bearbeiten" msgstr "Workflow bearbeiten"
#: includes/config.plugin.php:45 #: includes/config.plugin.php:41
msgid "Process workflow step" msgid "Process workflow step"
msgstr "Workflow Schritt durchf&uuml;hren" msgstr "Workflow Schritt durchf&uuml;hren"
#: includes/config.plugin.php:46 #: includes/config.plugin.php:42 includes/config.plugin.php:43
#: includes/config.plugin.php:47 #: includes/functions.workflow.php:623
#: includes/config.plugin.php:178
msgid "Inherit workflow down" msgid "Inherit workflow down"
msgstr "Workflow nach unten vererben" msgstr "Workflow nach unten vererben"
#: includes/config.plugin.php:48 #: includes/config.plugin.php:44 includes/include.workflow_steps.php:286
#: includes/include.workflow_steps.php:292
msgid "Edit workflow step" msgid "Edit workflow step"
msgstr "Workflow Schritt bearbeiten" msgstr "Workflow Schritt bearbeiten"
#: includes/config.plugin.php:49 #: includes/config.plugin.php:45
msgid "Move workflowstep up" msgid "Move workflowstep up"
msgstr "Workflowschritt nach oben verschieben" msgstr "Workflowschritt nach oben verschieben"
#: includes/config.plugin.php:50 #: includes/config.plugin.php:46
msgid "Move workflowstep down" msgid "Move workflowstep down"
msgstr "Workflowschritt nach unten verschieben" msgstr "Workflowschritt nach unten verschieben"
#: includes/config.plugin.php:51 #: includes/config.plugin.php:47
msgid "Save Workflowstep" msgid "Save Workflowstep"
msgstr "Workflowschritt speichen" msgstr "Workflowschritt speichen"
#: includes/config.plugin.php:52 #: includes/config.plugin.php:48
msgid "Create workflowstep" msgid "Create workflowstep"
msgstr "Workflowschritt erstellen" msgstr "Workflowschritt erstellen"
#: includes/config.plugin.php:53 #: includes/config.plugin.php:49
msgid "Delete workflowstep" msgid "Delete workflowstep"
msgstr "Workflowschritt l&ouml;schen" msgstr "Workflowschritt l&ouml;schen"
#: includes/config.plugin.php:54 #: includes/config.plugin.php:50
msgid "Move workflowstepuser up" msgid "Move workflowstepuser up"
msgstr "Workflowschrittbenutzer nach oben verschieben" msgstr "Workflowschrittbenutzer nach oben verschieben"
#: includes/config.plugin.php:55 #: includes/config.plugin.php:51
msgid "Move workflowstepuser down" msgid "Move workflowstepuser down"
msgstr "Workflowschrittbenutzer nach unten verschieben" msgstr "Workflowschrittbenutzer nach unten verschieben"
#: includes/config.plugin.php:56 #: includes/config.plugin.php:52
msgid "Create Workflowstepuser" msgid "Create Workflowstepuser"
msgstr "Workflowschrittbenutzer erstellen" msgstr "Workflowschrittbenutzer erstellen"
#: includes/config.plugin.php:57 #: includes/config.plugin.php:53
msgid "Delete Workflowstepuser" msgid "Delete Workflowstepuser"
msgstr "Workflowschrittbenutzer l&ouml;schen" msgstr "Workflowschrittbenutzer l&ouml;schen"
#: includes/config.plugin.php:58 #: includes/config.plugin.php:54
msgid "Associate workflow with category" msgid "Associate workflow with category"
msgstr "Workflow zu Kategorien zuweisen" msgstr "Workflow zu Kategorien zuweisen"
#: includes/config.plugin.php:165 #: includes/functions.workflow.php:43 includes/functions.workflow.php:311
#: includes/config.plugin.php:421 #: includes/functions.workflow.php:611 includes/functions.workflow.php:841
#: includes/config.plugin.php:427 #: includes/functions.workflow.php:847 includes/include.workflow_tasks.php:211
#: includes/include.workflow_tasks.php:233
#: includes/functions.workflow.php:54
#: includes/functions.workflow.php:356
msgid "None" msgid "None"
msgstr "Kein" msgstr "Kein"
#: includes/config.plugin.php:197 #: includes/functions.workflow.php:154
msgid "Confirm"
msgstr "Best&auml;tigen"
#: includes/functions.workflow.php:162
msgid "Back to last editor"
msgstr "Zur&uuml;ck zum letzten Bearbeiter"
#: includes/functions.workflow.php:299
msgid "Rejected"
msgstr "Abgelehnt"
#: includes/functions.workflow.php:302
msgid "Revised"
msgstr "&uuml;berarbeitet"
#: includes/functions.workflow.php:305
msgid "Last"
msgstr "Letzter"
#: includes/functions.workflow.php:308
msgid "Confirmed"
msgstr "Best&auml;tigt"
#: includes/functions.workflow.php:639
msgid "Workflow" msgid "Workflow"
msgstr "Workflow" msgstr "Workflow"
#: includes/config.plugin.php:300 #: includes/functions.workflow.php:730 includes/include.workflow_tasks.php:139
#: includes/include.workflow_tasks.php:157
msgid "Workflow Step" msgid "Workflow Step"
msgstr "Workflow Schritt" msgstr "Workflow Schritt"
#: includes/config.plugin.php:301 #: includes/functions.workflow.php:731 includes/include.workflow_tasks.php:140
#: includes/include.workflow_tasks.php:158
msgid "Workflow Action" msgid "Workflow Action"
msgstr "Workflow Aktion" msgstr "Workflow Aktion"
#: includes/config.plugin.php:302 #: includes/functions.workflow.php:732 includes/include.workflow_tasks.php:141
#: includes/include.workflow_tasks.php:159
msgid "Workflow Editor" msgid "Workflow Editor"
msgstr "Workflow Bearbeiter" msgstr "Workflow Bearbeiter"
#: includes/config.plugin.php:303 #: includes/functions.workflow.php:733 includes/include.workflow_tasks.php:142
#: includes/include.workflow_tasks.php:160
msgid "Last status" msgid "Last status"
msgstr "Letzter Status" msgstr "Letzter Status"
#: includes/include.workflow_tasks.php:140
msgid "Show users"
msgstr "Zeige Benutzer"
#: includes/include.workflow_tasks.php:148
msgid "Search results"
msgstr "Suchergebnis"
#: includes/include.workflow_tasks.php:148
msgid "Workflow tasks"
msgstr "Workflow Aufgaben"
#: includes/include.workflow_tasks.php:151
msgid "Article"
msgstr "Artikel"
#: includes/include.workflow_tasks.php:152
msgid "Template"
msgstr "Template"
#: includes/include.workflow_tasks.php:153
#: includes/include.workflow_steps.php:300
msgid "Actions"
msgstr "Aktionen"
#: includes/include.workflow_tasks.php:154
msgid "Title"
msgstr "Titel"
#: includes/include.workflow_tasks.php:155
msgid "Changed"
msgstr "Ge&auml;ndert"
#: includes/include.workflow_tasks.php:156
msgid "Published"
msgstr "Ver&ouml;ffentlichen"
#: includes/include.workflow_tasks.php:225
msgid "Reminder"
msgstr "Wiedervorlage"
#: includes/include.workflow_tasks.php:226
msgid "Set reminder / add to todo list"
msgstr "Wiedervorlage / zur Todoliste hinzuf&uegen"
#: includes/include.workflow_tasks.php:262
#, fuzzy
msgid "No article found."
msgstr "Kein Artikel gefunden"
#: includes/include.workflow_edit.php:86 #: includes/include.workflow_edit.php:86
msgid "New Workflow" msgid "New Workflow"
msgstr "Neuer Workflow" msgstr "Neuer Workflow"
@ -198,256 +259,141 @@ msgstr "Autor"
msgid "Created" msgid "Created"
msgstr "Erstellt" msgstr "Erstellt"
#: includes/include.workflow_list.php:72 #: includes/include.workflow_list.php:68
#, php-format #, php-format
msgid "Do you really want to delete the following workflow:<br><br>%s<br>" msgid "Do you really want to delete the following workflow:<br><br>%s<br>"
msgstr "Wollen Sie wirklich den folgenden Workflow l&ouml;schen:<br><br>%s<br>" msgstr "Wollen Sie wirklich den folgenden Workflow l&ouml;schen:<br><br>%s<br>"
#: includes/include.workflow_steps.php:46 #: includes/include.workflow_steps.php:43
#: includes/include.workflow_steps.php:388 #: includes/include.workflow_steps.php:381
msgid "Add User" msgid "Add User"
msgstr "Benutzer hinzuf&uuml;gen" msgstr "Benutzer hinzuf&uuml;gen"
#: includes/include.workflow_steps.php:78 #: includes/include.workflow_steps.php:75
msgid "New Workflow Step" msgid "New Workflow Step"
msgstr "Neuer Workflow Schritt" msgstr "Neuer Workflow Schritt"
#: includes/include.workflow_steps.php:142 #: includes/include.workflow_steps.php:138
msgid "Seconds" msgid "Seconds"
msgstr "Sekunden" msgstr "Sekunden"
#: includes/include.workflow_steps.php:143 #: includes/include.workflow_steps.php:139
msgid "Minutes" msgid "Minutes"
msgstr "Minuten" msgstr "Minuten"
#: includes/include.workflow_steps.php:144 #: includes/include.workflow_steps.php:140
msgid "Hours" msgid "Hours"
msgstr "Stunden" msgstr "Stunden"
#: includes/include.workflow_steps.php:145 #: includes/include.workflow_steps.php:141
msgid "Days" msgid "Days"
msgstr "Tage" msgstr "Tage"
#: includes/include.workflow_steps.php:146 #: includes/include.workflow_steps.php:142
msgid "Weeks" msgid "Weeks"
msgstr "Wochen" msgstr "Wochen"
#: includes/include.workflow_steps.php:147 #: includes/include.workflow_steps.php:143
msgid "Months" msgid "Months"
msgstr "Monate" msgstr "Monate"
#: includes/include.workflow_steps.php:148 #: includes/include.workflow_steps.php:144
msgid "Years" msgid "Years"
msgstr "Jahre" msgstr "Jahre"
#: includes/include.workflow_steps.php:197 #: includes/include.workflow_steps.php:192
msgid "Move step up" msgid "Move step up"
msgstr "Schritt nach oben bewegen" msgstr "Schritt nach oben bewegen"
#: includes/include.workflow_steps.php:205 #: includes/include.workflow_steps.php:200
msgid "Move step down" msgid "Move step down"
msgstr "Schritt nach unten verschieben" msgstr "Schritt nach unten verschieben"
#: includes/include.workflow_steps.php:215 #: includes/include.workflow_steps.php:210
msgid "Delete step" msgid "Delete step"
msgstr "Schritt l&ouml;schen" msgstr "Schritt l&ouml;schen"
#: includes/include.workflow_steps.php:257 #: includes/include.workflow_steps.php:252
msgid "Create new step" msgid "Create new step"
msgstr "Neuen Schritt erzeugen" msgstr "Neuen Schritt erzeugen"
#: includes/include.workflow_steps.php:293 #: includes/include.workflow_steps.php:287
msgid "Step name" msgid "Step name"
msgstr "Name des Schritts" msgstr "Name des Schritts"
#: includes/include.workflow_steps.php:294 #: includes/include.workflow_steps.php:288
msgid "Step description" msgid "Step description"
msgstr "Beschreibung des Schritts" msgstr "Beschreibung des Schritts"
#: includes/include.workflow_steps.php:301 #: includes/include.workflow_steps.php:294
#: includes/include.workflow_tasks.php:135
msgid "Actions"
msgstr "Aktionen"
#: includes/include.workflow_steps.php:295
msgid "Assigned users" msgid "Assigned users"
msgstr "Zugeordnete Benutzer" msgstr "Zugeordnete Benutzer"
#: includes/include.workflow_steps.php:329 #: includes/include.workflow_steps.php:323
msgid "Move user up" msgid "Move user up"
msgstr "Benutzer nach oben verschieben" msgstr "Benutzer nach oben verschieben"
#: includes/include.workflow_steps.php:338 #: includes/include.workflow_steps.php:332
msgid "Move user down" msgid "Move user down"
msgstr "Benutzer nach unten verschieben" msgstr "Benutzer nach unten verschieben"
#: includes/include.workflow_steps.php:349 #: includes/include.workflow_steps.php:343
msgid "Delete user" msgid "Delete user"
msgstr "Benutzer l&ouml;schen" msgstr "Benutzer l&ouml;schen"
#: includes/include.workflow_steps.php:355 #: includes/include.workflow_steps.php:349
msgid "Notify this user via E-Mail" msgid "Notify this user via E-Mail"
msgstr "Diesen Benutzer per e-Mail benachrichtigen" msgstr "Diesen Benutzer per e-Mail benachrichtigen"
#: includes/include.workflow_steps.php:356 #: includes/include.workflow_steps.php:350
msgid "Escalate to this user via E-Mail" msgid "Escalate to this user via E-Mail"
msgstr "An diesen Benutzer per e-Mail eskalieren" msgstr "An diesen Benutzer per e-Mail eskalieren"
#: includes/functions.workflow.php:183 #: includes/include.workflow_tasks.php:122
msgid "Confirm" msgid "Show users"
msgstr "Best&auml;tigen" msgstr "Zeige Benutzer"
#: includes/functions.workflow.php:192 #: includes/include.workflow_tasks.php:130
msgid "Back to last editor" msgid "Search results"
msgstr "Zur&uuml;ck zum letzten Bearbeiter" msgstr "Suchergebnis"
#: includes/functions.workflow.php:201 #: includes/include.workflow_tasks.php:130
#: classes/class.workflowactions.php:77 msgid "Workflow tasks"
msgid "Reject article" msgstr "Workflow Aufgaben"
msgstr "Artikel ablehnen"
#: includes/functions.workflow.php:210 #: includes/include.workflow_tasks.php:133
#: classes/class.workflowactions.php:81 msgid "Article"
msgid "Revise article" msgstr "Artikel"
msgstr "Artikel &uuml;berarbeiten"
#: includes/functions.workflow.php:344 #: includes/include.workflow_tasks.php:134
msgid "Rejected" msgid "Template"
msgstr "Abgelehnt" msgstr "Template"
#: includes/functions.workflow.php:347 #: includes/include.workflow_tasks.php:136
msgid "Revised" msgid "Title"
msgstr "&uuml;berarbeitet" msgstr "Titel"
#: includes/functions.workflow.php:350 #: includes/include.workflow_tasks.php:137
msgid "Last" msgid "Changed"
msgstr "Letzter" msgstr "Ge&auml;ndert"
#: includes/functions.workflow.php:353 #: includes/include.workflow_tasks.php:138
msgid "Confirmed" msgid "Published"
msgstr "Best&auml;tigt" msgstr "Ver&ouml;ffentlichen"
#: classes/class.workflowartallocation.php:72 #: includes/include.workflow_tasks.php:203
msgid "Article doesn't exist" msgid "Reminder"
msgstr "Artikel existiert nicht." msgstr "Wiedervorlage"
#: classes/class.workflowartallocation.php:80 #: includes/include.workflow_tasks.php:204
msgid "Article is already assigned to a usersequence step." msgid "Set reminder / add to todo list"
msgstr "Artikel ist bereits Benutzerschritt zugeordnet." msgstr "Wiedervorlage / zur Todoliste hinzuf&uegen"
#: classes/class.workflowartallocation.php:286 #: includes/include.workflow_tasks.php:240
#: classes/class.workflowartallocation.php:295 msgid "No article found."
msgid "Workflow notification" msgstr "Kein Artikel gefunden."
msgstr "Workflow Notifikation"
#: classes/class.workflowartallocation.php:336
#: classes/class.workflowartallocation.php:346
msgid "Workflow escalation"
msgstr "Workflow Steigerung"
#: classes/class.workflowallocation.php:117
#: classes/class.workflowallocation.php:223
msgid "Category already has a workflow assigned"
msgstr "Kategorie ist bereits Workflow zugeordnet"
#: classes/class.workflowallocation.php:126
#: classes/class.workflowallocation.php:199
#: classes/class.workflowitems.php:299
msgid "Workflow doesn't exist"
msgstr "Workflow existiert nicht"
#: classes/class.workflowallocation.php:233
msgid "Category doesn't exist, assignment failed"
msgstr "Kategorie existiert nicht, Zuordnung fehlgeschlagen"
#: classes/class.workflowitems.php:133
#: classes/class.workflowitems.php:142
#: classes/class.workflowusersequence.php:139
#: classes/class.workflowusersequence.php:148
msgid "Swapping items failed: Item doesn't exist"
msgstr "Tausch der Eintr&auml;ge fehlgeschlagen: Eintrag nicht vorhanden"
#: classes/class.workflowitems.php:169
msgid "Can't add item to workflow: Workflow doesn't exist"
msgstr "Zuordnung des Eintrags zum Workflow nicht m&ouml;glich: Workflow existiert nicht"
#: classes/class.workflowitems.php:251
msgid "No item loaded"
msgstr "Kein Eintrag geladen"
#: classes/class.workflowitems.php:276
msgid "Requested task doesn't exist, can't assign"
msgstr "Gew&uuml;nschte Aufgabe existiert nicht, Zuordnung nicht m&ouml;glich"
#: classes/class.workflowitems.php:307
msgid "Position in this workflow already exists."
msgstr "Position existiert bereits in diesem Workflow."
#: classes/class.workflowactions.php:74
msgid "Publish article"
msgstr "Artikel ver&ouml;ffentlichen"
#: classes/class.workflowactions.php:75
msgid "Lock article"
msgstr "Artikel sperren"
#: classes/class.workflowactions.php:76
msgid "Move back to last editor"
msgstr "Zur&uuml;ck zum letzten Bearbeiter"
#: classes/class.workflowactions.php:78
msgid "Edit article content"
msgstr "Artikelinhalt bearbeiten"
#: classes/class.workflowactions.php:79
msgid "Edit article properties"
msgstr "Artikeleigenschaften bearbeiten"
#: classes/class.workflowactions.php:80
msgid "Edit template"
msgstr "Template bearbeiten"
#: classes/class.workflowusersequence.php:112
msgid "Workflow item doesn't exist. Can't create entry."
msgstr "Workflow existiert nicht. Eintrag kann nicht erstellt werden."
#: classes/class.workflowusersequence.php:229
msgid "Can't set user_id: User or group doesn't exist"
msgstr "Kann Benutzer-Id nicht zuweisen: Benutzer oder Gruppe nicht vorhanden"
#~ msgid "Recently edited articles"
#~ msgstr "Zuletzt bearbeitete Artikel"
#~ msgid "Change client"
#~ msgstr "Mandanten wechseln"
#~ msgid "Welcome"
#~ msgstr "Willkommen"
#~ msgid "You are logged in as"
#~ msgstr "Sie sind angemeldet als"
#~ msgid "Last login"
#~ msgstr "Letzter Login"
#~ msgid "Article is online"
#~ msgstr "Artikel ist online"
#~ msgid "Article is offline"
#~ msgstr "Artikel ist offline"
#~ msgid "Current workflow tasks"
#~ msgstr "Aktuelle Workflow Aufgaben"
#~ msgid "Client"
#~ msgstr "Mandant"
#~ msgid "Language"
#~ msgstr "Sprache"
#~ msgid "No tasks found"
#~ msgstr "Keine Aufgabe gefunden"
#~ msgid "Status"
#~ msgstr "Status"
#~ msgid "Step"
#~ msgstr "Schritt"
#~ msgid "Assign workflow to category"
#~ msgstr "Workflow einer Kategorie zuordnen"

Binäre Datei nicht angezeigt.

Datei anzeigen

@ -1,18 +1,19 @@
./includes/include.workflow_subnav.php ./classes/class.workflowusersequence.php
./includes/config.plugin.php ./classes/class.workflowactions.php
./includes/include.workflow_tasks.php ./classes/class.workflow.php
./includes/include.workflow_edit.php ./classes/class.workflowartallocation.php
./includes/include.workflow_left_top.php ./classes/class.workflowitems.php
./includes/include.workflow_list.php ./classes/class.workflowallocation.php
./includes/include.workflow_steps.php ./classes/class.workflowtasks.php
./includes/functions.workflow.php
./cronjobs/advance_workflow.php
./templates/template.workflow_steps.html ./templates/template.workflow_steps.html
./templates/template.workflow_tasks.html ./templates/template.workflow_tasks.html
./classes/class.workflowartallocation.php ./includes/include.workflow_tasks.php
./classes/class.workflowallocation.php ./includes/include.workflow_left_top.php
./classes/class.workflowitems.php ./includes/config.autoloader.php
./classes/class.workflowactions.php ./includes/config.plugin.php
./classes/class.workflowtasks.php ./includes/functions.workflow.php
./classes/class.workflowusersequence.php ./includes/include.workflow_steps.php
./classes/class.workflow.php ./includes/include.workflow_subnav.php
./includes/include.workflow_list.php
./includes/include.workflow_edit.php
./cronjobs/advance_workflow.php

11
plugin_install.sql Normale Datei
Datei anzeigen

@ -0,0 +1,11 @@
CREATE TABLE IF NOT EXISTS !PREFIX!wf_actions (
idworkflowaction int(10) NOT NULL auto_increment,
idworkflowitem int(10) NOT NULL default 0,
action varchar(255) NOT NULL,
PRIMARY KEY (idworkflowaction)
);
CREATE TABLE IF NOT EXISTS !PREFIX!wf_allocation (idallocation int(10) NOT NULL auto_increment, idworkflow int(10) NOT NULL default 0, idcatlang int(10) NOT NULL default 0, PRIMARY KEY (idallocation));
CREATE TABLE IF NOT EXISTS !PREFIX!wf_art_allocation (idartallocation int(10) NOT NULL auto_increment, idartlang int(10) NOT NULL default 0, idusersequence int(10) NOT NULL default 0, starttime datetime NOT NULL, laststatus varchar(32) default NULL, lastusersequence int(10) NOT NULL default 0, PRIMARY KEY (idartallocation));
CREATE TABLE IF NOT EXISTS !PREFIX!wf_items (idworkflowitem int(10) NOT NULL auto_increment, idworkflow int(10) NOT NULL default 0, position int(10) NOT NULL default 0, name varchar(255) NOT NULL default 0, description text NOT NULL, idtask int(10) NOT NULL default 0, PRIMARY KEY (idworkflowitem));
CREATE TABLE IF NOT EXISTS !PREFIX!wf_user_sequences (idusersequence int(10) NOT NULL auto_increment, idworkflowitem int(10) NOT NULL default 0, iduser varchar(32) NOT NULL, position int(10) NOT NULL default 0, timelimit int(10) NOT NULL default 0, timeunit varchar(32) NOT NULL, emailnoti int(10) NOT NULL default 0, escalationnoti int(10) NOT NULL default 0, PRIMARY KEY (idusersequence));
CREATE TABLE IF NOT EXISTS !PREFIX!wf_workflow (idworkflow int(10) NOT NULL auto_increment, idclient int(10) NOT NULL default 0, idlang int(10) NOT NULL default 0, idauthor varchar(32) NOT NULL, name varchar(255) NOT NULL, description text NOT NULL, created datetime NOT NULL, PRIMARY KEY (idworkflow));

6
plugin_uninstall.sql Normale Datei
Datei anzeigen

@ -0,0 +1,6 @@
DROP TABLE !PREFIX!wf_actions;
DROP TABLE !PREFIX!wf_allocation;
DROP TABLE !PREFIX!wf_art_allocation;
DROP TABLE !PREFIX!wf_items;
DROP TABLE !PREFIX!wf_user_sequences;
DROP TABLE !PREFIX!wf_workflow;

Datei anzeigen

@ -9,5 +9,5 @@
{EDITSTEP} {EDITSTEP}
</div> </div>
<div class="right_list"> <div class="right_list">
i18n('Warning: Changes will reset active Workflows') i18n("Warning: Changes will reset active Workflows")
</div> </div>

Datei anzeigen

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" <!DOCTYPE HTML>
"http://www.w3.org/TR/html4/loose.dtd">
<html> <html>
<head> <head>
<meta charset="utf-8">
<title>{TITLE}</title> <title>{TITLE}</title>
<meta http-equiv="expires" content="0"> <meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="cache-control" content="no-cache">
@ -76,7 +76,9 @@
rcount = 0; rcount = 0;
/* Update frame right top for sub navigation */ /* Update frame right top for sub navigation */
{SUBNAVI} {
SUBNAVI
}
/* Create a reference to the Article Object in frame 'right_top' */ /* Create a reference to the Article Object in frame 'right_top' */
artObj = parent.parent.frames["left"].frames["left_top"].artObj; artObj = parent.parent.frames["left"].frames["left_top"].artObj;