Commit ea605794 authored by sylvieg's avatar sylvieg

[MRG] Automatic merge, branches/5.x 26600 to 26623

parent 8c34e1b2
......@@ -3170,6 +3170,7 @@ pics/icons/arrow_refresh.png -text
pics/icons/arrow_right-left.png -text
pics/icons/arrow_right.png -text
pics/icons/arrow_small.png -text
pics/icons/arrow_undo.png -text
pics/icons/assign.png -text
pics/icons/attach.png -text
pics/icons/bell.png -text
......
......@@ -41,6 +41,9 @@ FileETag none
<IfModule mod_rewrite.c>
RewriteEngine On
#If your website is a checkout
RewriteRule ^\.svn/ - [F,L]
# If the URL points to a file then do nothing
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
......
......@@ -155,7 +155,8 @@ $lang=Array(
"attach" => "ملحق",
"hide categories" => "اخفي التصنيفات",
"Admin categories" => "تصنيفات المسؤول",
"Thank you for you registration. You may log in now." => "شكراً على تسجيلك , بمكنك الدخول الآن . ",
"Thank you for you registration." => "شكراً على تسجيلك . ",
"You may log in now." => "بمكنك الدخول الآن . ",
"Group doesnt exist" => "المجموعة غير موجودة",
"User doesnt exist" => "اسم المستخدم غير موجود",
"Event without Name" => "أحداث غير محددة",
......
......@@ -1226,7 +1226,8 @@ $lang=Array(
"active perms" => "activar permisos",
"Dls" => "Descàrr..",
"move selected files" => "mou els arxius seleccionats",
"Thank you for you registration. You may log in now." => "Gràcies pel seu registre. Ara pot connectar-se",
"Thank you for you registration." => "Gràcies pel seu registre.",
"You may log in now." => "Ara pot connectar-se.",
"from\nthe mapfile:" => "des del\n mapfile:",
"compare" => "comparar",
"diff" => "dif",
......@@ -10701,7 +10702,8 @@ $lang=Array(
"Wiki page renamed" => "La pàgina Wiki ha estat reanomenada",
"Old name" => "Nom vell",
"New name" => "Nou nom",
"Thank you for your registration. You may log in now." => "Gràcies per registrar-te. Ara pots connectar-te.",
"Thank you for your registration." => "Gràcies per registrar-te.",
"You may log in now." => "Ara pots connectar-te.",
"click on the map to zoom or pan, do not drag" => "fes clic a sobre del mapa per ampliar o allunyar, no arrosseguisr",
"Query Results" => "Resultats de la consulta",
"Querying" => "Consultant",
......@@ -1333,7 +1333,8 @@ $lang=Array(
"with checked" => "被选中的",
"Dls" => "下载数",
"move selected files" => "移动所选的文件",
"Thank you for you registration. You may log in now." => "感谢你的注册. 你现在可登录了.",
"Thank you for you registration." => "感谢你的注册.",
"You may log in now." => "你现在可登录了.",
"compare" => "比较",
"diff" => "比对差异",
"Click the :: options in the Menu for more options." => "点options您可以在菜单里找到更多选项.",
......
......@@ -721,7 +721,8 @@ $lang=Array(
"monitor this topic" => "overvåg dette emner",
"with checked" => "med afmærkede",
"move selected files" => "flyt udvalgte filer",
"Thank you for you registration. You may log in now." => "Tak for din registrering. Du kan logge ind nu.",
"Thank you for you registration." => "Du kan logge ind nu.",
"You may log in now." => "Du kan logge ind nu.",
"compare" => "sammenlign",
"diff" => "forskel",
"del" => "slet",
......
......@@ -519,7 +519,8 @@ $lang=Array(
"monitor this topic" => "Thema beobachten",
"with checked" => "markierte",
"move selected files" => "markierte Dateien verschieben",
"Thank you for you registration. You may log in now." => "Vielen Dank für die Registrierung. Sie können sich jetzt anmelden.",
"Thank you for you registration." => "Vielen Dank für die Registrierung.",
"You may log in now." => "Sie können sich jetzt anmelden.",
"compare" => "vergleichen",
"diff" => "Diff",
"sender" => "Absender",
......
......@@ -798,7 +798,8 @@ $lang=Array(
"active perms" => "permisos activos",
"with checked" => "con marcados",
"move selected files" => "mover archivos seleccionados",
"Thank you for you registration. You may log in now." => "Gracias por su registro. Puede loguearse ahora.",
"Thank you for you registration." => "Gracias por su registro.",
"You may log in now." => "Puede loguearse ahora.",
"Zoom out x4" => "Alejar x4",
"Zoom out x3" => "Alejar x3",
"Zoom in x3" => "Acercar x3",
......
......@@ -894,7 +894,8 @@ $lang=Array(
"with checked" => "تيك خورده‌ها را...",
"Dls" => "دريافت‌ها",
"move selected files" => "پرونده‌هاي انتخاب شده را منتقل كن",
"Thank you for you registration. You may log in now." => "از ثبت‌نام شما سپاس‌گزاريم. هم‌اكنون شما مي‌توانيم وارد سامانه شويد.",
"Thank you for you registration." => "از ثبت‌نام شما سپاس‌گزاريم.",
"You may log in now." => "هم‌اكنون شما مي‌توانيم وارد سامانه شويد.",
"Zoom out x4" => "بزرگنمايي 4برابر",
"Zoom out x3" => "بزرگنمايي 3برابر",
"Zoom in x3" => "بزرگنمايي 3برابر",
......
......@@ -1081,7 +1081,8 @@ $lang=Array(
"with checked" => "merkityt",
"move selected files" => "siirrä valitut tiedostot",
"Please click on the following link to confirm you wish to reset your password and go to the screen where you must enter a new \"permanent\" password. Please pick a password only you will know, and don't share it with anyone else.\n{\$mail_machine}/tiki-remind_password.php?user={\$mail_user|escape:'url'}&actpass={\$mail_apass}\n\nDone! You should be logged in." => "Paina seuraavaa linkkiä varmistaaksesi salasanan uudelleen asetuksen ja mene näytölle jolla voit vaihtaa \"pysyvän\" salasanan. Valitse salasana jonka vain itse tiedät, äläkä kerro sitä kenellekään.\n{\$mail_machine}/tiki-remind_password.php?user={\$mail_user|escape:'url'}&actpass={\$mail_apass}\n\nTehty! Olet kirjautunut sisään.",
"Thank you for you registration. You may log in now." => "Kiitos rekisteröinnistäsi. Nyt voi kirjautua normaalisti.",
"Thank you for you registration." => "Kiitos rekisteröinnistäsi.",
"You may log in now." => "Nyt voi kirjautua normaalisti.",
"Zoom out x4" => "Suurenna x4",
"Zoom out x3" => "Suurenna x3",
"Zoom in x3" => "Pienennä x3",
......
......@@ -8900,7 +8900,8 @@ $lang=Array(
"Wiki page renamed" => "Page Wiki renommée",
"Old name" => "Ancien nom",
"New name" => "Nouveau nom",
"Thank you for your registration. You may log in now." => "Merci pour votre inscription. Vous pouvez vous connecter maintenant.",
"Thank you for your registration." => "Merci pour votre inscription.",
"You may log in now." => "Vous pouvez vous connecter maintenant.",
"click on the map to zoom or pan, do not drag" => "cliquer sur la carte pour zoomer ou faire un panoramique, ne pas faire glisser ",
"Query Results" => "Résultats de la requête",
"Querying" => "Requête",
......
......@@ -788,7 +788,8 @@ $lang=Array(
"active perms" => "permisos activos",
"with checked" => "con marcados",
"move selected files" => "mover ficheiros seleccionados",
"Thank you for you registration. You may log in now." => "Grazas polo seu rexistro. Agora pode iniciar a sesión.",
"Thank you for you registration." => "Grazas polo seu rexistro.",
"You may log in now." => "Agora pode iniciar a sesión.",
"Zoom out x4" => "Reducir x4",
"Zoom out x3" => "Reducir x3",
"Zoom in x3" => "Ampliar x3",
......
......@@ -670,7 +670,8 @@ $lang=Array(
"with checked" => "sa označenim",
"Dls" => "Skidanja",
"move selected files" => "pomakni odabrane datoteke",
"Thank you for you registration. You may log in now." => "Hvala vam na vašoj registraciji. Sada se možete prijaviti",
"Thank you for you registration." => "Hvala vam na vašoj registraciji.",
"You may log in now." => "Sada se možete prijaviti.",
"compare" => "uporedi",
"diff" => "razlika",
"del" => "obriši",
......
......@@ -9571,7 +9571,8 @@ $lang=Array(
"Wiki page renamed" => "Wiki oldal átnevezve",
"Old name" => "Régi név",
"New name" => "Új név",
"Thank you for your registration. You may log in now." => "Köszönjük a regisztrálást, mostmár be lehet jelentkezni.",
"Thank you for your registration." => "Köszönjük a regisztrálást.",
"You may log in now." => "Mostmár be lehet jelentkezni.",
"Legend" => "Rövidítések értelmezése",
"Mapfiles" => "Térkép fájlok",
"Available mapfiles" => "Jelenlegi térképfájlok",
......
......@@ -645,7 +645,8 @@ $lang=Array(
"monitor this topic" => "トピック監視開始",
"with checked" => "チェックしたアイテムを",
"move selected files" => "選択ファイルを移動",
"Thank you for you registration. You may log in now." => "ご登録ありがとうございます。ログインをどうぞ。",
"Thank you for you registration." => "ご登録ありがとうございます。",
"You may log in now." => "ログインをどうぞ。",
"compare" => "比較",
"diff" => "違い",
"for more setup details." => "をご覧になって、詳しい設定を行うことも出来る。",
......
......@@ -724,7 +724,8 @@ $lang=Array(
"with checked" => "met gecheckt",
"Dls" => "Afhlgn",
"move selected files" => "verplaats geselecteerde bestanden",
"Thank you for you registration. You may log in now." => "Dank voor uw registratie. U kan zich nu aanmelden.",
"Thank you for you registration." => "Dank voor uw registratie.",
"You may log in now." => "U kan zich nu aanmelden.",
"Zoom out x4" => "Zoom uit x4",
"Zoom out x3" => "Zoom uit x3",
"from\nthe mapfile:" => "van\nhet landkaartbestand:",
......
......@@ -549,7 +549,8 @@ $lang=Array(
"up" => "opp",
"down" => "ned",
"add" => "legg til",
"Thank you for you registration. You may log in now." => "Takk for at du regisrerte deg. Du kan nå logge deg på.",
"Thank you for you registration." => "Takk for at du regisrerte deg.",
"You may log in now." => "Du kan nå logge deg på.",
"create" => "lage",
"save" => "lagre",
"compare" => "sammenlign",
......
......@@ -655,7 +655,8 @@ $lang=Array(
"Admin categories" => "Administruj kategoriami",
"reply" => "odpowiedz",
"with checked" => "zaznaczone",
"Thank you for you registration. You may log in now." => "Dziękujemy za zarejestrowanie się. Teraz możesz się już zalogować.",
"Thank you for you registration." => "Dziękujemy za zarejestrowanie się.",
"You may log in now." => "Teraz możesz się już zalogować.",
"compare" => "porównaj",
"diff" => "różnice",
"del" => "usuń",
......
......@@ -926,7 +926,8 @@ $lang=Array(
"show" => "mostrar",
"hide" => "esconder",
"reply" => "responder",
"Thank you for you registration. You may log in now." => "Obrigado por registrar-se. Você pode se logar a partir de agora.",
"Thank you for you registration." => "Obrigado por registrar-se.",
"You may log in now." => "Você pode se logar a partir de agora.",
"Storing files in a directory" => "Guardando arquivos em um diretório",
"please read" => "por favor, leia",
"Click here for more details." => "Clique aqui para mais detalhes.",
......@@ -10034,7 +10035,8 @@ $lang=Array(
"Wiki page renamed" => "Página wiki renomeada",
"Old name" => "Nome antigo",
"New name" => "Novo nome",
"Thank you for your registration. You may log in now." => "Obrigado por se registrar. Você já pode ser logar no site.",
"Thank you for your registration." => "Obrigado por se registrar.",
"You may log in now." => "Você já pode ser logar no site.",
"click on the map to zoom or pan, do not drag" => "clique no mapa para um zoom, não para arrastar",
"Scale" => "Escala",
"Zoom out" => "Menos zoom",
......
......@@ -507,7 +507,8 @@ $lang=Array(
"Cancel monitoring" => "Não monitorizar mais",
"Your email address has been removed from the list of addresses monitoring this item" => "Seu endereço de email foi removido da lista de monitoramento deste tem",
"Your email address has been added to the list of addresses monitoring this item" => "Seu endereço de email foi adicionado à lista de monitoramento deste tem",
"Thank you for you registration. You may log in now." => "Obrigado por registar-se. Você pode ser logar a partir de agora.",
"Thank you for you registration." => "Obrigado por registar-se.",
"You may log in now." => "Você pode ser logar a partir de agora.",
"please read" => "por favor, leia",
"Click here for more details." => "Clique aqui para mais detalhes.",
"Print Wiki Pages" => "Imprimir Páginas Wiki",
......
......@@ -712,7 +712,8 @@ $lang=Array(
"with checked" => "с отмеченными",
"Dls" => "Скачано",
"move selected files" => "переместить выбранные файлы",
"Thank you for you registration. You may log in now." => "Спасибо за регистрацию. Теперь вы можете залогиниться.",
"Thank you for you registration." => "Спасибо за регистрацию.",
"You may log in now." => "Теперь вы можете залогиниться.",
"compare" => "сравнить",
"diff" => "разница",
"del" => "удалить",
......
......@@ -10539,7 +10539,8 @@ $lang=Array(
"Comment:" => "Toktok:",
"The new page content follows below." => "Disfala niu pej hem garem olketa samting long daon ia.",
"New name" => "Niu nem",
"Thank you for your registration. You may log in now." => "Taggio long registration blong iu. Iu save log go insaet distaem",
"Thank you for your registration." => "Taggio long registration blong iu.",
"You may log in now." => "Iu save log go insaet distaem.",
"click on the map to zoom or pan, do not drag" => "click long map ia sapos iu laek fo hem zoom o move olobaot (pan), no pulum/drag",
"Scale" => "Skel",
"Redraw" => "Drom baek",
......
......@@ -606,7 +606,8 @@ $lang=Array(
"monitor this topic" => "sledovať tento topic",
"Dls" => "Downloadov",
"move selected files" => "presunúť vybraté súbory",
"Thank you for you registration. You may log in now." => "Dakujeme Vám za Vašu registráciu. Teraz sa môžete prihlásiť.",
"Thank you for you registration." => "Dakujeme Vám za Vašu registráciu.",
"You may log in now." => "Teraz sa môžete prihlásiť.",
"compare" => "porovnať",
"diff" => "rozdiely",
"Create pdf" => "Vytvoriť pdf",
......
......@@ -9450,7 +9450,8 @@ $lang=Array(
"Wiki page renamed" => "Wiki stran je preimenovana",
"Old name" => "Staro ime",
"New name" => "Novo ime",
"Thank you for your registration. You may log in now." => "Hval aza registracijo. Sedaj se lahko prijavite.",
"Thank you for your registration." => "Hval aza registracijo.",
"You may log in now." => "Sedaj se lahko prijavite.",
"Zoom out" => "Povečaj",
"Zoom in" => "Zmanjšaj",
"Overview" => "Pregled",
......
......@@ -679,7 +679,8 @@ $lang=Array(
"with checked" => "sa označenim",
"Dls" => "Skidanja",
"move selected files" => "pomeri odabrane fajlove",
"Thank you for you registration. You may log in now." => "Hvala vam na vašoj registraciji. Sada možete da se loginujete",
"Thank you for you registration." => "Hvala vam na vašoj registraciji.",
"You may log in now." => "Sada možete da se loginujete",
"from\nthe mapfile:" => "iz\nmap fajla:",
"compare" => "uporedi",
"diff" => "razlika",
......
......@@ -829,7 +829,8 @@ $lang=Array(
"monitor this topic" => "bevaka detta ämne",
"with checked" => "med kontrollerade",
"move selected files" => "flytta valda filer",
"Thank you for you registration. You may log in now." => "Tack för att du registrerade. Du kan logga in nu.",
"Thank you for you registration." => "Tack för att du registrerade.",
"You may log in now." => "Du kan logga in nu.",
"from\nthe mapfile:" => "från\nkartfilen:",
"compare" => "jämför",
"diff" => "skillnad",
......
......@@ -768,7 +768,8 @@ $lang=Array(
"monitor this topic" => "監控此主題",
"Dls" => "下傳數",
"move selected files" => "移動選擇的檔案",
"Thank you for you registration. You may log in now." => "感謝你的註冊. 你現在可以登入了.",
"Thank you for you registration." => "感謝你的註冊.",
"You may log in now." => "你現在可以登入了.",
"compare" => "比較",
"diff" => "比對差異",
"del" => "清除",
......
......@@ -657,7 +657,8 @@ $lang=Array(
"reply" => "відповісти",
"monitor this topic" => "слідкувати за цією темою",
"move selected files" => "перемістити вибрані файли",
"Thank you for you registration. You may log in now." => "Дякуємо за отримання доступу до майданчика. Тепер Ви можете зареєструватись.",
"Thank you for you registration." => "Дякуємо за отримання доступу до майданчика.",
"You may log in now." => "Тепер Ви можете зареєструватись.",
"compare" => "порівняння",
"diff" => "різниці",
"del" => "видалити",
......
......@@ -220,7 +220,7 @@ $lang=Array(
"Tiki User Registration Request" => "Yêu cầu Đăng kí Người dùng Tiki",
"Tiki email notification" => "Thông báo email Tiki",
"Someone coming from IP Address" => "Một ai đó từ Địa chỉ IP",
"Please click on the following link to confirm you wish to reset your password and go to the screen where you must enter a new \"permanent\" password. Please pick a password only you will know, and don't share it with anyone else.\n{\$mail_machine}/tiki-remind" => "Vui lòng nhấn lên liên kết sau để xác nhận rằng bạn muốn khởi tạo lại mật khẩu và vào một nơi mà bạn phải nhập một mật khẩu \"vĩnh viễn\" mới. Vui lòng chọn một mật khẩu mà chỉ mình bạn bi",
"Please click on the following link to confirm you wish to reset your password and go to the screen where you must enter a new \"permanent\" password. Please pick a password only you will know, and don't share it with anyone else.\n{\$mail_machine}/tiki-remind" => "Vui lòng nhấn lên liên kết sau để xác nhận rằng bạn muốn khởi tạo lại mật khẩu và vào một nơi mà bạn phải nhập một mật khẩu \"vĩnh viễn\" mới. Vui lòng chọn một mật khẩu mà chỉ mình bạn bi",
"Your Tiki account information for %s" => "Thông tin tài khoản Tiki cho %s",
"you or someone registered this email address at" => "bạn hoặc một ai đó đã đăng kí địa chỉ email này tại",
"Your Tiki information registration" => "Đăng kí thông tin Tiki của bạn",
......@@ -472,7 +472,8 @@ $lang=Array(
"{if \$mail_user}{\$mail_user}{else}{tr}An anonymous user" => "{if \$mail_user}{\$mail_user}{else}{tr}Một người ẩn danh",
"You can view the comment at" => "Bạn có thể xem bình luận tại",
"If you don't want to receive these notifications, follow this link:" => "Nếu bạn không muốn nhận những thông báo này, hãy vào liên kết sau:",
"Thank you for your registration. You may <a href=\"tiki-login.php\">log in</a> now." => "Cảm ơn bạn đã đăng kí. Có thể bạn muốn <a href=\"tiki-login.php\">đăng nhập</a> ngay.",
"Thank you for your registration." => "Cảm ơn bạn đã đăng kí.",
"You may log in now." => "Có thể bạn muốn đăng nhập ngay.",
"Translations with new content" => "Các bản dịch có nội dung mới",
"Translations not yet updated with changes in the currently viewed language version" => "Các bản dịch chưa được cập nhật các thay đổi trong phiên bản ngôn ngữ đang xem hiện tại",
"View changes and update translation" => "Xem các thay đổi và cập nhật bản dịch",
......@@ -10145,7 +10146,8 @@ $lang=Array(
"Wiki page renamed" => "Trang wiki đã được đổi tên",
"Old name" => "Tên cũ",
"New name" => "Tên mới",
"Thank you for your registration. You may log in now." => "Cảm ơn bạn đã đăng kí. Bây giờ bạn có thể đăng nhập được rồi.",
"Thank you for your registration." => "Cảm ơn bạn đã đăng kí.",
"You may log in now." => "Bây giờ bạn có thể đăng nhập được rồi.",
"Create" => "Tạo",
"of" => "của",
"Comparing version {\$old.version} with version {\$new.version}" => "So sánh phiên bản {\$old.version} với phiên bản {\$new.version}",
......
......@@ -195,25 +195,8 @@ function loadComponent($template, $htmlElementId, $max_tikitabs = 0, $last_user
// take out javascript from the html response because it needs to be sent specifically as javascript
// using $objResponse->script($s) below
preg_match_all('/(?:<script.*type=[\'"]?text\/javascript[\'"]?.*>\s*?)(.*)(?:\s*<\/script>)/Umis', $content, $jsarr);
if (count($jsarr) > 1 && is_array($jsarr[1])) {
$js = preg_replace('/\s*?<\!--\/\/--><\!\[CDATA\[\/\/><\!--\s*?/Umis', '', $jsarr[1]); // strip out CDATA XML wrapper if there
$js = preg_replace('/\s*?\/\/--><\!\]\]>\s*?/Umis', '', $js);
// change 'function fName (' to 'fName = function(' (as it seems to work then)
$js = preg_replace('/function (.*)\(/Umis', "$1 = function(", $js);
//taginsert = function (
if (!isset($js_script)) {
$js_script = array();
}
$js_script = array_merge($js_script, $js);
}
// this is very probably possible as a single regexp, maybe a preg_replace_callback
// but it was stopping the CDATA group being returned (and life's too short ;)
// the one below should work afaics but just doesn't! :(
// preg_match_all('/<script.*type=[\'"]?text\/javascript[\'"]?.*>(\s*<\!--\/\/--><\!\[CDATA\[\/\/><\!--)?\s*?(.*)(\s*\/\/--><\!\]\]>\s*)?<\/script>/imsU', $content, $js);
$js_script = $headerlib->getJsFromHTML( $content, true );
// do included files too...
$js_files = array();
preg_match_all('/<script[^>]*src=[\'"]??(.*)[\'"]??>\s*<\/script>/Umis', $content, $jsarr);
......
<?php
<?php
// (c) Copyright 2002-2010 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......
/*
/*
* FCKPlugin.js
* ------------
* This is a generic file which is needed for plugins that are developed
......@@ -100,7 +100,7 @@ if ( FCKBrowserInfo.IsIE ) {
for ( var n = 0 ; n < aNodes.length ; n++ ) {
var aPieces = aNodes[n].nodeValue.split( /(\(\((?:(?:[^\n|\(\)])(?:(?!(\)\)|\||\n)).)*?)(?:\|(?:[^\)]*))?\)\))/ );
for ( var i = 0 ; i < aPieces.length ; i++ ) {
if ( aPieces[i].length > 0 ) {
if ( aPieces[i] && aPieces[i].length > 0 ) {
if ( aPieces[i].indexOf( '((' ) == 0 ) {
var sMatch = aPieces[i].match( /\(\(((?:[^\n|\(\)])(?:(?!(\)\)|\||\n)).)*?)(\|([^\)]*))?\)\)/ );
var sPage = sMatch[1] ;
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>{tr}Tiki Link - Insert internal link{/tr}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="noindex, nofollow" name="robots">
{literal}
<script type="text/javascript" src="fcktikilink.js"></script>
......
/*
/*
* FCKPlugin.js
* ------------
* This was a generic file which is needed for plugins that are developed
......
......@@ -371,6 +371,39 @@ class HeaderLib
function hasOutput() {
return $this->hasDoneOutput;
}
/**
* Get JavaScript tags from html source - used for AJAX responses and cached pages
*
* @param string $html - source to search for JavaScript
* @param bool $switch_fn_definition - if set converts 'function fName ()' to 'fName = function()' for AJAX
*
* @return array of JavaScript strings
*/
function getJsFromHTML( $html, $switch_fn_definition = false ) {
$jsarr = array();
$js_script = array();
preg_match_all('/(?:<script.*type=[\'"]?text\/javascript[\'"]?.*>\s*?)(.*)(?:\s*<\/script>)/Umis', $html, $jsarr);
if (count($jsarr) > 1 && is_array($jsarr[1]) && count($jsarr[1]) > 0) {
$js = preg_replace('/\s*?<\!--\/\/--><\!\[CDATA\[\/\/><\!--\s*?/Umis', '', $jsarr[1]); // strip out CDATA XML wrapper if there
$js = preg_replace('/\s*?\/\/--><\!\]\]>\s*?/Umis', '', $js);
if ($switch_fn_definition) {
$js = preg_replace('/function (.*)\(/Umis', "$1 = function(", $js);
}
$js_script = array_merge($js_script, $js);
}
// this is very probably possible as a single regexp, maybe a preg_replace_callback
// but it was stopping the CDATA group being returned (and life's too short ;)
// the one below should work afaics but just doesn't! :(
// preg_match_all('/<script.*type=[\'"]?text\/javascript[\'"]?.*>(\s*<\!--\/\/--><\!\[CDATA\[\/\/><\!--)?\s*?(.*)(\s*\/\/--><\!\]\]>\s*)?<\/script>/imsU', $html, $js);
return $js_script;
}
private function output_css_files() {
$files = $this->collect_css_files();
......
......@@ -1256,45 +1256,58 @@ function prefs_feature_list() {
'feature_jquery_tooltips' => array(
'name' => tra('Tooltips'),
'type' => 'flag',
'description' => tra('Make tooltips such as this appear in a custom style. Use CSS to change their appearance.'),
'help' => 'JQuery#Tooltips',
),
'feature_jquery_autocomplete' => array(
'name' => tra('Autocomplete'),
'type' => 'flag',
'description' => tra('Provides various drop-down menus on many text input boxes for page names, user names, groups, tags etc.'),
'help' => 'JQuery#Autocomplete',
),
'feature_jquery_superfish' => array(
'name' => tra('Superfish'),
'type' => 'flag',
'description' => tra('Adds animation effects to CSS "Suckerfish" menus.'),
'help' => 'JQuery#Superfish',
),
'feature_jquery_reflection' => array(
'name' => tra('Reflection'),
'type' => 'flag',
'description' => tra('Allows images to have a reflection effect below them. See the admin icons above for an example.'),
'help' => 'JQuery#Reflection',
),
'feature_jquery_ui' => array(
'name' => tra('JQuery UI'),
'type' => 'flag',
'description' => tra('Include jQuery UI library. Enables many user interface features.'),
'help' => 'JQuery#UI',
),
'feature_jquery_ui_theme' => array(
'name' => tra('JQuery UI Theme'),
'help' => 'JQuery#UI',
'type' => 'list',
'description' => tra('jQuery UI Theme. Used in spreadsheet, for example.'),
'options' => array(
'black-tie' => 'black-tie',
'blitzer' => 'blitzer',
'cupertino' => 'cupertino',
'dark-hive' => 'dark-hive',
'dot-luv' => 'dot-luv',
'eggplant' => 'eggplant',
'excite-bike' => 'excite-bike',
'flick' => 'flick',
'hot-sneaks' => 'hot-sneaks',
'humanity' => 'humanity',
'le-frog' => 'le-frog',
'mint-choc' => 'mint-choc',
'overcast' => 'overcast',
'pepper-grinder' => 'pepper-grinder',
'redmond' => 'redmond',
'smoothness' => 'smoothness',
'south-street' => 'south-street',
'start' => 'start',
'sunny' => 'sunny',
'swanky-purse' => 'swanky-purse',
'trontastic' => 'trontastic',
'ui-darkness' => 'ui-darkness',
......@@ -1321,7 +1334,7 @@ function prefs_feature_list() {
'name' => tra('JQuery Infinite Carousel'),
'type' => 'flag',
'help' => 'JQuery#Carousel',
'description' => tra('Image "carousel" plugin'),
'description' => tra('Image "carousel" plugin (coming soon)'),
),
'feature_jquery_tablesorter' => array(
'name' => tra('JQuery Sortable Tables'),
......
......@@ -22,7 +22,7 @@ function prefs_multidomain_list() {
'description' => tra('Comma-separated values mapping the domain name to the perspective ID.'),
'type' => 'textarea',
'size' => 10,
'hint' => tra('One domain per line. Comma separated with perspective ID.'),
'hint' => tra('One domain per line. Comma separated with perspective ID. Ex.: tikiwiki.org,1'),
),
);
}
......@@ -66,6 +66,12 @@ class PreferencesLib
if( isset( $info['extensions'] ) ) {
$info['available'] = $this->checkExtensions( $info['extensions'] );
}
$defprefs = get_default_prefs();
if ($info['value'] == $defprefs[$name]) {
$info['is_default'] = true;
} else {
$info['is_default'] = false;
}
if ($get_pages) {
global $prefs_usage_array;
......
......@@ -71,7 +71,7 @@ if ($prefs['feature_tabs'] == 'y') {
preg_match('/[\?\&]page=([^\&]*)/', $_SERVER['REQUEST_URI'], $q_match); // admin & wiki pages
preg_match('/[\?\&]page=([^\&]*)/', $_SERVER['HTTP_REFERER'], $ref_match);
if ((isset($_COOKIE['tab_last_query']) && $_COOKIE['tab_last_query'] == $_SERVER['SCRIPT_NAME '] . serialize($_GET)) || (count($q_match) == 0 || $q_match == $ref_match)) { // for admin includes when staying on same panel
if ((isset($_COOKIE['tab_last_query']) && $_COOKIE['tab_last_query'] == $_SERVER['SCRIPT_NAME'] . serialize($_GET)) || (count($q_match) == 0 || $q_match == $ref_match)) { // for admin includes when staying on same panel
$cookietab = $_COOKIE['tab'];
}
}
......
......@@ -1527,7 +1527,7 @@ function get_default_prefs() {
'feature_jquery_sheet' => 'n', // spreadsheet
'feature_jquery_jqs5' => 'n', // slide-show TODO: implement (more)
'feature_jquery_tablesorter' => 'n', // sortable tables ([will] override existing)
'feature_jquery_carousel' => 'y', // slideshow/carousel for file gals etc
'feature_jquery_carousel' => 'n', // slideshow/carousel for file gals etc
// SefUrl
'feature_sefurl' => 'n',
......@@ -1736,10 +1736,12 @@ if ( ! $_SESSION['need_reload_prefs'] ) {
// Disabled by default so it has to be modified
if( isset($modified['feature_perspective']) && $modified['feature_perspective'] == 'y' ) {
require_once 'lib/perspectivelib.php';
if( $persp = $perspectivelib->get_current_perspective( $modified ) ) {
$changes = $perspectivelib->get_preferences( $persp );
$modified = array_merge( $modified, $changes );
if( ! isset( $section ) || $section != 'admin' ) {
require_once 'lib/perspectivelib.php';
if( $persp = $perspectivelib->get_current_perspective( $modified ) ) {
$changes = $perspectivelib->get_preferences( $persp );
$modified = array_merge( $modified, $changes );
}
}
}
......
......@@ -184,7 +184,7 @@ class TikiDate
$tz_id = $this->convertMissingTimezone($tz_id);
}
}
$this->date->setTimeZone($dtz);
$this->date->setTimezone($dtz);
}
// TODO delete in Tiki 6 (if really unused)
......
......@@ -4458,7 +4458,7 @@ class TikiLib extends TikiDb_Bridge
/** Create a wiki page
@param array $hash- lock_it,contributions, contributors
**/
function create_page($name, $hits, $data, $lastModif, $comment, $user = 'admin', $ip = '0.0.0.0', $description = '', $lang='', $is_html = false, $hash=null, $wysiwyg=NULL, $wiki_authors_style='', $minor=0) {
function create_page($name, $hits, $data, $lastModif, $comment, $user = 'admin', $ip = '0.0.0.0', $description = '', $lang='', $is_html = false, $hash=null, $wysiwyg=NULL, $wiki_authors_style='', $minor=0, $created='') {
global $smarty, $prefs, $dbTiki, $quantifylib;
include_once ("lib/commentslib.php");
......@@ -4495,7 +4495,7 @@ class TikiLib extends TikiDb_Bridge
$edit_data = HTMLPurifier($edit_data);
}
$mid = ''; $midvar = '';
$bindvars = array($name, (int)$hits, $data, (int)$lastModif, $comment, 1, $minor, $user, $ip, $description, $user, (int)strlen($data), $html, $this->now, $wysiwyg, $wiki_authors_style);
$bindvars = array($name, (int)$hits, $data, (int)$lastModif, $comment, 1, $minor, $user, $ip, $description, $user, (int)strlen($data), $html, empty($created)?$this->now:$created, $wysiwyg, $wiki_authors_style);
if ($lang) {
$mid .= ',`lang`';
$midvar .= ',?';
......@@ -7633,7 +7633,7 @@ class TikiLib extends TikiDb_Bridge
// If user timezone is not also in UTC, convert the date
if ( $tz != 'UTC' ) {
$tikidate->convertTZByID($tz);
$tikidate->setTZbyID($tz);
}
return $tikidate->format($format, $is_strftime_format);
......
......@@ -192,8 +192,8 @@ class TrackerLib extends TikiLib
$query = "insert into `tiki_tracker_item_attachments`(`itemId`,`filename`,`filesize`,`filetype`,`data`,`created`,`hits`,`user`,";
$query.= "`comment`,`path`,`version`,`longdesc`) values(?,?,?,?,?,?,?,?,?,?,?,?)";
$result = $this->query($query,array((int) $itemId,$filename,$size,$type,$data,(int) $now,0,$user,$comment,$fhash,$version,$longdesc));
$query = 'select `attId` from `tiki_tracker_item_attachments` where `itemId`=? and `user`=? and `created`=? and `filename`=?';
$attId = $this->getOne($query, array($itemId, $user, $now, $filename));
$query = 'select `attId` from `tiki_tracker_item_attachments` where `itemId`=? and `created`=? and `filename`=?';
$attId = $this->getOne($query, array($itemId, $now, $filename));
} elseif (empty($filename)) {
$query = "update `tiki_tracker_item_attachments` set `comment`=?,`user`=?,`version`=?,`longdesc`=? where `attId`=?";
$result = $this->query($query,array($comment, $user, $version, $longdesc, $attId));
......@@ -1943,7 +1943,6 @@ class TrackerLib extends TikiLib
$str .= '"'.$field['name'].' -- '.$field['fieldId'].'",';
}
}
echo $str;
// prepare queries
$mid = ' WHERE tti.`trackerId` = ? ';
......@@ -2085,6 +2084,11 @@ class TrackerLib extends TikiLib
;
} elseif ($f['type'] == 'c' && (empty($f['value']) || $f['value'] == 'n')) {
$mandatory_fields[] = $f;
} elseif ($f['type'] == 'A' && !empty($itemId) && empty($f['value'])) {
$val = $this->get_item_value($trackerId, $itemId, $f['fieldId']);
if (empty($val)) {
$mandatory_fields[] = $f;
}
} elseif (!isset($f['value']) or strlen($f['value']) == 0) {
$mandatory_fields[] = $f;
}
......@@ -2715,6 +2719,9 @@ class TrackerLib extends TikiLib
return $fieldId;
} else {
$fields = $this->fetchAll($query, $bindvars);
foreach ($fields as $k=>$f) {
$fields[$k] = $f['fieldId'];
}
return $fields;
}
}
......
......@@ -111,7 +111,7 @@ function wikiplugin_countdown($data, $params) {
// (the string was specified using the user timezone)
$tikidate->setTZbyID($tikilib->get_display_timezone());
$tikidate->setDate($then);
$tikidate->convertTZByID('UTC');
$tikidate->setTZbyID('UTC');
$then = $tikidate->getTime();
$difference = $then - $tikilib->now;
......
......@@ -476,7 +476,9 @@ function wikiplugin_tracker($data, $params)
$data .= fread($fp, 8192 * 16);
}
fclose ($fp);
$files[$fld]['old_value'] = $files[$fld]['value'];
if (!empty($itemId) && $fl['type'] == 'A') {
$files[$fld]['old_value'] = $trklib->get_item_value($trackerId, $itemId, $fld);
}
$files[$fld]['value'] = $data;
} else {
$files[$fld]['file_'.$label] = $val;
......
......@@ -351,6 +351,37 @@ function wikiplugin_trackerlist($data, $params) {
}
$allfields = $trklib->list_tracker_fields($trackerId, 0, -1, 'position_asc', '', true, '', $listfields);
if (!empty($filterfield)) {
if (is_array($filterfield)) {
foreach ($filterfield as $ff) {
unset($filterfieldok);
if (is_array($ff)) {// already checked in trackerfilter
$filterfieldok=true;
break;