diff --git a/.gitattributes b/.gitattributes index fe67e4c7cc..c1719f639e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ -*.txt text -*.js text -*.html text -*.css text -*.php text \ No newline at end of file +*.txt text eol=lf +*.js text eol=lf +*.html text eol=lf +*.css text eol=lf +*.php text eol=lf \ No newline at end of file diff --git a/lib/midcom/helper/xml.php b/lib/midcom/helper/xml.php index 41932af641..f8ed1d274b 100644 --- a/lib/midcom/helper/xml.php +++ b/lib/midcom/helper/xml.php @@ -221,11 +221,11 @@ function object2data($object, $prefix = '') foreach ($fields as $key) { - if (substr($key, 0, 1) == '_') - { + if (substr($key, 0, 1) == '_') + { // Remove private fields - continue; - } + continue; + } if (is_object($object->$key)) { $data .= $this->object2data($object->$key, "{$prefix} "); diff --git a/lib/net/nehmer/blog/navigation.php b/lib/net/nehmer/blog/navigation.php index 8c44991c40..4f4cbd5137 100644 --- a/lib/net/nehmer/blog/navigation.php +++ b/lib/net/nehmer/blog/navigation.php @@ -77,20 +77,20 @@ private function _add_article_leaves(&$leaves) } else { - $mc = net_nehmer_blog_link_dba::new_collector('topic', $topic_id); + $mc = net_nehmer_blog_link_dba::new_collector('topic', $topic_id); $links = $mc->get_values('article'); - $qb->begin_group('OR'); - if (count($links) > 0) - { - $qb->add_constraint('id', 'IN', $links); - } - $qb->add_constraint('topic', '=', $this->_content_topic->id); + $qb->begin_group('OR'); + if (count($links) > 0) + { + $qb->add_constraint('id', 'IN', $links); + } + $qb->add_constraint('topic', '=', $this->_content_topic->id); $qb->end_group(); } - $qb->add_order('metadata.published', 'DESC'); - $qb->set_limit((int) $this->_config->get('index_entries')); - - $results = $qb->execute(); + $qb->add_order('metadata.published', 'DESC'); + $qb->set_limit((int) $this->_config->get('index_entries')); + + $results = $qb->execute(); // Checkup for the url prefix if ($this->_config->get('view_in_url')) diff --git a/tools/update_db.php b/tools/update_db.php index 19635b6043..d659e3a522 100644 --- a/tools/update_db.php +++ b/tools/update_db.php @@ -131,7 +131,7 @@ $GLOBALS['midcom_config_local']['person_class'] = 'openpsa_person'; $GLOBALS['midcom_config_local']['auth_type'] = 'Plaintext'; -require $rootdir . 'lib/midcom.php'; +require $rootdir . 'lib/midcom.php'; function _migrate_account($person) { @@ -145,8 +145,8 @@ function _migrate_account($person) } else { - if ($user->authtype !== 'Legacy') - { + if ($user->authtype !== 'Legacy') + { echo ' Legacy password detected for user ' . $person->username . "Resetting to 'password', please change ASAP\n"; $db_password = midcom_connection::prepare_password('password'); }