Skip to content

Commit

Permalink
Fixed: removing entry on .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
dicarve committed May 10, 2013
1 parent 38b3d8e commit dc563d1
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 43 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ sysconfig.local.inc.php
sysconfig.inc.php
slims7.sublime-project
slims7.sublime-workspace
template/default/*
31 changes: 16 additions & 15 deletions lib/contents/default.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,23 +230,24 @@
}
$wordcorrect = enchant_dict_check($dict, $word);
if (!$wordcorrect) {
$closest = null;
$wordsuggest = enchant_dict_suggest($dict, $word);
$shortest = -1;
// loop through words to find the closest with levenshtein
foreach ($wordsuggest as $wordsg) {
$lev = levenshtein($word, $wordsg);
if ($lev == 0) {
$closest = $wordsg;
$shortest = 0;
break;
}
$shortest = -1;
// loop through words to find the closest with levenshtein
foreach ($wordsuggest as $wordsg) {
$lev = levenshtein($word, $wordsg);
if ($lev == 0) {
$closest = $wordsg;
$shortest = 0;
break;
}

if ($lev <= $shortest || $shortest < 0) {
// set the closest match, and shortest distance
$closest = $wordsg;
$shortest = $lev;
}
}
if ($lev <= $shortest || $shortest < 0) {
// set the closest match, and shortest distance
$closest = $wordsg;
$shortest = $lev;
}
}

$keywords_suggest[] = '<b class="search-word-suggest">'.$closest.'</b>';
$keywords_suggest_plain[] = $closest;
Expand Down
54 changes: 27 additions & 27 deletions sysconfig.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,33 +369,33 @@ function stripslashes_deep($value)
* LDAP Specific setting for User
*/
if (($sysconf['auth']['user']['method'] === 'LDAP') OR ($sysconf['auth']['member']['method'] === 'LDAP')) {
$sysconf['auth']['user']['ldap_server'] = '127.0.0.1'; // LDAP server
$sysconf['auth']['user']['ldap_base_dn'] = 'ou=slims,dc=diknas,dc=go,dc=id'; // LDAP base DN
$sysconf['auth']['user']['ldap_suffix'] = ''; // LDAP user suffix
$sysconf['auth']['user']['ldap_bind_dn'] = 'uid=#loginUserName,'.$sysconf['auth']['user']['ldap_base_dn']; // Binding DN
$sysconf['auth']['user']['ldap_port'] = null; // optional LDAP server connection port, use null or false for default
$sysconf['auth']['user']['ldap_options'] = array(
array(LDAP_OPT_PROTOCOL_VERSION, 3),
array(LDAP_OPT_REFERRALS, 0)
); // optional LDAP server options
$sysconf['auth']['user']['ldap_search_filter'] = '(|(uid=#loginUserName)(cn=#loginUserName*))'; // LDAP search filter, #loginUserName will be replaced by the real login name
$sysconf['auth']['user']['userid_field'] = 'uid'; // LDAP field for username
$sysconf['auth']['user']['fullname_field'] = 'cn'; // LDAP field for full name
$sysconf['auth']['user']['mail_field'] = 'mail'; // LDAP field for e-mail
/**
* LDAP Specific setting for member
* By default same as User
*/
$sysconf['auth']['member']['ldap_server'] = &$sysconf['auth']['user']['ldap_server']; // LDAP server
$sysconf['auth']['member']['ldap_base_dn'] = &$sysconf['auth']['user']['ldap_base_dn']; // LDAP base DN
$sysconf['auth']['member']['ldap_suffix'] = &$sysconf['auth']['user']['ldap_suffix']; // LDAP user suffix
$sysconf['auth']['member']['ldap_bind_dn'] = &$sysconf['auth']['user']['ldap_bind_dn']; // Binding DN
$sysconf['auth']['member']['ldap_port'] = &$sysconf['auth']['user']['ldap_port']; // optional LDAP server connection port, use null or false for default
$sysconf['auth']['member']['ldap_options'] = &$sysconf['auth']['user']['ldap_options']; // optional LDAP server options
$sysconf['auth']['member']['ldap_search_filter'] = &$sysconf['auth']['user']['ldap_search_filter']; // LDAP search filter, #loginUserName will be replaced by the real login name
$sysconf['auth']['member']['userid_field'] = &$sysconf['auth']['user']['userid_field']; // LDAP field for username
$sysconf['auth']['member']['fullname_field'] = &$sysconf['auth']['user']['fullname_field']; // LDAP field for full name
$sysconf['auth']['member']['mail_field'] = &$sysconf['auth']['user']['mail_field']; // LDAP field for e-mail
$sysconf['auth']['user']['ldap_server'] = '127.0.0.1'; // LDAP server
$sysconf['auth']['user']['ldap_base_dn'] = 'ou=slims,dc=diknas,dc=go,dc=id'; // LDAP base DN
$sysconf['auth']['user']['ldap_suffix'] = ''; // LDAP user suffix
$sysconf['auth']['user']['ldap_bind_dn'] = 'uid=#loginUserName,'.$sysconf['auth']['user']['ldap_base_dn']; // Binding DN
$sysconf['auth']['user']['ldap_port'] = null; // optional LDAP server connection port, use null or false for default
$sysconf['auth']['user']['ldap_options'] = array(
array(LDAP_OPT_PROTOCOL_VERSION, 3),
array(LDAP_OPT_REFERRALS, 0)
); // optional LDAP server options
$sysconf['auth']['user']['ldap_search_filter'] = '(|(uid=#loginUserName)(cn=#loginUserName*))'; // LDAP search filter, #loginUserName will be replaced by the real login name
$sysconf['auth']['user']['userid_field'] = 'uid'; // LDAP field for username
$sysconf['auth']['user']['fullname_field'] = 'cn'; // LDAP field for full name
$sysconf['auth']['user']['mail_field'] = 'mail'; // LDAP field for e-mail
/**
* LDAP Specific setting for member
* By default same as User
*/
$sysconf['auth']['member']['ldap_server'] = &$sysconf['auth']['user']['ldap_server']; // LDAP server
$sysconf['auth']['member']['ldap_base_dn'] = &$sysconf['auth']['user']['ldap_base_dn']; // LDAP base DN
$sysconf['auth']['member']['ldap_suffix'] = &$sysconf['auth']['user']['ldap_suffix']; // LDAP user suffix
$sysconf['auth']['member']['ldap_bind_dn'] = &$sysconf['auth']['user']['ldap_bind_dn']; // Binding DN
$sysconf['auth']['member']['ldap_port'] = &$sysconf['auth']['user']['ldap_port']; // optional LDAP server connection port, use null or false for default
$sysconf['auth']['member']['ldap_options'] = &$sysconf['auth']['user']['ldap_options']; // optional LDAP server options
$sysconf['auth']['member']['ldap_search_filter'] = &$sysconf['auth']['user']['ldap_search_filter']; // LDAP search filter, #loginUserName will be replaced by the real login name
$sysconf['auth']['member']['userid_field'] = &$sysconf['auth']['user']['userid_field']; // LDAP field for username
$sysconf['auth']['member']['fullname_field'] = &$sysconf['auth']['user']['fullname_field']; // LDAP field for full name
$sysconf['auth']['member']['mail_field'] = &$sysconf['auth']['user']['mail_field']; // LDAP field for e-mail
}

/**
Expand Down
3 changes: 3 additions & 0 deletions template/default/tinfo.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
$sysconf['template']['base'] = 'php';
$sysconf['template']['responsive'] = true;

0 comments on commit dc563d1

Please sign in to comment.