Skip to content

Commit

Permalink
Fixed reindexing on changing keywords and description.
Browse files Browse the repository at this point in the history
  • Loading branch information
parpalak committed Mar 28, 2024
1 parent 02c16d3 commit 48bf96b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _admin/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,22 @@ function s2_save_article ($page, $flags)
$modify_time = !empty($page['modify_time']) ? s2_timestamp_from_form_time($page['modify_time']) : time();

$query = array(
'SELECT' => 'user_id, parent_id, revision, pagetext, title, url',
'SELECT' => 'user_id, parent_id, revision, pagetext, title, url, meta_keys, meta_desc',
'FROM' => 'articles',
'WHERE' => 'id = '.$id
);
($hook = s2_hook('fn_save_article_pre_get_art_qr')) ? eval($hook) : null;
$result = $s2_db->buildAndQuery($query);

if ($row = $s2_db->fetchRow($result))
list($user_id, $parent_id, $revision, $pagetext, $title, $url) = $row;
list($user_id, $parent_id, $revision, $pagetext, $title, $url, $metaKeys, $metaDesc) = $row;
else
die('Item not found!');

if (!$s2_user['edit_site'])
s2_test_user_rights($user_id == $s2_user['id']);

if ($page['text'] != $pagetext || $page['title'] != $title || $page['url'] != $url) {
if ($page['text'] != $pagetext || $page['title'] != $title || $page['url'] != $url || $page['meta_keys'] !== $metaKeys || $page['meta_desc'] !== $metaDesc) {
// If the page text has been modified, we check if this modification is done by current user
if ($revision !== (int)$page['revision']) {
return array($parent_id, $revision, 'conflict'); // No, it's somebody else
Expand Down

0 comments on commit 48bf96b

Please sign in to comment.