Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d1750eaaf | ||
|
|
c9e896c27e | ||
|
|
dd61225eae | ||
|
|
980321b73f | ||
|
|
25939cc553 |
@@ -11,11 +11,11 @@ if (!$S->isAnonymous() && $S->user->isAllowed())
|
|||||||
Layout::header();
|
Layout::header();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<p>This application is used for analyzing crash reports and statitstics for the Singularity
|
<p>This application is used for analyzing crash reports and statistics for the Singularity
|
||||||
Viewer project.</p>
|
Viewer project.</p>
|
||||||
|
|
||||||
<p>Access to this tool is granted to the members of the development team.
|
<p>Access to this tool is granted to the members of the development team.
|
||||||
The main goal is to identify the most common problems and improve the expierience
|
The main goal is to identify the most common problems and improve the experience
|
||||||
for the users of Singularity Viewer.</p>
|
for the users of Singularity Viewer.</p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ class DBH
|
|||||||
|
|
||||||
function log($line)
|
function log($line)
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
static $f = false;
|
static $f = false;
|
||||||
static $failed = false;
|
static $failed = false;
|
||||||
|
|
||||||
@@ -50,7 +49,7 @@ class DBH
|
|||||||
$this->db_pass = $db_pass;
|
$this->db_pass = $db_pass;
|
||||||
$this->db_user = $db_user;
|
$this->db_user = $db_user;
|
||||||
$this->db_host = $db_host;
|
$this->db_host = $db_host;
|
||||||
|
|
||||||
$this->dbh = @mysql_pconnect($db_host, $db_user, $db_pass);
|
$this->dbh = @mysql_pconnect($db_host, $db_user, $db_pass);
|
||||||
|
|
||||||
if (!$this->dbh) {
|
if (!$this->dbh) {
|
||||||
@@ -192,4 +191,4 @@ class DBH
|
|||||||
* vim600: sw=4 ts=4 fdm=marker
|
* vim600: sw=4 ts=4 fdm=marker
|
||||||
* vim<600: sw=4 ts=4
|
* vim<600: sw=4 ts=4
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ class User
|
|||||||
*/
|
*/
|
||||||
public static function getByEmail($email)
|
public static function getByEmail($email)
|
||||||
{
|
{
|
||||||
$query = kl_str_sql('SELECT * FROM users WHERE cust_id!=1 AND email=!s', $email);
|
$query = kl_str_sql('SELECT * FROM users WHERE email=!s', $email);
|
||||||
if (!$res = DBH::$db->query($query) OR !$row = DBH::$db->fetchRow($res)) {
|
if (!$res = DBH::$db->query($query) OR !$row = DBH::$db->fetchRow($res)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
USE crashproc;
|
||||||
|
|
||||||
|
|
||||||
-- MySQL dump 10.13 Distrib 5.5.37, for debian-linux-gnu (x86_64)
|
-- MySQL dump 10.13 Distrib 5.5.37, for debian-linux-gnu (x86_64)
|
||||||
--
|
--
|
||||||
-- Host: localhost Database: singucrash
|
-- Host: localhost Database: singucrash
|
||||||
@@ -31,7 +34,7 @@ CREATE TABLE `comment` (
|
|||||||
`commented` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`commented` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`comment` text,
|
`comment` text,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `options`
|
-- Table structure for table `options`
|
||||||
@@ -54,7 +57,7 @@ CREATE TABLE `raw_reports` (
|
|||||||
`processed` int(11) NOT NULL DEFAULT '0',
|
`processed` int(11) NOT NULL DEFAULT '0',
|
||||||
`raw_data` longtext,
|
`raw_data` longtext,
|
||||||
PRIMARY KEY (`report_id`)
|
PRIMARY KEY (`report_id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=295850 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `reports`
|
-- Table structure for table `reports`
|
||||||
@@ -115,7 +118,7 @@ CREATE TABLE `signature` (
|
|||||||
`has_comments` int(11) DEFAULT NULL,
|
`has_comments` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `hash` (`hash`)
|
UNIQUE KEY `hash` (`hash`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=6032 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `users`
|
-- Table structure for table `users`
|
||||||
@@ -131,7 +134,7 @@ CREATE TABLE `users` (
|
|||||||
`is_admin` tinyint(4) DEFAULT NULL,
|
`is_admin` tinyint(4) DEFAULT NULL,
|
||||||
`is_allowed` tinyint(4) DEFAULT NULL,
|
`is_allowed` tinyint(4) DEFAULT NULL,
|
||||||
PRIMARY KEY (`user_id`)
|
PRIMARY KEY (`user_id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
-- Dump completed on 2014-05-20 9:06:08
|
-- Dump completed on 2014-05-20 9:06:08
|
||||||
|
|||||||
@@ -2,21 +2,4 @@
|
|||||||
|
|
||||||
define("SITE_ROOT", realpath(dirname(__file__)));
|
define("SITE_ROOT", realpath(dirname(__file__)));
|
||||||
require_once SITE_ROOT . "/lib/init.php";
|
require_once SITE_ROOT . "/lib/init.php";
|
||||||
|
http::redirectAbsolute( GoogleLogin::loginURL());
|
||||||
$google_gateway = Layout::getLoginGateway();
|
|
||||||
Layout::header();
|
|
||||||
?>
|
|
||||||
|
|
||||||
<p>Please use your <a href="<?php echo $google_gateway->getRequestURL(); ?>">Google Account</a> to login.</p>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
Layout::footer();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Local variables:
|
|
||||||
* tab-width: 4
|
|
||||||
* c-basic-offset: 4
|
|
||||||
* End:
|
|
||||||
* vim600: noet sw=4 ts=4 fdm=marker
|
|
||||||
* vim<600: noet sw=4 ts=4
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -14,6 +14,18 @@ $user_email = GoogleLogin::userEmail();
|
|||||||
|
|
||||||
$user = User::getByLogin($user_identity);
|
$user = User::getByLogin($user_identity);
|
||||||
|
|
||||||
|
if (!$user)
|
||||||
|
{
|
||||||
|
var_dump($user_email);
|
||||||
|
$user_tmp = User::getByEmail($user_email);
|
||||||
|
if($user_tmp /* && (!$user->login) || ($user->login == "")*/)
|
||||||
|
{
|
||||||
|
$user = $user_tmp;
|
||||||
|
$user->login = $user_identity;
|
||||||
|
$user->update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$user)
|
if (!$user)
|
||||||
{
|
{
|
||||||
$user = new User();
|
$user = new User();
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ $(function() {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Minidump</th>
|
<th>Minidump</th>
|
||||||
<td><a href="download.php/singularity<?php echo (int)$report->id ?>.dmp?report_id=<?php echo (int)$report->id ?>">Download</a></td>
|
<td><a href="download.php?report_id=<?php echo (int)$report->id ?>">Download</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user