4
0
Fork 0

update 2023-07-22 11:43:42

This commit is contained in:
Robot 2023-07-22 11:43:42 +02:00
parent 47d0215d74
commit 063b9d3c9d
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
2 changed files with 24 additions and 14 deletions

View File

@ -136,7 +136,7 @@ final class Tagged
}
// create a new tag
elseif ($this->create($linker, $translation, $book, $chapter, $verse, $tag)
&& ($_tag = $this->get($linker, $translation, $book, $chapter, $verse, $tag)) !== null)
&& ($_tag = $this->get($linker, $book, $chapter, $verse, $tag)) !== null)
{
$_tag->success = Text::_('COM_GETBIBLE_THE_VERSE_WAS_SUCCESSFULLY_TAGGED');
return (array) $_tag;
@ -167,14 +167,11 @@ final class Tagged
}
// make sure the linker has access to delete this tag
if (($id = $this->load->value(['linker' => $linker, 'guid' => $tag], 'id', 'tagged_verse')) !== null && $id > 0)
if (($id = $this->load->value(['linker' => $linker, 'guid' => $tag], 'id', 'tagged_verse')) !== null && $id > 0
&& $this->update->value(-2, 'published', $id, 'id', 'tagged_verse'))
{
return [
'success' => Text::_('COM_GETBIBLE_THE_TAG_WAS_SUCCESSFULLY_REMOVED_FROM_THE_VERSE'),
'what' => $this->update->value(-2, 'published', $id, 'id', 'tagged_verse'),
'id' => $id,
'guid' => $tag,
'linker' => $linker
'success' => Text::_('COM_GETBIBLE_THE_TAG_WAS_SUCCESSFULLY_REMOVED_FROM_THE_VERSE')
];
}
@ -212,6 +209,14 @@ final class Tagged
'tag' => $tag
], 'tagged_verse')) !== null)
{
$_tag->name = $this->load->value([
'guid' => $tag
], 'name', 'tag');
$_tag->description = $this->load->value([
'guid' => $tag
], 'description', 'tag');
return $_tag;
}

View File

@ -107,7 +107,7 @@
}
// create a new tag
elseif ($this->create($linker, $translation, $book, $chapter, $verse, $tag)
&& ($_tag = $this->get($linker, $translation, $book, $chapter, $verse, $tag)) !== null)
&& ($_tag = $this->get($linker, $book, $chapter, $verse, $tag)) !== null)
{
$_tag->success = Text::_('The verse was successfully tagged.');
return (array) $_tag;
@ -138,14 +138,11 @@
}
// make sure the linker has access to delete this tag
if (($id = $this->load->value(['linker' => $linker, 'guid' => $tag], 'id', 'tagged_verse')) !== null && $id > 0)
if (($id = $this->load->value(['linker' => $linker, 'guid' => $tag], 'id', 'tagged_verse')) !== null && $id > 0
&& $this->update->value(-2, 'published', $id, 'id', 'tagged_verse'))
{
return [
'success' => Text::_('The tag was successfully removed from the verse.'),
'what' => $this->update->value(-2, 'published', $id, 'id', 'tagged_verse'),
'id' => $id,
'guid' => $tag,
'linker' => $linker
'success' => Text::_('The tag was successfully removed from the verse.')
];
}
@ -183,6 +180,14 @@
'tag' => $tag
], 'tagged_verse')) !== null)
{
$_tag->name = $this->load->value([
'guid' => $tag
], 'name', 'tag');
$_tag->description = $this->load->value([
'guid' => $tag
], 'description', 'tag');
return $_tag;
}