srchub-old

srchub-old Commit Details


Date:2014-04-20 16:40:00 (10 years 5 months ago)
Author:Natalie Adams
Branch:default
Commit:76c3baca5e9a
Parents: 8b130f9f2f70
Message:Adding icon

Updating fileutil to show html in correct block
updating user view to include correct stats
Changes:
Aindefero/www/media/idf/img/feed-icon.png
Mindefero/src/IDF/FileUtil.php (1 diff)
Mindefero/src/IDF/Views.php (1 diff)
Mindefero/src/IDF/Views/User.php (1 diff)

File differences

indefero/src/IDF/FileUtil.php
4040
4141
4242
43
43
44
4445
4546
4647
public static $map = array("cxx" => "cpp", "h" => "cpp", "hpp" => "cpp", "rc"=>"text", "sh"=>"bash", "cs"=>"csharp");
public static $syntaxhighlightext = array("as3", "cf", "cpp", "c", "css", "pas", "diff", "patch", "erl", "java", "jfx", "js", "pl", "php", "py", "rb", "sass", "scss", "scala", "sql", "vb", );
public static $syntaxhighlightext = array("html", "as3", "cf", "cpp", "c", "css", "pas", "diff", "patch", "erl", "java", "jfx", "js", "pl", "php", "py", "rb", "sass", "scss", "scala", "sql", "vb", );
/**
* Test if an extension is supported by the syntax highlighter.
indefero/src/IDF/Views.php
565565
566566
567567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
568604
$forgestats['proj_count'] = count($projects);
return $forgestats;
}
/**
* Returns statistics by a userID
*
* @param ArrayObject IDF_Project
* @return Associative array of statistics
*/
public static function getProjectsStatisticsByUser($uid)
{
$forgestats = array();
// count overall project stats
$forgestats['total'] = 0;
$what = array(
'downloads' => 'IDF_Upload',
'reviews' => 'IDF_Review',
'issues' => 'IDF_Issue',
'docpages' => 'IDF_Wiki_Page',
);
foreach ($what as $key => $model) {
$count = Pluf::factory($model)->getCount(array(
'filter' => sprintf('submitter = %d', $uid)
));
$forgestats[$key] = $count;
$forgestats['total'] += $count;
}
// 'commits' => 'IDF_Commit',
$count = Pluf::factory('IDF_Commit')->getCount(array(
'filter' => sprintf('author = %d', $uid)
));
$forgestats['commits'] = $count;
$forgestats['total'] += $count;
return $forgestats;
}
}
indefero/src/IDF/Views/User.php
304304
305305
306306
307
307
308
309
308310
309311
310312
}
}
}
$projectstats = IDF_Views::getProjectsStatistics($pubprojects);
//$projectstats = IDF_Views::getProjectsStatistics($pubprojects);
$projectstats = IDF_Views::getProjectsStatisticsByUser($user->id);
$projectstats["proj_count"] = count($pubprojects);
//print_r($projectstats);
//echo $privprojects;

Archive Download the corresponding diff file

Branches

Tags

Page rendered in 0.43614s using 14 queries.