diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-06-12 17:08:29 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2024-06-13 13:34:20 +0200 |
commit | fb1c66fbc9705961454d86770511642b97b41c1a (patch) | |
tree | b1dc55f9250cce0d4f23db9210aca6cfbff96dd9 | |
parent | d02fa7c26805dd485b1d16e99a26a5b9a858deda (diff) | |
download | volse-hubzilla-fb1c66fbc9705961454d86770511642b97b41c1a.tar.gz volse-hubzilla-fb1c66fbc9705961454d86770511642b97b41c1a.tar.bz2 volse-hubzilla-fb1c66fbc9705961454d86770511642b97b41c1a.zip |
Fix warnings exposed by tests.
Mainly missing variables for templates, and channel entries.
-rw-r--r-- | Zotlabs/Module/Rpost.php | 3 | ||||
-rw-r--r-- | include/conversation.php | 3 | ||||
-rw-r--r-- | tests/unit/Module/RpostTest.php | 11 | ||||
-rw-r--r-- | view/tpl/jot-header.tpl | 2 |
4 files changed, 11 insertions, 8 deletions
diff --git a/Zotlabs/Module/Rpost.php b/Zotlabs/Module/Rpost.php index 76ff69643..3b64fd2d8 100644 --- a/Zotlabs/Module/Rpost.php +++ b/Zotlabs/Module/Rpost.php @@ -119,7 +119,8 @@ class Rpost extends \Zotlabs\Web\Controller { return replace_macros(get_markup_template('edpost_head.tpl'), array( '$title' => t('Edit post'), '$cancel' => '', - '$editor' => $editor + '$editor' => $editor, + '$delete' => null, )); } diff --git a/include/conversation.php b/include/conversation.php index 3992f06f6..c631d53a2 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1183,6 +1183,7 @@ function hz_status_editor($x, $popup = false) { '$modalerroralbum' => t('Error getting album'), '$nocomment_enabled' => t('Comments enabled'), '$nocomment_disabled' => t('Comments disabled'), + '$confirmdelete' => t('Confirm delete'), '$auto_save_draft' => $feature_auto_save_draft, '$reset' => $reset, '$popup' => $popup @@ -1263,7 +1264,7 @@ function hz_status_editor($x, $popup = false) { '$poll_option_label' => t('Option'), '$poll_add_option_label' => t('Add option'), '$poll_expire_unit_label' => [t('Minutes'), t('Hours'), t('Days')], - '$multiple_answers' => ['poll_multiple_answers', t("Allow multiple answers"), '', '', [t('No'), t('Yes')]], + '$multiple_answers' => ['poll_multiple_answers', t("Allow multiple answers"), '', '', [t('No'), t('Yes')],null,null], '$consensus' => ((array_key_exists('item',$x)) ? $x['item']['item_consensus'] : 0), '$nocommenttitle' => t('Disable comments'), '$nocommenttitlesub' => t('Toggle comments'), diff --git a/tests/unit/Module/RpostTest.php b/tests/unit/Module/RpostTest.php index 106f06fde..ad94f2f06 100644 --- a/tests/unit/Module/RpostTest.php +++ b/tests/unit/Module/RpostTest.php @@ -67,10 +67,13 @@ class RpostTest extends \Zotlabs\Tests\Unit\Module\TestCase { // Set basic access controls to keep AccessList happy. \App::$channel = [ - 'channel_allow_cid' => null, - 'channel_allow_gid' => null, - 'channel_deny_cid' => null, - 'channel_deny_gid' => null, + 'channel_id' => 42, + 'channel_location' => null, + 'channel_address' => '', + 'channel_allow_cid' => '', + 'channel_allow_gid' => '', + 'channel_deny_cid' => '', + 'channel_deny_gid' => '', ]; $this->get('rpost', $query); diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index ca3cabd61..67ba1824b 100644 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -184,7 +184,6 @@ var activeCommentText = ''; } function jotGetExpiry() { - //reply = prompt("{{$expirewhen}}", $('#jot-expire').val()); $('#expiryModal').modal('show'); $('#expiry-modal-OKButton').on('click', function() { reply=$('#expiration-date').val(); @@ -196,7 +195,6 @@ var activeCommentText = ''; } function jotGetPubDate() { - //reply = prompt("{{$expirewhen}}", $('#jot-expire').val()); $('#createdModal').modal('show'); $('#created-modal-OKButton').on('click', function() { reply=$('#created-date').val(); |