Skip to content
Permalink
Browse files

Merge pull request #17 from zorgch/develop

Bugfixes v4.0.0-2
  • Loading branch information
fbentele committed Nov 15, 2019
2 parents 01cb69d + a0193a1 commit 5b413365227236d230bc0fb96e11ba02c597b3ad
@@ -44,7 +44,7 @@
if (!$error)
{
$frm['id'] = htmlentities($frm['id'], ENT_QUOTES);
$frm['tpl'] = $frm['tpl']; // TODO add appropriate user input sanitization, respecting allowed Smarty template content
$frm['tpl'] = mysql_real_escape_string($frm['tpl']); // TODO change to PHP7.x compliant user input sanitization, respecting allowed Smarty template content
$frm['title'] = sanitize_userinput($frm['title']);
$frm['sidebar_tpl'] = (empty($frm['sidebar_tpl']) ? 'NULL' : htmlentities($frm['sidebar_tpl'], ENT_QUOTES));
$frm['page_title'] = htmlentities($frm['page_title'], ENT_NOQUOTES);
@@ -46,6 +46,7 @@
--border-input-button-hover: <?= ($layout === 'night' ? '1px solid rgba(255,255,255,0.85)' : 'inset thin rgba(52,69,134,0.5)'); ?>;
--border-input-disabled: <?= ($layout === 'night' ? 'gray' : 'gray'); ?>;
--border-navigation: <?= ($layout === 'night' ? '#cbba79' : 'rgba(255,255,255,0.75)'); ?>;
--border-title: <?= ($layout === 'night' ? '#cbba79' : '#ccc'); ?>;
--shadow-input-focus: <?= ($layout === 'night' ? '0 0 1px 1px rgba(255,255,255,0.85)' : '0 0 1px 1px rgba(52,69,134,0.5)'); ?>;
--shadow-input-focus-moz_mac: 0 0 0 3px -moz-mac-focusring;
}
@@ -93,11 +94,11 @@
}
.zorghead > .onlineuser {
grid-area: onlineuser;
align-self: end;
align-self: center;
}
.zorghead > .notifications {
grid-area: notifications;
align-self: end;
align-self: center;
justify-self: start;
}
.zorghead > .infos {
@@ -121,32 +122,36 @@
@media (min-width: 768px) {
body {
margin: 0 18vw 0 18vw;
grid-template-columns: auto auto;
grid-template-columns: 2fr 1fr;
grid-template-rows: minmax(min-content, 190px) minmax(min-content, 120px) minmax(min-content, max-content) 1fr;
grid-template-areas:
"header header"
"nav nav"
"main <?= ($sidebarOn === true ? 'sidebar' : 'main'); ?>"
"footer footer";
}
.zorghead {
grid-template-columns: 1fr 2fr 1fr;
grid-template-rows: 1fr 1fr 1fr;
grid-template-areas:
"logo announcements service"
"infos announcements service"
"notifications notifications onlineuser"
}
header > .announcements {
justify-self: center;
}
.zorghead {
grid-template-columns: 1fr 2fr 1fr;
grid-template-rows: 1fr 1fr 1fr;
grid-template-areas:
"logo announcements service"
"infos announcements service"
"notifications notifications onlineuser";
padding: .2rem 1rem .2rem 1rem;
}
header > .service { font-size: 0.6rem; }
header > .service label.user::before { content: "\01F464"; }
header > .service label.password::before { content: "\01F510"; }
header > .announcements { justify-self: center; }
header > .infos {
align-self: start;
font-size: 0.4rem;
}
header > .infos .solarstate .event {
margin-right: 5px;
}
header > .infos .solarstate .event { margin-right: 5px; }
.main-content { padding: .5rem .5rem .5rem 1.25rem; }
.sidebar { padding: .5rem 1rem .5rem 1rem; }
.footer { padding: .5rem 1rem 1rem 1rem; }
.footer > .shadow { margin: 0 -1rem 0 -1rem; } /** Compensate .footer{padding-left & -right} */
}

/* Mobile Smartphones (Portrait): Screen = B/w 320px to 479px */
@@ -167,9 +172,12 @@
"logo service"
"announcements service"
"onlineuser service"
"notifications notifications"
"..... infos"
"notifications infos";
padding: .2rem .5rem .2rem .5rem;
}
header > .service {
font-size: 0.5rem;
}
header > .announcements {
justify-self: start;
}
@@ -197,63 +205,49 @@
div.menu > a.left, div.menu > a.right {
display: none;
}

.main-content { padding: .2rem .5rem 0 .5rem; }
.main-content > img { max-width: 100%; }
.sidebar { padding: .5rem .5rem .5rem .5rem; }
.footer { padding: .2rem .2rem .5rem .5rem; }
.footer > .shadow { margin: 0 -0.2rem 0 -0.5rem; } /** Compensate .footer{padding-left & -right} */

.hide-mobile { display: none; }
}
/** END: Responsive CSS Grid */

/**
* HTML5 Structure Styling
*/
body > * {
padding: 1vh 3vw 0 3vw;
}
/** Old table-layout compatibility */
table {
width: 100%;
border: none;
border-collapse: collapse;
padding: 0;
}

.zorghead, .navigation {
background: var(--background-color-base, rgba(1,1,1,1));
}
.main-content, .sidebar {
background: var(--background-color-main, rgba(1,1,1,1));
/** Old table-layout compatibility */
table {
width: 100%;
border: none;
border-collapse: collapse;
padding: 0;
}

.zorghead, .navigation { background: var(--background-color-base, rgba(1,1,1,1)); }
.navigation {
font-size: 0.5rem;
text-align: center;
padding-left: 0;
padding-right: 0;
}

.main-content {
font-size: 0.5rem;
padding-bottom: 1vw;
}

.sidebar {
font-size: 0.5rem;
padding-bottom: 3vw;
}
.main-content, .sidebar { background: var(--background-color-main, rgba(1,1,1,1)); }
.main-content { font-size: 0.5rem; }
.sidebar { font-size: 0.5rem; }

.footer, .tpl-footer {
font-family: var(--font-family-footer, sans-serif);
font-size: 0.5rem;
letter-spacing: 0.1em;
background: var(--background-color-behind, rgba(1,1,1,1));
border-top: <?= ($layout === 'night' ? 'none' : 'solid 1px #ccc'); ?>;
padding-top: 0.5vw;
padding-bottom: 1vw;
}
.tpl-footer {
font-size: 1em;
padding-top: 0.1vw;
padding-bottom: 0.25vw;
padding: .5em 0 .2em 0;
}
/** END: HTML5 Structure Styling */

@@ -359,7 +353,7 @@
.danger { background-color: #ff4700 !important; }
.info { color: #2196f3 }
.border { outline: var(--outline-table, '1px solid #ccc'); }
.bottom_border { border-bottom: 1px solid var(--border-navigation, #ccc); }
.bottom_border { border-bottom: 1px solid var(--border-title, #ccc); }

/** Animations */
.blink { -webkit-animation:colorchange 1s infinite alternate;
@@ -397,9 +391,7 @@
header > .announcements .event > a > .name { }
header > .announcements .event > a.join { }
header > .announcements .event > a.unjoin { color: #cbba79; }
header > .service {
font-size: 0.65rem;
}
header > .service { text-align: right; }
header > .service h5 {
margin-top: 0;
margin-bottom: 0.5em;
@@ -408,6 +400,7 @@
margin-left: 5px;
height: 0.85em;
}
header > .service form fieldset { margin-top: 0; }
header > .service form .login-input {
display: flex;
white-space: nowrap;
@@ -428,8 +421,6 @@
header > .service form .login-input input[type=submit] {
flex: 1;
}
header > .service label.user::before { content: "\01F464"; }
header > .service label.password::before { content: "\01F510"; }
header > .onlineuser {
font-size: 0.4rem;
}
@@ -442,7 +433,7 @@
}
header > .notifications {
font-size: 0.4rem;
margin-top: 5px;
/*margin-top: 5px;*/
}
header > .notifications ul { padding: 0; }
header > .notifications ul li {
@@ -468,7 +459,6 @@
footer > .shadow {
border: none;
box-shadow: <?= ($layout === 'night' ? '0 0px 1px 1px rgba(3,12,22,0.5)' : 'none'); ?>;
margin: 0 -1vw 0 -1.5vw;
}
footer section, .tpl-footer section {
display: flex;
@@ -540,6 +530,7 @@
.alert.success { background-color: #4CAF50 } /** Green */
.alert.info { background-color: #2196F3; } /** Blue */
.alert.warn { background-color: #ff9800; } /** Orange */
.alert a { color: #3f3047; } /** Links in Alert message boxes */
/** Alert message box close button */
.closebtn {
margin-left: 15px;
@@ -600,9 +591,17 @@
margin: 0;
padding: 0;
}
td.forum.comment > h1:first-of-type,
td.forum.comment > h2:first-of-type,
td.forum.comment > h3:first-of-type,
td.forum.comment > h4:first-of-type { margin-block-start: .5em; }
td.forum img {
max-width: 100%;
}
td.forum.comment { padding: 0 .5em 0 .5em; }
td.forum.comment.meta { padding-top: .2em; }
td.forum.comment.meta.left { padding-left: .5em; }
td.forum.comment.meta.right { padding-right: .5em; }
.threading {
border: none;
vertical-align: top;
@@ -10,10 +10,11 @@
* @author IneX
* @package zorg\Gallery
* @date 01.01.2002
* @version 1.6
* @version 2.0
* @since 1.0 01.01.2002 file added
* @since 1.5 04.11.2013 Gallery nur noch für eingeloggte User anzeigen
* @since 1.6 11.09.2018 APOD Gallery & Pics auch für nicht-eingeloggte User anzeigen
* @since 1.6 <inex> 11.09.2018 APOD Gallery & Pics auch für nicht-eingeloggte User anzeigen
* @since 2.0 <inex> 14.11.2019 GV Beschluss 2018: added check if User is logged-in & Vereinsmitglied
*/
/**
@@ -29,36 +30,40 @@
*/
$model = new MVC\Gallery();
// fuer mod_rewrite solltes
//header("Cache-Control: no-store, no-cache, must-revalidate");
//echo head(29, 'gallery');
//$smarty->assign('tplroot', array('page_title' => 'gallery'));
//echo menu("zorg");
//echo menu("gallery");
/** Pic-ID zu Album-ID auflösen */
$getAlbId = (int)$_GET['albID'];
$getPicId = (int)$_GET['picID'];
$album_id = $model->setAlbumId($getAlbId, $getPicId);
/**
* [Bug #708] Gallery nur für eingeloggte User anzeigen
* Ausnahme: APOD Gallery
* [Bug #708] Gallery nur für eingeloggte User anzeigen. Ausnahme: APOD Gallery
* @link https://zorg.ch/bugtracker.php?bug_id=708
*/
if (!$user->is_loggedin() && $album_id != APOD_GALLERY_ID)
if (!$user->is_loggedin() && (int)$album_id !== APOD_GALLERY_ID)
{
$model->showOverview($smarty);
$smarty->assign('error', ['type' => 'warn', 'title' => t('error-not-logged-in', 'gallery', SITE_URL), 'dismissable' => 'false']);
$smarty->display('file:layout/head.tpl');
}
/** Gallery / Pics anzeigen */
} else {
/**
* User & Vereinsmitglieder-Check: nur Vereinsmitglieder dürfen Pics sehen (Ausnahme: APOD Gallery & Pics)
* @link https://github.com/zorgch/zorg-verein-docs/blob/master/GV/GV%202018/2018-12-23%20zorg%20GV%202018%20Protokoll.md
*/
elseif ((int)$album_id !== APOD_GALLERY_ID && (empty($user->vereinsmitglied) || $user->vereinsmitglied === '0'))
{
$model->showOverview($smarty);
$smarty->assign('error', ['type' => 'warn', 'title' => t('error-no-member', 'gallery'), 'dismissable' => 'false']);
$smarty->display('file:layout/head.tpl');
}
/** Gallery / Pics anzeigen */
else {
if (!empty($_GET['do']))
{
$doAction = (string)$_GET['do'];
// Das Benoten (und mypic markieren) können nebst Schönen auch die registrierten User, deshalb müssen wirs vorziehen...
/** Das Benoten (und mypic markieren) können nebst Schönen auch die registrierten User,
deshalb müssen wirs vorziehen... */
if ($user->is_loggedin())
{
switch ($doAction)
@@ -78,7 +83,7 @@
$smarty->assign('error', ['type' => 'warn', 'dismissable' => 'false', 'title' => t('permissions-insufficient', 'gallery', $doAction)]);
}
// Ab hier kommt nur noch Zeugs dass Member & Schöne machen dürfen
/** Ab hier kommt nur noch Zeugs dass Member & Schöne machen dürfen */
if ($user->typ >= USER_MEMBER)
{
switch ($doAction)
@@ -152,5 +157,4 @@
}
//echo foot(7);
$smarty->display('file:layout/footer.tpl');
@@ -253,7 +253,7 @@ function smartyresource_comments_get_commenttree ($id, $is_thread=false) {
.'<table bgcolor="{comment_colorfade depth=$sizeof_hdepth color=$comment_color}"'
.' style="table-layout:fixed;" width="100%">'
.'<tr style="font-size: x-small;">'
.'<td class="forum" style="width: 70%;">'
.'<td class="forum comment meta left" style="width: 70%;">'
.'<div style="display: none;" itemscope itemtype="http://schema.org/Organization" itemprop="publisher"><span style="display: none;" itemprop="name">{$smarty.const.SITE_HOSTNAME}</span></div>'
.'<a href="{comment_get_link board='.$rs['board'].' parent_id='.$rs['parent_id'].' id='.$rs['id'].' thread_id='.$rs['thread_id'].'}" name="'.$rs['id'].'"'.($is_thread ? ' itemprop="url"' : '').'>'
.'#'.$rs['id']
@@ -269,7 +269,7 @@ function smartyresource_comments_get_commenttree ($id, $is_thread=false) {
$html .= '<!--googleoff: all-->';
$html .=
' <a href="#top">- nach oben -</a> '
.'</td><td class="forum" style="width: 15%; text-align: right; white-space: nowrap;">'
.'</td><td class="forum comment meta" style="width: 15%; text-align: right; white-space: nowrap;">'
;
// Subscribe / Unsubscribe
@@ -290,7 +290,7 @@ function smartyresource_comments_get_commenttree ($id, $is_thread=false) {
.'<a href="/forum.php?layout=edit&parent_id='.$rs['parent_id'].'&id='.$rs['id'].'&url={base64_encode text=$request.url}">[edit]</a> '
.'{/if}
{if $user->id != 0}'
.'</td><td class="forum" style="width: 15%; text-align: right;">'
.'</td><td class="forum comment meta right" style="width: 15%; text-align: right;">'
.'<label for="replyfor-'.$rs['id'].'" style="white-space: nowrap;margin-right: 2px;">'
.'<input type="radio" class="replybutton" name="parent_id" id="replyfor-'.$rs['id'].'" onClick="reply()" value="'.$rs['id'].'" '
.'{if $smarty.get.parent_id == '.$rs['id'].'} checked="checked" {/if} /><span class="hide-mobile">&nbsp;reply</span></label>'
@@ -299,7 +299,7 @@ function smartyresource_comments_get_commenttree ($id, $is_thread=false) {
$html .= '</td></tr><tr>';
($is_thread ? $html .= '<span itemprop="headline" content="'.remove_html(Comment::getLinkThread($rs['board'], $rs['thread_id'])).'"></span>' : '');
$html .= '<td class="forum" colspan="3" itemprop="'.($is_thread ? 'articleBody' : 'text').'">';
$html .= '<td class="forum comment" colspan="3" itemprop="'.($is_thread ? 'articleBody' : 'text').'">';
if (!$rs['error']) {
$html .= Comment::formatPost($rs['text']);
} else {

0 comments on commit 5b41336

Please sign in to comment.
You can’t perform that action at this time.