Skip to content

Commit

Permalink
Merge pull request #92 from funktechno/h/modelname
Browse files Browse the repository at this point in the history
Fix incomplete model renaming
  • Loading branch information
alfredbuehler authored Aug 19, 2024
2 parents 207d92f + 98a2388 commit 12c5508
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
7 changes: 3 additions & 4 deletions Model/WikiFileModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Kanboard\Plugin\Wiki\Model;

use Kanboard\Model\FileModel;
use Kanboard\Plugin\Wiki\Model\Wiki;

/**
* Wiki File Model
Expand All @@ -26,7 +25,7 @@ class WikiFileModel extends FileModel
* @var string
*/
const EVENT_CREATE = 'wiki.file.create';


/**
* Get the table
Expand All @@ -39,7 +38,7 @@ protected function getTable()
{
return self::TABLE;
}


/**
* Define the foreign key
Expand Down Expand Up @@ -105,7 +104,7 @@ protected function fireCreationEvent($file_id)
{
return null;
}

protected function fireDestructionEvent($file_id)
{
return null;
Expand Down
9 changes: 4 additions & 5 deletions Model/WikiModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Kanboard\Core\Base;
use Kanboard\Core\Controller\PageNotFoundException;
use Kanboard\Core\Controller\AccessForbiddenException;
// use Kanboard\Model\WikiModel;
use Kanboard\Model\UserModel;
use SimpleValidator\Validator;
use SimpleValidator\Validators;
Expand Down Expand Up @@ -53,7 +52,7 @@ public function getEditions($wiki_id)
const EVENT_UPDATE = 'wikipage.update';
const EVENT_CREATE = 'wikipage.create';
const EVENT_DELETE = 'wikipage.delete';


/**
* retrieve wikipages by parent id
Expand Down Expand Up @@ -178,7 +177,7 @@ public function reorderPagesByIndex($project_id, $src_wiki_id, $index, $parent_i

// echo json_encode($wikiPages), true;

// echo "project_id: " . $project_id . " src_wiki_id: " . $src_wiki_id . " index: " .
// echo "project_id: " . $project_id . " src_wiki_id: " . $src_wiki_id . " index: " .
$index . " parent_id: " . $parent_id ." count list: " . count($wikiPages) . "<br>";
// change order of each in for loop, move matching id to one before target
$orderColumn = 0;
Expand Down Expand Up @@ -260,7 +259,7 @@ public function reorderPages($project_id, $src_wiki_id, $target_wiki_id){
if(!$result){
return false;
}
}
}
}
$orderColumn++;
}
Expand Down Expand Up @@ -436,7 +435,7 @@ public function updatepage($paramvalues, $editions, $date = '')
if ($this->userSession->isLogged()) {
$values['modifier_id'] = $this->userSession->getId();
}

$wikiEventJob = new WikiEventJob($this->container);
$wikiEventJob->executeWithId($paramvalues['id'], self::EVENT_UPDATE);
// $wikiEventJob = new WikiEventJob($this->container);
Expand Down
10 changes: 5 additions & 5 deletions Template/wiki_list/sort_menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><strong><?= t('Sort') ?> <i class="fa fa-caret-down"></i></strong></a>
<ul>
<li>
<?= $paginator->order(t('Project ID'), \Kanboard\Plugin\Wiki\Model\Wiki::WIKITABLE.'.id') ?>
<?= $paginator->order(t('Project ID'), \Kanboard\Plugin\Wiki\Model\WikiModel::WIKITABLE.'.id') ?>
</li>
<li>
<?= $paginator->order(t('Wiki page Title'), \Kanboard\Plugin\Wiki\Model\Wiki::WIKITABLE.'.title') ?>
<?= $paginator->order(t('Wiki page Title'), \Kanboard\Plugin\Wiki\Model\WikiModel::WIKITABLE.'.title') ?>
</li>
<li>
<?= $paginator->order(t('Date Created'), \Kanboard\Plugin\Wiki\Model\Wiki::WIKITABLE.'.date_creation') ?>
<?= $paginator->order(t('Date Created'), \Kanboard\Plugin\Wiki\Model\WikiModel::WIKITABLE.'.date_creation') ?>
</li>
<li>
<?= $paginator->order(t('Date Modified'), \Kanboard\Plugin\Wiki\Model\Wiki::WIKITABLE.'.date_modification') ?>
</li>
<?= $paginator->order(t('Date Modified'), \Kanboard\Plugin\Wiki\Model\WikiModel::WIKITABLE.'.date_modification') ?>
</li>
</ul>
</div>

0 comments on commit 12c5508

Please sign in to comment.