1
0

fix typos, brackets, whitespaces

This commit is contained in:
Ian
2015-12-20 17:26:56 +01:00
parent 3eb59e9052
commit 2a228f68cf

View File

@@ -167,8 +167,8 @@ function &serendipity_fetchEntryCategories($entryid) {
* Other "external" variables that affect this function are: * Other "external" variables that affect this function are:
* $serendipity['short_archives'] - Indicates if the short archive listing is wanted, without the full entry text * $serendipity['short_archives'] - Indicates if the short archive listing is wanted, without the full entry text
* $serendipity['range'] - If $range is not used, the time restriction is fetched from this array, which holds a start timestamp and end timestamp. * $serendipity['range'] - If $range is not used, the time restriction is fetched from this array, which holds a start timestamp and end timestamp.
* $serendipity['GET']['category'] - The category ID to restrict fetching entries from (can be seperated by ";") * $serendipity['GET']['category'] - The category ID to restrict fetching entries from (can be separated by ";")
* $serendipity['GET']['hide_category']- The category ID to NOT fetch entries from (can be seperated by ";") * $serendipity['GET']['hide_category']- The category ID to NOT fetch entries from (can be separated by ";")
* $serendipity['GET']['viewAuthor'] - Only fetch entries by this author * $serendipity['GET']['viewAuthor'] - Only fetch entries by this author
* $serendipity['GET']['page'] - The page number to show entries, for pagination * $serendipity['GET']['page'] - The page number to show entries, for pagination
* *
@@ -1087,7 +1087,7 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm
} }
$dategroup[$key]['date'] = $entries[$x]['timestamp']; $dategroup[$key]['date'] = $entries[$x]['timestamp'];
$dategroup[$key]['is_sticky'] = (isset($entries[$x]['is_sticky']) && serendipity_db_bool($entries[$x]['is_sticky']) ? true : false); $dategroup[$key]['is_sticky'] = (isset($entries[$x]['is_sticky']) && (serendipity_db_bool($entries[$x]['is_sticky']) ? true : false));
$dategroup[$key]['entries'][] = &$entries[$x]; $dategroup[$key]['entries'][] = &$entries[$x];
} }
} elseif ($use_grouped_array === 'plugin') { } elseif ($use_grouped_array === 'plugin') {
@@ -1457,11 +1457,11 @@ function serendipity_updertEntry($entry) {
$entry['isdraft'] = 'true'; $entry['isdraft'] = 'true';
} }
if(!isset($entry['allow_comments'])){ if (!isset($entry['allow_comments'])) {
$entry['allow_comments']='false'; $entry['allow_comments'] = 'false';
} }
if(!isset($entry['moderate_comments'])){ if (!isset($entry['moderate_comments'])) {
$entry['moderate_comments']='false'; $entry['moderate_comments'] = 'false';
} }
$res = serendipity_db_insert('entries', $entry); $res = serendipity_db_insert('entries', $entry);
@@ -1484,6 +1484,7 @@ function serendipity_updertEntry($entry) {
return ENTRIES_NOT_SUCCESSFULLY_INSERTED; return ENTRIES_NOT_SUCCESSFULLY_INSERTED;
} }
$newEntry = 1; $newEntry = 1;
} else { } else {
/* we need to update */ /* we need to update */
@@ -1519,7 +1520,9 @@ function serendipity_updertEntry($entry) {
foreach (array('title', 'body', 'extended', 'author') as $required_field) { foreach (array('title', 'body', 'extended', 'author') as $required_field) {
// dashboard publishing a draft does not pass title, body, extended, and author, so we need to set it here // dashboard publishing a draft does not pass title, body, extended, and author, so we need to set it here
if (! isset($entry[$required_field])) { $entry[$required_field] = $_entry[$required_field]; } if (!isset($entry[$required_field])) {
$entry[$required_field] = $_entry[$required_field];
}
} }
} }