From e7f921dcad959dc0d27e53da4d77f5b1211c030a Mon Sep 17 00:00:00 2001 From: Oscar Ciudad Date: Sat, 27 Aug 2011 13:53:11 +0200 Subject: Spanish language update --- inc/lang/es/lang.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php index 5dc6834e6..4c83f5d96 100644 --- a/inc/lang/es/lang.php +++ b/inc/lang/es/lang.php @@ -24,6 +24,7 @@ * @author Victor Castelan * @author Mauro Javier Giamberardino * @author emezeta + * @author Oscar Ciudad */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -109,7 +110,7 @@ $lang['txt_filename'] = 'Subir como (opcional)'; $lang['txt_overwrt'] = 'Sobreescribir archivo existente'; $lang['lockedby'] = 'Actualmente bloqueado por'; $lang['lockexpire'] = 'El bloqueo expira en'; -$lang['js']['willexpire'] = 'Tu bloqueo para editar esta página expira en un minuto.\nPara evitar conflictos usa el botón previsualizar para reiniciar el contador de tiempo.'; +$lang['willexpire'] = 'Tu bloqueo para editar esta página expira en un minuto.\nPara evitar conflictos usa el botón previsualizar para reiniciar el contador de tiempo.'; $lang['js']['notsavedyet'] = 'Los cambios que no se han guardado se perderán. ¿Realmente quieres continuar?'; $lang['js']['searchmedia'] = 'Buscar archivos'; -- cgit v1.2.3 From ab8fecc6efc832771505467be33a88e0cafec04e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Chmaj?= Date: Sat, 27 Aug 2011 13:54:16 +0200 Subject: Polish language update --- inc/lang/pl/lang.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index 32e5bf80c..f9bf57852 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -11,6 +11,7 @@ * @author Leszek Stachowski * @author maros * @author Grzegorz Widła + * @author Łukasz Chmaj */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -96,7 +97,7 @@ $lang['txt_filename'] = 'Nazwa pliku (opcjonalnie)'; $lang['txt_overwrt'] = 'Nadpisać istniejący plik?'; $lang['lockedby'] = 'Aktualnie zablokowane przez'; $lang['lockexpire'] = 'Blokada wygasa'; -$lang['js']['willexpire'] = 'Za minutę Twoja blokada tej strony wygaśnie.\nW celu uniknięcia konfliktów wyświetl podgląd aby odnowić blokadę.'; +$lang['willexpire'] = 'Za minutę Twoja blokada tej strony wygaśnie.\nW celu uniknięcia konfliktów wyświetl podgląd aby odnowić blokadę.'; $lang['js']['notsavedyet'] = 'Nie zapisane zmiany zostaną utracone. Czy na pewno kontynuować?'; $lang['js']['searchmedia'] = 'Szukaj plików'; @@ -163,6 +164,9 @@ $lang['yours'] = 'Twoja wersja'; $lang['diff'] = 'Pokaż różnice między wersjami'; $lang['diff2'] = 'Pokaż różnice między zaznaczonymi wersjami'; $lang['difflink'] = 'Odnośnik do tego porównania'; +$lang['diff_type'] = 'Zobacz różnice:'; +$lang['diff_inline'] = 'W linii'; +$lang['diff_side'] = 'Jeden obok drugiego'; $lang['line'] = 'Linia'; $lang['breadcrumb'] = 'Ślad'; $lang['youarehere'] = 'Jesteś tutaj'; -- cgit v1.2.3 From 783d2e49b2d8e12ed3bc0693b56c013215099a4c Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sun, 4 Sep 2011 12:35:38 +0200 Subject: Use search_universal in search_index --- inc/search.php | 49 +++++++++++++------------------------------------ 1 file changed, 13 insertions(+), 36 deletions(-) (limited to 'inc') diff --git a/inc/search.php b/inc/search.php index 7b53edabe..bc7c35482 100644 --- a/inc/search.php +++ b/inc/search.php @@ -78,8 +78,8 @@ function search_callback($func,&$data,$base,$file,$type,$lvl,$opts){ * return values for files are ignored * * All functions should check the ACL for document READ rights - * namespaces (directories) are NOT checked as this would break - * the recursion (You can have an nonreadable dir over a readable + * namespaces (directories) are NOT checked (when sneaky_index is 0) as this + * would break the recursion (You can have an nonreadable dir over a readable * one deeper nested) also make sure to check the file type (for example * in case of lockfiles). */ @@ -101,45 +101,22 @@ function search_qsearch(&$data,$base,$file,$type,$lvl,$opts){ /** * Build the browsable index of pages * - * $opts['ns'] is the current namespace + * $opts['ns'] is the currently viewed namespace * * @author Andreas Gohr */ function search_index(&$data,$base,$file,$type,$lvl,$opts){ global $conf; - $return = true; - - $item = array(); - - if($type == 'd' && !preg_match('#^'.$file.'(/|$)#','/'.$opts['ns'])){ - //add but don't recurse - $return = false; - }elseif($type == 'f' && ($opts['nofiles'] || substr($file,-4) != '.txt')){ - //don't add - return false; - } - - $id = pathID($file,($type == 'd')); - - if($type=='d' && $conf['sneaky_index'] && auth_quickaclcheck($id.':') < AUTH_READ){ - return false; - } - - //check hidden - if(isHiddenPage($id)){ - return false; - } - - //check ACL - if($type=='f' && auth_quickaclcheck($id) < AUTH_READ){ - return false; - } - - $data[]=array( 'id' => $id, - 'type' => $type, - 'level' => $lvl, - 'open' => $return ); - return $return; + $opts = array( + 'pagesonly' => true, + 'listdirs' => true, + 'listfiles' => !$opts['nofiles'], + 'sneakyacl' => $conf['sneaky_index'], + // Hacky, should rather use recmatch + 'depth' => preg_match('#^'.$file.'(/|$)#','/'.$opts['ns']) ? 0 : -1 + ); + + return search_universal($data, $base, $file, $type, $lvl, $opts); } /** -- cgit v1.2.3 From 923510088dda99cb2790b15308593e47369d4f01 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sun, 4 Sep 2011 13:52:26 +0200 Subject: tmp: Introduce sneaky2 --- inc/search.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'inc') diff --git a/inc/search.php b/inc/search.php index bc7c35482..5ba28a1fc 100644 --- a/inc/search.php +++ b/inc/search.php @@ -596,6 +596,25 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){ if($opts['firsthead']) $item['title'] = p_get_first_heading($item['id'],METADATA_DONT_RENDER); } + if($type == 'd' && !$opts['skipacl'] && $opts['sneakyacl'] && $item['perm'] < AUTH_READ) { + if ($opts['sneakyacl'] === 2) { + // Perform shy sneaking, i. e. just show the ns if it contains + // something accessible + $old_data_count = count($data); + search($data,$base,'search_universal',$opts,$file,$lvl+1); + if (count($data) > $old_data_count) { + // Contains something visible + array_splice($data, $old_data_count, $return ? 0 : count($data), + array($item)); + } else { + // Contains nothing visible, so hide + $data = array_slice($data, 0, $old_data_count); + } + } + // Stop recursing in any case since we did it ourself + return false; + } + // finally add the item $data[] = $item; return $return; -- cgit v1.2.3 From 1ffc211ddb46bfabe649bbacd1e36bc8e035afa3 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sun, 4 Sep 2011 15:32:41 +0200 Subject: Revert tmp commits This reverts commit ba6c070edd92ca0fc8a6ee85d51769d64a19ee7c. This reverts commit 923510088dda99cb2790b15308593e47369d4f01. --- inc/search.php | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'inc') diff --git a/inc/search.php b/inc/search.php index 5ba28a1fc..bc7c35482 100644 --- a/inc/search.php +++ b/inc/search.php @@ -596,25 +596,6 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){ if($opts['firsthead']) $item['title'] = p_get_first_heading($item['id'],METADATA_DONT_RENDER); } - if($type == 'd' && !$opts['skipacl'] && $opts['sneakyacl'] && $item['perm'] < AUTH_READ) { - if ($opts['sneakyacl'] === 2) { - // Perform shy sneaking, i. e. just show the ns if it contains - // something accessible - $old_data_count = count($data); - search($data,$base,'search_universal',$opts,$file,$lvl+1); - if (count($data) > $old_data_count) { - // Contains something visible - array_splice($data, $old_data_count, $return ? 0 : count($data), - array($item)); - } else { - // Contains nothing visible, so hide - $data = array_slice($data, 0, $old_data_count); - } - } - // Stop recursing in any case since we did it ourself - return false; - } - // finally add the item $data[] = $item; return $return; -- cgit v1.2.3