Skip to content

Commit

Permalink
#40 Fix
Browse files Browse the repository at this point in the history
creecros committed Jun 18, 2019
1 parent 8b5f5cf commit d58daa9
Showing 12 changed files with 43 additions and 11 deletions.
1 change: 1 addition & 0 deletions Controller/MetadataController.php
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
* Metadata.
*
* @author BlueTeck
* @author Craig Crosby
*/
class MetadataController extends BaseController
{
4 changes: 3 additions & 1 deletion Controller/MetadataTypesController.php
Original file line number Diff line number Diff line change
@@ -7,7 +7,9 @@

/**
* Class MetadataTypes.
*
*
* @author Craig Crosby
*
*/
class MetadataTypesController extends BaseController
{
2 changes: 1 addition & 1 deletion Controller/NewExportController.php
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
* Export Controller
*
* @package Kanboard\Controller
* @author Frederic Guillot
* @author Craig Crosby
*/
class NewExportController extends BaseController
{
2 changes: 2 additions & 0 deletions Export/MetaTaskExport.php
Original file line number Diff line number Diff line change
@@ -14,6 +14,8 @@

/**
* Task Export
*
* author Craig Crosby
*
*/
class MetaTaskExport extends Base
2 changes: 2 additions & 0 deletions Filter/MetaFieldFilter.php
Original file line number Diff line number Diff line change
@@ -11,6 +11,8 @@

/**
* Class Metadata Field Filter
*
* author Craig Crosby
*
*/
class MetaFieldFilter extends BaseFilter implements FilterInterface
2 changes: 2 additions & 0 deletions Filter/MetaValueFilter.php
Original file line number Diff line number Diff line change
@@ -11,6 +11,8 @@

/**
* Class Metadata Value Filter
*
* author Craig Crosby
*
*/
class MetaValueFilter extends BaseFilter implements FilterInterface
2 changes: 2 additions & 0 deletions Helper/MetaHelper.php
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@

/**
* Meta helper
*
* author Craig Crosby
*
*/
class MetaHelper extends Base
3 changes: 2 additions & 1 deletion Model/MetadataTypeModel.php
Original file line number Diff line number Diff line change
@@ -5,9 +5,10 @@
use Kanboard\Core\Base;

/**
* Class MetadataType.
* Class Kanboard\Plugin\MetaMagik\Model;
*
* @author Daniele Lenares <[email protected]>
* @author Craig Crosby <[email protected]>
*/
class MetadataTypeModel extends Base
{
4 changes: 2 additions & 2 deletions Model/NewTaskDuplicationModel.php
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@
/**
* Task Duplication
*
* @package Kanboard\Model
* @author Frederic Guillot
* @package Kanboard\Plugin\MetaMagik
* @author Craig Crosby
*/
class NewTaskDuplicationModel extends Base
{
26 changes: 23 additions & 3 deletions Model/NewTaskModificationModel.php
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@
/**
* Task Modification
*
* @package Kanboard\Model
* @author Frederic Guillot
* @package Kanboard\Plugin\MetaMagik
* @author Craig Crosby
*/
class NewTaskModificationModel extends Base
{
@@ -30,7 +30,7 @@ public function update(array $values, $fire_events = true)
$task = $this->taskFinderModel->getById($values['id']);

$this->updateTags($values, $task);
$this->updateMeta($values, $task);
if($this->checkKeys($values))$this->updateMeta($values, $task);
$this->prepare($values);
$result = $this->db->table(TaskModel::TABLE)->eq('id', $task['id'])->update($values);

@@ -40,6 +40,26 @@ public function update(array $values, $fire_events = true)

return $result;
}

/**
* Check for metakey
*
* @access public
* @param array $values
* @return boolean
*/
public function checkKeys($values)
{

if(count(preg_grep('/^metamagikkey[\d]*/', array_keys($values))) > 0)
{
return true;
}
else
{
return false;
}
}

/**
* Fire events
4 changes: 2 additions & 2 deletions Model/NewTaskProjectDuplicationModel.php
Original file line number Diff line number Diff line change
@@ -18,8 +18,8 @@
/**
* Task Project Duplication
*
* @package Kanboard\Model
* @author Frederic Guillot
* @package Kanboard\Plugin\MetaMagik
* @author Craig Crosby
*/
class NewTaskProjectDuplicationModel extends TaskDuplicationModel
{
2 changes: 1 addition & 1 deletion Plugin.php
Original file line number Diff line number Diff line change
@@ -113,7 +113,7 @@ public function getPluginAuthor()

public function getPluginVersion()
{
return '1.2.5';
return '1.2.6';
}

public function getPluginHomepage()

0 comments on commit d58daa9

Please sign in to comment.