Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/olivierberten/GregoBase i…
Browse files Browse the repository at this point in the history
…nto upstream
  • Loading branch information
jperon committed Apr 24, 2014
2 parents fb163aa + 6a07c19 commit f015be8
Show file tree
Hide file tree
Showing 11 changed files with 2,678 additions and 829 deletions.
2 changes: 1 addition & 1 deletion chant.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
}
while ($m = $req1->fetch_assoc()) {
$user_info = get_userdata($m['user_id']);
echo "<li>".date("M d, Y",$m['time']).": ".$m['comment']." (".$user_info->display_name.') <a href="history.php?changeset='.$m['time'].'|'.$id.'|'.$m['user_id']."\">?</a></li>\n";
echo "<li>".date("M d, Y",$m['time']).": ".htmlspecialchars($m['comment'])." (".$user_info->display_name.') <a href="history.php?changeset='.$m['time'].'|'.$id.'|'.$m['user_id']."\">?</a></li>\n";
}
if($c['transcriber'] > '') {
echo "<li>Original transcriber: ".$c['transcriber']."</li>\n";
Expand Down
2 changes: 1 addition & 1 deletion chant_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
$sql1 = 'SELECT * FROM '.db('tags').' WHERE id = '.$t['tag_id'];
$req1 = $mysqli->query($sql1) or die('Erreur SQL !<br />'.$sql1.'<br />'.$mysqli->error);
$tt = $req1->fetch_assoc();
$tags[$tt['id']] = $tt['tag'];
$tags[] = $tt['tag'];
}
natcasesort($tags);

Expand Down
1 change: 1 addition & 0 deletions chant_img.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function mgabc2tex($c, $firstverse = False) {
'pr' => False,
'ps' => False,
're' => 'Resp',
'rb' => 'R. br',
'se' => 'Seq',
'tr' => 'Tract',
'va' => False);
Expand Down
4 changes: 2 additions & 2 deletions feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
echo '<entry>
<title type="html">'.chant_from_id($m['chant_id'])[1].'</title>
<link href="'.$dir.'chant.php?id='.$m['chant_id'].'" />
<summary>'.$m['comment'].'</summary>
<summary>'.htmlspecialchars($m['comment']).'</summary>
<updated>'.date(DATE_ATOM,$m['time']).'</updated>
<author>
<name>'.$user_info->display_name.'</name>
Expand All @@ -43,7 +43,7 @@
echo '<entry>
<title type="html">'.chant_from_id($m['chant_id'])[1].'</title>
<link href="'.$dir.'chant.php?id='.$m['chant_id'].'" />
<summary>'.$m['comment'].'</summary>
<summary>'.htmlspecialchars($m['comment']).'</summary>
<updated>'.date(DATE_ATOM,$m['time']).'</updated>
<author>
<name>'.$user_info->display_name.'</name>
Expand Down
3,478 changes: 2,659 additions & 819 deletions grego_online.sql

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion incipit.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
echo "<ul class=\"incipit\">\n";
foreach($chants as $c) {
$incipit = $c['incipit']?format_incipit($c['incipit']):"===";
$incipit = $c['incipit']?format_incipit($c['incipit']):"░░░░";
echo '<li class="usage-marker '.$c['office-part'].'">';
if($c['gabc'] > '') {
echo '<a href="chant.php?id='.$c['id'].'">'.$incipit."</a>";
Expand Down
2 changes: 1 addition & 1 deletion include/db.php.sample
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function chant_from_id($c) {
$req1 = $mysqli->query($sql1) or die('Erreur SQL !<br />'.$sql1.'<br />'.$mysqli->error);
$chants = array();
$ch = $req1->fetch_assoc();
return array($ch['office-part'], $ch['incipit'], $ch['gabc'] > '', $ch['version']);
return array($ch['office-part'], $ch['incipit'] > ''?$ch['incipit']:'░░░░', $ch['gabc'] > '', $ch['version']);
}

define("HOST", ""); // The host you want to connect to.
Expand Down
2 changes: 2 additions & 0 deletions include/txt.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
$txt['usage']['of'] = 'Offertorium';
$txt['usage']['ps'] = 'Psalmus';
$txt['usage']['re'] = 'Responsorium';
$txt['usage']['rb'] = 'Responsorium brevis';
$txt['usage']['se'] = 'Sequentia';
$txt['usage']['tr'] = 'Tractus';
$txt['usage']['or'] = 'Toni Communes';
Expand All @@ -33,6 +34,7 @@
$txt['usage_s']['of'] = 'Offert';
$txt['usage_s']['ps'] = '';
$txt['usage_s']['re'] = 'Resp';
$txt['usage_s']['rb'] = 'R. br';
$txt['usage_s']['se'] = 'Seq';
$txt['usage_s']['tr'] = 'Tract';
$txt['usage_s']['or'] = '';
Expand Down
8 changes: 5 additions & 3 deletions scores.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
$sql1 = 'SELECT * FROM '.db('tags').' t WHERE EXISTS (SELECT * FROM '.db('chant_tags').' ts WHERE t.id = ts.tag_id) ORDER BY tag';
$req1 = $mysqli->query($sql1) or die('Erreur SQL !<br />'.$sql1.'<br />'.$mysqli->error);
if($req1->num_rows > 0) {
echo "<h4>by tag</h4>\n<div><ul class=\"alphabet\">\n";
echo "<h4>by tag</h4>\n<div><ul>\n";
while($t = $req1->fetch_assoc()) {
echo "<li><a href=\"tag.php?id=".$t['id']."\">".$t['tag']."</a></li>\n";
}
Expand All @@ -45,7 +45,9 @@
}
foreach($sources as $id => $s) {
if(in_array($id, $used_sources)) {
echo "<li><a href=\"source.php?id=".$id."\">".$s['year']." - ".$s['editor']." - ".$s['title']."</a></li>\n";
echo "<li><a href=\"source.php?id=".$id."\">".$s['year']." - ".$s['editor']." - ".$s['title']."</a>";
if($s['description'] > '') echo "<br />\n<i>".$s['description']."</i>";
echo "</li>\n";
}
}
$sql1 = 'SELECT * FROM '.db('chants').' c WHERE NOT EXISTS (SELECT * FROM '.db('chant_sources').' cs WHERE c.id = cs.chant_id)';
Expand All @@ -69,7 +71,7 @@
echo "<ul>\n";
foreach($ml as $m) {
echo '<li><a href="chant.php?id='.$m['chant_id'].'">'.format_incipit(chant_from_id($m['chant_id'])[1])."</a><br />\n";
echo "<i>".$m['comment']."</i></li>\n";
echo "<i>".htmlspecialchars($m['comment'])."</i></li>\n";
}
echo "</ul><br />\n";
}
Expand Down
4 changes: 4 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ ul.incipit li {
color: #736342;
}

.rb:before, .rb:after {
color: #736342;
}

.se:before, .se:after {
color: #8c7b5a;
}
Expand Down
2 changes: 1 addition & 1 deletion updates.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
foreach($ml as $m) {
$user_info = get_userdata($m['user_id']);
echo "<li>".' <a href="chant.php?id='.$m['chant_id'].'">'.format_incipit(chant_from_id($m['chant_id'])[1])."</a><br />\n";
echo "<i>".$m['comment'].'</i> <span class="version">('.$user_info->display_name.")</span></li>\n";
echo "<i>".htmlspecialchars($m['comment']).'</i> <span class="version">('.$user_info->display_name.")</span></li>\n";
}
echo "</ul>\n";
}
Expand Down

0 comments on commit f015be8

Please sign in to comment.