Skip to content

Commit

Permalink
Fixed a bug where Geeklog 2.2.0 cannot install on PHP 5.3 (bug #877)
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Sep 9, 2018
1 parent d1253a4 commit bb78dd3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion plugins/calendar/functions.inc
Expand Up @@ -701,7 +701,8 @@ function plugin_submit_calendar($mode = 'master')

if (($_CA_CONF['personalcalendars'] == 1) && ($mode === 'quickadd')) {
// check for missing event title field
if (empty(GLText::remove4byteUtf8Chars(GLText::stripTags(COM_checkWords($_POST['title']))))) {
$tempTitle = GLText::remove4byteUtf8Chars(GLText::stripTags(COM_checkWords($_POST['title'])));
if (empty($tempTitle)) {
// If missing must set or process goes into infinite loop
$_POST['title'] = $LANG_CAL_2[32]; // Default title will be "Event"
}
Expand Down
7 changes: 4 additions & 3 deletions public_html/lib-common.php
Expand Up @@ -7920,7 +7920,7 @@ function COM_createHREFLang($type, $id)

// Add hreflang link element if multi-language site
// If user allowed to switch language and Multi Language Content setup (because config languages and language_files exist (and assume setup correctly))
if ($_CONF['allow_user_language'] AND !empty($_CONF['languages']) AND !empty($_CONF['language_files'])) {
if ($_CONF['allow_user_language'] && !empty($_CONF['languages']) && !empty($_CONF['language_files'])) {
$lang_id = COM_getLanguageIdForObject($id);
if (empty($lang_id)) {
// Non Language specific item id found
Expand All @@ -7944,8 +7944,9 @@ function COM_createHREFLang($type, $id)
$lang_id = $key;
$lang_item_id = $nonlang_item_id . '_' . $lang_id;

// See if item for language found and user has access, not in draft, etc..
if (!empty(PLG_getItemInfo($type, $lang_item_id, 'id'))) {
// See if item for language found and user has access, not in draft, etc..
$tempId = PLG_getItemInfo($type, $lang_item_id, 'id');
if (!empty($tempId)) {
// Now build url for page
$headerCode .= LB . '<link rel="alternate" hreflang="' . $lang_id . '" href="' . PLG_getItemInfo($type, $lang_item_id, 'url') . '"' . XHTML . '>';
}
Expand Down

0 comments on commit bb78dd3

Please sign in to comment.