summaryrefslogtreecommitdiffstats
path: root/models/issue_comment.go
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-06-18 05:06:17 -0400
committerLunny Xiao <xiaolunwen@gmail.com>2017-06-18 17:06:17 +0800
commit255adc40ae1e0a03547326f143f685be41fa591f (patch)
tree01959c4c9b8cc62c906205aced21954d0ae90573 /models/issue_comment.go
parent4df1a240965f6d3f4e3eed2bd4bddceeb9182614 (diff)
downloadgitea-255adc40ae1e0a03547326f143f685be41fa591f.tar.gz
gitea-255adc40ae1e0a03547326f143f685be41fa591f.zip
Don't show non-comments in comments API (#2001)
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r--models/issue_comment.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index 91d8551518..ead3f1bed3 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -572,6 +572,7 @@ func getCommentsByIssueIDSince(e Engine, issueID, since int64) ([]*Comment, erro
comments := make([]*Comment, 0, 10)
sess := e.
Where("issue_id = ?", issueID).
+ Where("type = ?", CommentTypeComment).
Asc("created_unix")
if since > 0 {
sess.And("updated_unix >= ?", since)
@@ -582,6 +583,7 @@ func getCommentsByIssueIDSince(e Engine, issueID, since int64) ([]*Comment, erro
func getCommentsByRepoIDSince(e Engine, repoID, since int64) ([]*Comment, error) {
comments := make([]*Comment, 0, 10)
sess := e.Where("issue.repo_id = ?", repoID).
+ Where("comment.type = ?", CommentTypeComment).
Join("INNER", "issue", "issue.id = comment.issue_id").
Asc("comment.created_unix")
if since > 0 {
stable28-update-code-signing-crl'>automated/noid/stable28-update-code-signing-crl Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/status.php
blob: bac01c11b288bc9dd58161d8e808b8c9380db490 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php

/**
* ownCloud status page. Useful if you want to check from the outside if an ownCloud installation exists
*
* @author Frank Karlitschek
* @copyright 2012 Frank Karlitschek frank@owncloud.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
*
*/

$RUNTIME_NOAPPS = true; //no apps, yet

try {

	require_once 'lib/base.php';

	if(OC_Config::getValue('installed')==1) $installed='true'; else $installed='false';
	$values=array(
		'installed'=>$installed,
		'version'=>implode('.', OC_Util::getVersion()),
		'versionstring'=>OC_Util::getVersionString(),
		'edition'=>OC_Util::getEditionString());

	echo(json_encode($values));

} catch (Exception $ex) {
	OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
	\OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
}