svn: /web/php-bugs/trunk/www/ api.php

From: Date: Wed, 13 Jul 2011 15:13:10 +0000
Subject: svn: /web/php-bugs/trunk/www/ api.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-11611@lists.php.net to get a copy of this message
philip Wed, 13 Jul 2011 15:13:10 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=313207 Log: Allow a configurable interval of days. Broke BC ('week') as I doubt anyone else uses this yet. Changed paths: U web/php-bugs/trunk/www/api.php Modified: web/php-bugs/trunk/www/api.php =================================================================== --- web/php-bugs/trunk/www/api.php 2011-07-13 14:24:13 UTC (rev 313206) +++ web/php-bugs/trunk/www/api.php 2011-07-13 15:13:10 UTC (rev 313207) @@ -3,15 +3,15 @@ Hack note: This is for emailing the documentation team about commit/bugs emails, but could be expanded in the future. The API itself will probably be abandoned in the future, but here's the current URL: - - https://bugs.php.net/api.php?type=docs&action=closed&interval=week + - https://bugs.php.net/api.php?type=docs&action=closed&interval=7 */ require_once '../include/prepend.php'; $type = isset($_GET['type']) ? $_GET['type'] : 'unknown'; $action = isset($_GET['action']) ? $_GET['action'] : 'unknown'; -$interval = isset($_GET['interval']) ? $_GET['interval'] : 'unknown'; +$interval = isset($_GET['interval']) ? (int) $_GET['interval'] : 7; -if ($type === 'docs' && $action === 'closed' && $interval === 'week') { +if ($type === 'docs' && $action === 'closed' && $interval) { $query = " @@ -20,7 +20,7 @@ WHERE comment_type = 'log' AND package_name IN ('Doc Build problem', 'Documentation problem', 'Translation problem', 'Online Doc Editor problem') AND comment LIKE '%+Status: Closed</span>%' - AND date_sub(curdate(), INTERVAL 7 DAY) <= ts + AND date_sub(curdate(), INTERVAL {$interval} DAY) <= ts AND bugdb.id = bugdb_comments.bug GROUP BY bugdb_comments.reporter_name ORDER BY count DESC

« previous php.webmaster (#11611) next »