1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-19 21:02:09 +02:00

Issue #3291 gSitemap table changes. Generic handling of link updates via e_gsitemap.php

This commit is contained in:
Cameron
2020-12-23 15:03:31 -08:00
parent c43da4d7aa
commit 450e392741
5 changed files with 132 additions and 226 deletions

View File

@@ -4829,12 +4829,31 @@ class e_admin_controller_ui extends e_admin_controller
$pid = $this->getPrimaryName();
$_posted[$pid] = $id; // add in the primary ID field.
$table = $this->getTableName();
$pname = $this->getPluginName();
if($pname === 'core') // Handler 'core' plugin value.
{
$convert = array(
'news_category' => 'news',
'news' => 'news',
'page' => 'page',
'page_chapters' => 'page',
'user' => 'user'
);
if(!empty($convert[$table]))
{
$pname = $convert[$table];
}
}
$eventData = array( // use $_posted as it may include unsaved data.
'newData' => $_posted,
'oldData' => $old_data,
'id' => $id,
'table' => $this->getTableName(),
'plugin' => $this->getPluginName(),
'table' => $table,
'plugin' => $pname,
);
$this->_log('Triggering Event: ' . $triggerName);