From dbc6dbd7e146649a8ef0d2f0c7132774cb22bac9 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 9 Jul 2014 19:40:43 +0000 Subject: [PATCH 01/67] Brazilian translations from Guilherme Rocha guilherme-at-gf7.com.br --- calendar/lang/egw_pt-br.lang | 93 +++++++++++++++++++++++++++++++++++ etemplate/lang/egw_pt-br.lang | 1 - 2 files changed, 93 insertions(+), 1 deletion(-) diff --git a/calendar/lang/egw_pt-br.lang b/calendar/lang/egw_pt-br.lang index ee29e879a5..4f985c2970 100644 --- a/calendar/lang/egw_pt-br.lang +++ b/calendar/lang/egw_pt-br.lang @@ -1,23 +1,37 @@ %1 %2 in %3 calendar pt-br %1 %2 em %3 +%1 days calendar pt-br % 1 dias +%1 event(s) %2 calendar pt-br % 1 evento (s) 2% +%1 hours calendar pt-br % uma hora +%1 minutes calendar pt-br % 1 minuto %1 records imported calendar pt-br %1 registro(s) importado(s) %1 records read (not yet imported, you may go back and uncheck test import) calendar pt-br %1 registro(s) lido(s) (não importado(s) ainda. Você deve voltar e desmarcar "Testar Importação") %1 weeks calendar pt-br %1 semanas +%s the event calendar pt-br % Do evento +(%1 events in %2 seconds) calendar pt-br (% 1% 2 eventos em segundos) +(empty = use global limit, no = no export at all) admin pt-br (= Vazias usar limite global, não = nenhuma exportação em tudo) +, exceptions preserved calendar pt-br , Exceções preservados +, stati of participants reset calendar pt-br , Estado de participantes redefinir please note: the calendar use the holidays of your country, which is set to %1. you can change it in your %2.
holidays are %3 automatic installed from %4. you can changed it in %5. calendar pt-br Atenção: A Agenda usa os feriados de seu país, que está configurado como %1. Você pode alterá-lo em %2.
Feriados são %3 automaticamente instalados de %4. Você pode alterar isso em %5. a non blocking event will not conflict with other events calendar pt-br Um evento não bloqueador não irá conflitar com outros eventos accept calendar pt-br aceitar accept or reject an invitation calendar pt-br Aceitar ou rejeitar um convite accepted calendar pt-br Aceito access denied to the calendar of %1 !!! calendar pt-br Acesso negado à agenda de %1 +access to calendar of %1 denied! calendar pt-br Acesso ao calendário de 1% negada! action that caused the notify: added, canceled, accepted, rejected, ... calendar pt-br Ação que provocou a notificação: (Adicionada, Cancelada, Aceita, Rejeitada, ...) actions calendar pt-br Ações actions... calendar pt-br Ações... add alarm calendar pt-br Adicionar aviso +add current view as favorite calendar pt-br Adicionar visão atual como favorita +add new alarm calendar pt-br Adicionar novo alarme +add new participants or resource calendar pt-br Adicionar novos participantes ou recurso add timesheet entry calendar pt-br Adicionar registro à planilha de tempo added calendar pt-br Adicionado added by synchronisation calendar pt-br Adicionado por sincronização after calendar pt-br após after %1 calendar pt-br Após %1 after current date calendar pt-br Após data atual +age: calendar pt-br Idade: alarm calendar pt-br Alarme alarm added calendar pt-br Alarme adicionado alarm deleted calendar pt-br Alarme removido @@ -27,26 +41,39 @@ alarms calendar pt-br Alarmes all categories calendar pt-br Todas as categorias all day calendar pt-br Todo o dia all events calendar pt-br Todos os eventos +all exceptions are converted into single events. calendar pt-br Todas as exceções são convertidos em eventos individuais. all future calendar pt-br Todos futuros +all incl. rejected calendar pt-br Todos incl. rejeitado all participants calendar pt-br Todos os participantes allows to edit the event again calendar pt-br Permite editar o evento novamente always calendar pt-br sempre apply the changes calendar pt-br aplicar as alterações are you sure you want to delete this country ? calendar pt-br Você tem certeza que deseja remover este país? are you sure you want to delete this holiday ? calendar pt-br Você tem certeza que deseja remover este feriado ? +automatically purge old events after admin pt-br Purgar automaticamente eventos antigos depois back half a month calendar pt-br voltar metade de um mês back one month calendar pt-br voltar um mês +back one year calendar pt-br Voltar um ano +before calendar pt-br Antes before %1 calendar pt-br Antes %1 before current date calendar pt-br Antes da data atual before the event calendar pt-br antes do evento birthday calendar pt-br Aniversário birthdays admin pt-br Aniversários +birthdays only calendar pt-br Só Aniversários +both, holidays and birthdays calendar pt-br Ambos, feriados e aniversários busy calendar pt-br ocupado by calendar pt-br por +calendar - list calendar pt-br Calendário - Lista +calendar - multi-weekly calendar pt-br Calendário - multi semana +calendar - planner calendar pt-br Calendário - Planner calendar csv export calendar pt-br Exportar Agenda em CVS calendar event calendar pt-br Evento da Agenda calendar fields: calendar pt-br Campos da Agenda: calendar holiday management admin pt-br Gerenciamento de feriados da Agenda +calendar ical export calendar pt-br Calendário exportação iCal +calendar ical import calendar pt-br Importação calendário iCal +calendar id calendar pt-br Calendário ID calendar menu calendar pt-br Menu da Agenda calendar preferences calendar pt-br Preferências da Agenda calendar settings admin pt-br Configurações da Agenda @@ -54,37 +81,57 @@ calendar-fieldname calendar pt-br Agenda-Nome do Campo can't add alarms in the past !!! calendar pt-br Não é possível incluir alarmes no passado !! can't aquire lock! calendar pt-br Não foi possível acesso exclusivo ao registro! canceled calendar pt-br Cancelado +category %1 removed because of missing rights calendar pt-br Categoria% 1 removido por causa de direitos perdidos +category acl common pt-br Categoria ACL +chair calendar pt-br Cadeira +change history calendar pt-br Mudar a história +change your status calendar pt-br Alterar seu status charset of file calendar pt-br Charset do arquivo check all calendar pt-br Verificar todos choose a category calendar pt-br Escolha uma categoria close the window calendar pt-br Fechar a janela compose a mail to all participants after the event is saved calendar pt-br compor um e-mail para todos os participantes após o evento ser salvo +conflict calendar pt-br Conflito copy of: calendar pt-br Copiar para: copy this event calendar pt-br Copiar este evento copy your changes to the clipboard, %1reload the entry%2 and merge them. calendar pt-br Copiar suas alterações para a área de transferência, %1recarregar o registro%2 e mesclá-los. countries calendar pt-br Países country calendar pt-br País +create a new series calendar pt-br Criar uma nova série create an exception for the given date calendar pt-br Criar uma exceção para a data informada +create an infolog from this event calendar pt-br Criar um Infolog deste evento create exception calendar pt-br Criar exceção +create links for participants from addressbook calendar pt-br Criar ligações para participantes de endereços create new links calendar pt-br Criar novos links created calendar pt-br Criado creator calendar pt-br Criador csv calendar pt-br CSV csv-fieldname calendar pt-br CVS-Nome do Campo csv-filename calendar pt-br CVS-Nome do arquivo +custom calendar pt-br Personalizado custom fields common pt-br Campos Personalizados +custom_2 common pt-br Free / Busy daily calendar pt-br Diária +daily tables calendar pt-br Tabelas diárias +data exchange settings calendar pt-br Configurações de troca de dados day calendar pt-br Dia +day of week tables calendar pt-br Dia de tabelas semana days calendar pt-br dias days of the week for a weekly repeated event calendar pt-br Dias da semana para um evento semanal recorrrente days repeated calendar pt-br dias repetidos dayview calendar pt-br Visão diária +default alarm for regular events calendar pt-br Alarme padrão para eventos regulares +default alarm for whole-day events calendar pt-br Alarme padrão para eventos de todo o dia default appointment length (in minutes) calendar pt-br duração padrão do compromisso (em minutos) default calendar filter calendar pt-br Filtro padrão da agenda default calendar view calendar pt-br Visualização padrão da agenda +default document to insert entries calendar pt-br Documento padrão para inserir entradas default length of newly created events. the length is in minutes, eg. 60 for 1 hour. calendar pt-br Duração padrão dos novos compromissos. A duração é em minutos, ex. 60 para 1 hora +default type of resources selection calendar pt-br Tipo padrão de seleção de recursos default week view calendar pt-br Visualização semanal padrão delegated calendar pt-br designado +delete exceptions calendar pt-br Excluir exceções +delete selected events calendar pt-br Excluir eventos selecionados delete series calendar pt-br Remover série delete this alarm calendar pt-br Remover este alarme delete this event calendar pt-br Remover este evento @@ -114,23 +161,32 @@ enddate / -time of the meeting, eg. for more then one day calendar pt-br Data Fi enddate of the export calendar pt-br Data Final da exportação ends calendar pt-br termina error adding the alarm calendar pt-br Erro adicionando o alarme +error saving the event! calendar pt-br Erro salvando o evento! +error: can't delete original series! calendar pt-br Erro: Não é possível excluir série original! error: importing the ical calendar pt-br Erro importanto o iCal error: no participants selected !!! calendar pt-br Erro: nenhum participante selecionado !! error: saving the event !!! calendar pt-br Erro salvando o evento error: starttime has to be before the endtime !!! calendar pt-br Erro: horário de início deve ser anterior ao horário de término error: the entry has been updated since you opened it for editing! calendar pt-br Erro: O registro foi atualizado desde que você o abriu para edição! +error: you can't shift a series from the past! calendar pt-br Erro: Você não pode mudar uma série do passado! event copied - the copy can now be edited calendar pt-br Evento copiado - agora a cópia pode ser editada event deleted calendar pt-br Evento removido event details follow calendar pt-br Seguem detalhes do evento event saved calendar pt-br Evento salvo event will occupy the whole day calendar pt-br Evento irá ocupar todo o dia +every user can invite other users and groups admin pt-br Cada usuário pode convidar outros usuários e grupos exception calendar pt-br Exceção exception created - you can now edit or delete it calendar pt-br Exceção criada - você agora pode editá-la ou removê-la exceptions calendar pt-br Exceções execute a further action for this entry calendar pt-br Executar uma outra ação para este registro existing links calendar pt-br Links existentes +exists calendar pt-br Existe +export definition to use for nextmatch export calendar pt-br Definição Exportar para usar para exportação NextMatch +exports events from your calendar in ical format. calendar pt-br Exportações eventos do Calendário em formato iCal. +exports events from your calendar into a csv file. calendar pt-br Exportações eventos de seu calendário em um arquivo CSV. extended calendar pt-br Extendido extended updates always include the complete event-details. ical's can be imported by certain other calendar-applications. calendar pt-br Atualizações extendidas sempre incluem os detalhes completos do evento. iCals podem ser importados por certos aplicativos de calendários +favorites calendar pt-br Favoritos fieldseparator calendar pt-br Separador de campos filemanager calendar pt-br Gerenciador de Arquivos filename calendar pt-br Nome do arquivo @@ -143,22 +199,27 @@ for which views should calendar show distinct lines with a fixed time interval. format of event updates calendar pt-br Formato de atualizção de eventos forward half a month calendar pt-br avançar metade de um mês forward one month calendar pt-br avançar um mês +forward one year calendar pt-br Encaminhar um ano four days view calendar pt-br Visão de 4 dias +freebusy common pt-br Free / Busy freebusy: unknow user '%1', wrong password or not availible to not loged in users !!! calendar pt-br Disponibilidade: Usuário '%1' desconhecido, senha incorreta ou não disponível para os usuários acessando o sistema. freetime search calendar pt-br Procurar disponibilidade fri calendar pt-br Sex full description calendar pt-br Descrição Completa fullname of person to notify calendar pt-br Nome completo da pessoa a ser notificada general fields: calendar pt-br Campos gerais: +general settings calendar pt-br Definições gerais global categories calendar pt-br Categorias Globais global public and group public calendar pt-br Público global e Grupo público global public only calendar pt-br Público global somente group invitation calendar pt-br Convite de grupo group planner calendar pt-br Planejamento do Grupo group public only calendar pt-br Grupo público somente +group(s) or user(s) to show calendar pt-br Grupo (s) ou o utilizador (s) para mostrar groupmember(s) %1 not included, because you have no access. calendar pt-br Membro(s) %1 não incluído(s), pois você não tem acesso. h calendar pt-br h here is your requested alarm. calendar pt-br Aqui está o alarme solicitado +hide private events calendar pt-br Ocultar eventos privados hide private infos calendar pt-br Ocultar informações privadas high priority calendar pt-br Alta prioridade history calendar pt-br Histórico @@ -166,10 +227,13 @@ history logging admin pt-br Registro de histórico holiday calendar pt-br Feriado holiday management calendar pt-br Gerenciamento de Feriados holidays calendar pt-br Feriados +holidays only calendar pt-br Feriados só hours calendar pt-br horas how far to search (from startdate) calendar pt-br até onde procurar (da data de início) how many minutes should each interval last? calendar pt-br Quantos minutos cada intervalo deverá durar ? how many weeks should the multiple week view show? calendar pt-br Quantas semanas a exibição múltipla deve mostrar? +how much entries to skip calendar pt-br Como entradas muito para pular? +html link to the current record calendar pt-br Link HTML para o registro atual ical calendar pt-br iCal ical / rfc2445 calendar pt-br iCal / rfc2445 ical export calendar pt-br exportação iCal @@ -177,21 +241,31 @@ ical file calendar pt-br arquivo iCal ical import calendar pt-br importação iCal ical successful imported calendar pt-br iCal importado com sucesso if checked holidays falling on a weekend, are taken on the monday after. calendar pt-br Se os feriados coincidirem com o fim de semana, serão transferidos para a próxima segunda-feira. +if start day differs calendar pt-br Se data de início difere if you dont set a password here, the information is available to everyone, who knows the url!!! calendar pt-br Se você não configurar uma senha aqui a informação ficará disponível para qualquer um que souber a URL! ignore conflict calendar pt-br Ignorar conflito import calendar pt-br Importar import csv-file common pt-br Importar arquivo-CSV imports events into your calendar from a csv file. csv means 'comma seperated values'. however in the options tab you can also choose other seperators. calendar pt-br Importa eventos em sua Agenda de um arquivo CSV. CSV significa 'Comma Separated Values' ou 'Valores Separados por Vírgulas'. Entretanto na Aba de opções você pode escolher outros separadores. +initially year aligned calendar pt-br Inicialmente ano alinhado +insert calendar pt-br Inserir insert in document calendar pt-br Inserir em documento interval calendar pt-br Intervalo invalid email-address "%1" for user %2 calendar pt-br E-mail %1 inválido para o usuário %2 +invitations calendar pt-br Convites +invite calendar pt-br Convidar +it can not read timezones from sqlite database %1! calendar pt-br Ele não pode ler fusos horários a partir de banco de dados SQLite% 1! +keep exceptions calendar pt-br Mantenha exceções +keep the series unchanged. calendar pt-br Manter a série inalterada. last calendar pt-br Último last changed calendar pt-br Última alteração lastname of person to notify calendar pt-br Sobrenome da pessoa a ser notificada length of the time interval calendar pt-br Duração do tempo de intervalo link to view the event calendar pt-br Link para visualizar o evento links calendar pt-br Links +links and attached files calendar pt-br Links e arquivos anexados links, attachments calendar pt-br Links, Anexos +list of files linked to the current record calendar pt-br Lista de arquivos vinculados ao registro atual listview calendar pt-br Visão em lista location calendar pt-br Localização location to autoload from admin pt-br Local de onde carregar automaticamente @@ -199,8 +273,13 @@ location, start- and endtimes, ... calendar pt-br Local, Horários de início e mail all participants calendar pt-br Enviar e-mail para todos os participantes make freebusy information available to not loged in persons? calendar pt-br Mostrar informação de disponibilidade para pessoas não logadas? manage mapping calendar pt-br Gerenciar mapeamento +maximum available quantity of %1 exceeded! calendar pt-br A quantidade máxima disponível de 1% excedido! +meeting request calendar pt-br Pedido de reunião +meetingrequest to all participants calendar pt-br Meetingrequest a todos os participantes +merge document... calendar pt-br Mesclar documento ... minutes calendar pt-br minutos modified calendar pt-br Modificado +modifier calendar pt-br Modifier mon calendar pt-br Seg month calendar pt-br Mês monthly calendar pt-br Mensalmente @@ -209,24 +288,38 @@ monthly (by day) calendar pt-br mensalmente (por dia) monthview calendar pt-br Visão mensal multiple week view calendar pt-br Exibição semanal múltipla name of current user, all other contact fields are valid too calendar pt-br Nome do usuário atual, todos outros campos são válidos também +needs action calendar pt-br Necessidades ação new calendar pt-br Novo new search with the above parameters calendar pt-br nova pesquisa com os parâmetros acima +no automatic purging admin pt-br Sem purga automática no events found calendar pt-br Nenhum evento encontrado no filter calendar pt-br Sem filtro no matches found calendar pt-br Nenhum registro encontrado +no meeting requests calendar pt-br Não há pedidos de reunião +no owner selected calendar pt-br Nenhum proprietário selecionado. +no preview for ical calendar pt-br Pré-visualização para iCal +no recurrence calendar pt-br Sem retorno no response calendar pt-br Sem resposta +no rights to export more than %1 entries! calendar pt-br Nenhum direito a exportar mais de 1% entradas! non blocking calendar pt-br Posse compartilhada not calendar pt-br não +not rejected calendar pt-br Não rejeitado +nothing to update, version is already %1. calendar pt-br Nada de atualização, versão já é% 1. notification messages for added events calendar pt-br Mensagem para notificação de eventos adicionados notification messages for canceled events calendar pt-br Mensagem para notificação de eventos cancelados notification messages for disinvited participants calendar pt-br Mensagem para notificação de participantes desconvidados notification messages for modified events calendar pt-br Mensagem para notificação de eventos modificados notification messages for your alarms calendar pt-br Mensagem para notificação de seus alarmes notification messages for your responses calendar pt-br Mensagem para notificação de suas respostas +notification settings calendar pt-br Configurações de notificação +notify non-egroupware users about event updates calendar pt-br Notifique os usuários não eGroupWare sobre atualizações de eventos number of records to read (%1) calendar pt-br Número de registros a serem lidos (%1) +number of weeks to show calendar pt-br Número de semanas para mostrar observance rule calendar pt-br Regra de observância occurence calendar pt-br Ocorrência +old fixed definition calendar pt-br Definição fixa Velho old startdate calendar pt-br Data de Início anterior +olddate calendar pt-br Data original on %1 %2 %3 your meeting request for %4 calendar pt-br Em %1%2%3 sua requisição de compromisso para %4 on all modification, but responses calendar pt-br em todas as modificações, menos respostas on any time change too calendar pt-br em qualquer alteração de horário também diff --git a/etemplate/lang/egw_pt-br.lang b/etemplate/lang/egw_pt-br.lang index 75cf082d19..753fb8c6ab 100644 --- a/etemplate/lang/egw_pt-br.lang +++ b/etemplate/lang/egw_pt-br.lang @@ -99,7 +99,6 @@ custom fields etemplate pt-br Campos personalizados custom javascript for onchange etemplate pt-br Javascript personalizado para OnChange cut etemplate pt-br Recortar date+time etemplate pt-br Data+Horário -datum etemplate pt-br Referência day etemplate pt-br Dia days etemplate pt-br Dias db ensures that every row has a unique value in that column etemplate pt-br O Bando de Dados assegura que cada linha tenha um valor original nessa coluna From c381aef5e487e97eb62aac46b553f14b2367fc2f Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 10 Jul 2014 10:30:37 +0000 Subject: [PATCH 02/67] Refresh admin nm after group edit/delete --- admin/js/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin/js/app.js b/admin/js/app.js index e2f5d938f2..7e4aca64c8 100644 --- a/admin/js/app.js +++ b/admin/js/app.js @@ -156,14 +156,17 @@ app.classes.admin = AppJS.extend( if (_id < 0) { var tree = this.et2.getWidgetById('tree'); + var nm = this.et2.getWidgetById('nm'); switch(_type) { case 'delete': tree.deleteItem('/groups/'+_id, false); + if (nm) nm.applyFilters(); return false; // --> no regular refresh default: // add, update, edit, null tree.refreshItem('/groups'); + if (nm) nm.applyFilters(); return false; // --> no regular refresh } } From 2871228a0d4b7134d45a35525fac265fde9e9810 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 10 Jul 2014 16:00:52 +0000 Subject: [PATCH 03/67] Changing group in admin needs to refresh nm group filter too --- admin/js/app.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/admin/js/app.js b/admin/js/app.js index 7e4aca64c8..6cd3bf7b9a 100644 --- a/admin/js/app.js +++ b/admin/js/app.js @@ -161,14 +161,22 @@ app.classes.admin = AppJS.extend( { case 'delete': tree.deleteItem('/groups/'+_id, false); - if (nm) nm.applyFilters(); - return false; // --> no regular refresh + if (nm) nm.getInstanceManager().submit(); + break; default: // add, update, edit, null - tree.refreshItem('/groups'); - if (nm) nm.applyFilters(); - return false; // --> no regular refresh + if (nm) + { + var activeFilters = nm.activeFilters; + nm.getInstanceManager().submit(); + var nm = this.et2.getWidgetById('nm'); + nm.applyFilters(activeFilters); + } + } + var refreshTree = this.et2.getWidgetById('tree'); + if (refreshTree) refreshTree.refreshItem('/groups'); + return false; // --> no regular refresh } // not a user or group, eg. categories else if (!_id) From 49789bcf09bd023a4782b5c73a9e714bee3226e4 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 11 Jul 2014 09:47:43 +0000 Subject: [PATCH 04/67] Fix Gloabl categories owner_popup actions --- admin/inc/class.admin_categories.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/admin/inc/class.admin_categories.inc.php b/admin/inc/class.admin_categories.inc.php index 1209ceaaeb..1ac2b7daf1 100644 --- a/admin/inc/class.admin_categories.inc.php +++ b/admin/inc/class.admin_categories.inc.php @@ -491,6 +491,10 @@ class admin_categories if(in_array($content['nm']['action'], array('owner'))) { $action = $content['nm']['action']; + if ($content[$action.'_popup']) + { + $content = array_merge($content,$content[$action.'_popup']); + } $content['nm']['action'] .= '_' . key($content[$action . '_action']); if(is_array($content[$action])) From a0bf45da9320bc29bdd27f8f00853398866b7afa Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 11 Jul 2014 10:38:36 +0000 Subject: [PATCH 05/67] Use getAttribute to get the data-group value to use it for toolbar sorting.\n\r -Fix group is undefined error opening mail in IE10 --- etemplate/js/et2_widget_toolbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_toolbar.js b/etemplate/js/et2_widget_toolbar.js index d4c782fc10..41ac30da68 100644 --- a/etemplate/js/et2_widget_toolbar.js +++ b/etemplate/js/et2_widget_toolbar.js @@ -266,7 +266,7 @@ var et2_toolbar = et2_DOMWidget.extend([et2_IInput], // ************** Drag and Drop feature for toolbar ***** this.actionlist.find('span').sort( function (lg,g){ - return +lg.dataset.group - +g.dataset.group; + return +lg.getAttribute('data-group') - +g.getAttribute('data-group'); }).appendTo(this.actionlist); this.actionlist.appendTo(this.div); From 772ebe6a41e408965937bd55208a68a5e8dcd5bb Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 11 Jul 2014 11:34:11 +0000 Subject: [PATCH 06/67] improve (failsafe for non matching vartype personal (array instead of expected string)) imap_rfc822_write_address own fallback function --- phpgwapi/inc/common_functions.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpgwapi/inc/common_functions.inc.php b/phpgwapi/inc/common_functions.inc.php index f1e9202e08..d703a46316 100755 --- a/phpgwapi/inc/common_functions.inc.php +++ b/phpgwapi/inc/common_functions.inc.php @@ -150,6 +150,12 @@ if (!function_exists('imap_rfc822_write_address')) */ function imap_rfc822_write_address($mailbox, $host, $personal) { + if (is_array($personal)) { + foreach ($personal as $e) { + $p .= ($p?' ':'').$e; + } + $personal = $p; + } //if (!preg_match('/^[!#$%&\'*+/0-9=?A-Z^_`a-z{|}~-]+$/u', $personal)) // that's how I read the rfc(2)822 if ($personal && !preg_match('/^[0-9A-Z -]*$/iu', $personal)) // but quoting is never wrong, so quote more then necessary { From a0d6257d1e3706aff51c0ac64caea9e32f45b1fe Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 11 Jul 2014 13:49:27 +0000 Subject: [PATCH 07/67] handle message/rfc822 attachments as display when opened from drafted message; properly restore message/rfc822 attachments stored with .eml files --- mail/inc/class.mail_ui.inc.php | 17 +++++++++-------- mail/js/app.js | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 6944229939..be17fe8b31 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -455,10 +455,10 @@ class mail_ui //$content[self::$nm_index]['path'] = self::get_home_dir(); } } - else if ($content['mailPreview']['mailPreviewHeadersAttachments']['previewAttachmentArea'][0]['save_zip']) - { - $this->download_zip(current($content[self::$nm_index]['selected'])); - } +// else if ($content['mailPreview']['mailPreviewHeadersAttachments']['previewAttachmentArea'][0]['save_zip']) +// { +// $this->download_zip(current($content[self::$nm_index]['selected'])); +// } //$content[self::$nm_index]['default_cols'] = 'status,attachments,subject,'.($toSchema?'toaddress':'fromaddress').',date,size'; // I columns to use if there's no user or default pref (! as first char uses all but the named columns), default all columns $content[self::$nm_index]['default_cols'] = 'status,attachments,subject,address,date,size'; // I columns to use if there's no user or default pref (! as first char uses all but the named columns), default all columns $content[self::$nm_index]['csv_fields'] = false; @@ -2100,10 +2100,10 @@ class mail_ui $rowID = $_requesteddata['id']; //unset($_REQUEST); } - if($_requesteddata['mail_displayattachments'][0]['save_zip']) - { - $this->download_zip($_requesteddata['mail_id']); - } +// if($_requesteddata['mail_displayattachments'][0]['save_zip']) +// { +// $this->download_zip($_requesteddata['mail_id']); +// } $preventRedirect=false; if(isset($_GET['id'])) $rowID = $_GET['id']; if(isset($_GET['part'])) $partID = $_GET['part']; @@ -2279,6 +2279,7 @@ class mail_ui $linkData = array ( 'menuaction' => 'mail.mail_ui.displayMessage', + //'mode' => 'display', //message/rfc822 attachments should be opened in display mode 'id' => $rowID, 'part' => $value['partID'], 'is_winmail' => $value['is_winmail'] diff --git a/mail/js/app.js b/mail/js/app.js index 7c34375633..837047c6fc 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -2012,6 +2012,7 @@ app.classes.mail = AppJS.extend( { case 'MESSAGE/RFC822': url += 'menuaction=mail.mail_ui.displayMessage'; // todo compose for Draft folder + url += '&mode=display';//message/rfc822 attachments should be opened in display mode url += '&id='+mailid; url += '&part='+attgrid.partID; url += '&is_winmail='+attgrid.winmailFlag; From 3e56f38995c6695c083f423f631e10259e2c4155 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 11 Jul 2014 15:52:43 +0000 Subject: [PATCH 08/67] Try to get attribute with getAttribute method, IE does not support element dataset --- etemplate/js/et2_extension_customfields.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etemplate/js/et2_extension_customfields.js b/etemplate/js/et2_extension_customfields.js index 84638af2b2..bf05e29cc1 100644 --- a/etemplate/js/et2_extension_customfields.js +++ b/etemplate/js/et2_extension_customfields.js @@ -583,7 +583,7 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput for(var i = 0; i < _nodes.length; i++) { // toggle() needs a boolean to do what we want - var key = _nodes[i].dataset.field; + var key = _nodes[i].getAttribute('data-field'); $j(_nodes[i]).toggle(_values.fields[key] && _values.value[this.prefix + key]?true:false); } } From 8f0dba15fe4d89daef2802a4b7d7b33c9c44b0f1 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 11 Jul 2014 16:07:02 +0000 Subject: [PATCH 09/67] No need to use Microsoft.XMLDOM for IE anymore, since IE 7+ supports XMLHttpRequest object --- etemplate/js/et2_core_xml.js | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/etemplate/js/et2_core_xml.js b/etemplate/js/et2_core_xml.js index bf6459eaca..5995a34857 100644 --- a/etemplate/js/et2_core_xml.js +++ b/etemplate/js/et2_core_xml.js @@ -24,36 +24,7 @@ function et2_loadXMLFromURL(_url, _callback, _context) _context = null; } - // Use the XMLDOM object on IE - if (window.ActiveXObject) - { - var xmldoc = new ActiveXObject("Microsoft.XMLDOM"); - - // Set the callback function - xmldoc.onreadystatechange = function() { - if (xmldoc && xmldoc.readyState == 4) - { - // Find the root node - the root node is the node which is not - // the "xml", not a text node and not a comment node - those nodes - // are marked with an "#" - for (var i = 0; i < xmldoc.childNodes.length; i++) - { - var nodeName = xmldoc.childNodes[i].nodeName; - if (nodeName != "xml" && nodeName.charAt(0) != "#") - { - // Call the callback function and pass the current node - _callback.call(_context, xmldoc.childNodes[i]); - return; - } - } - - throw("Could not find XML root node."); - } - } - - xmldoc.load(_url); - } - else if (window.XMLHttpRequest) + if (window.XMLHttpRequest) { // Otherwise make an XMLHttpRequest. Tested with Firefox 3.6, Chrome, Opera var xmlhttp = new XMLHttpRequest(); From ef9409294c4cb72c96b2168e1ad5c157d77743eb Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 11 Jul 2014 16:49:45 +0000 Subject: [PATCH 10/67] Try to use xmlDoc.responseText as xmlDoc.response might not be available in IE --- etemplate/js/et2_widget_tree.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_widget_tree.js b/etemplate/js/et2_widget_tree.js index f48cea78d0..ff039356c9 100644 --- a/etemplate/js/et2_widget_tree.js +++ b/etemplate/js/et2_widget_tree.js @@ -193,7 +193,9 @@ var et2_tree = et2_inputWidget.extend( widget.setImages.apply(widget, widget.options.std_images.split(',')); } // Add in the callback so we can keep the two in sync - widget.input.AJAX_callback = function() { widget._dhtmlxtree_json_callback(JSON.parse(this.response), widget.input.lastLoadedXMLId);}; + widget.input.AJAX_callback = function(dxmlObject) { + widget._dhtmlxtree_json_callback(JSON.parse(dxmlObject.xmlDoc.responseText), widget.input.lastLoadedXMLId); + }; if (widget.options.autoloading) { @@ -538,7 +540,7 @@ var et2_tree = et2_inputWidget.extend( else { this.input.loadJSON(this.egw().link(this.autoloading_url, {id: _id}), - function() { self._dhtmlxtree_json_callback(JSON.parse(this.response), _id);} + function(dxmlObject) {self._dhtmlxtree_json_callback(JSON.parse(dxmlObject.xmlDoc.responseText), _id);} ); } }, From 2dd0625ebe064388e62f6100db6327409f7ea194 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 11 Jul 2014 17:35:46 +0000 Subject: [PATCH 11/67] * Backup: backup could contain rows multiple times (which caused restore to fail) --- phpgwapi/inc/class.db_backup.inc.php | 38 ++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/phpgwapi/inc/class.db_backup.inc.php b/phpgwapi/inc/class.db_backup.inc.php index 900bc0ffb3..c33fded96d 100644 --- a/phpgwapi/inc/class.db_backup.inc.php +++ b/phpgwapi/inc/class.db_backup.inc.php @@ -7,7 +7,7 @@ * @package api * @subpackage db * @author Ralf Becker - * @copyright (c) 2003-12 by Ralf Becker + * @copyright (c) 2003-14 by Ralf Becker * @version $Id$ */ @@ -79,6 +79,12 @@ class db_backup * @var boolean */ var $backup_files = false ; + /** + * Reference to schema_proc's egw_db object + * + * @var egw_db + */ + var $db; /** * Constructor @@ -278,7 +284,7 @@ class db_backup /* Sort the files by ctime. */ krsort($files); $count = 0; - foreach($files as $ctime => $file) + foreach($files as $file) { if ($count >= $this->backup_mincount)// { @@ -411,6 +417,7 @@ class db_backup } $table = False; $n = 0; + $rows = array(); while(!feof($f)) { $line = trim(fgets($f)); ++$n; @@ -620,7 +627,6 @@ class db_backup if($type == 'zip') { fclose($f); - $f = $save_f; unlink($name); rmdir($dir.'/database_backup'); } @@ -723,7 +729,7 @@ class db_backup $str_pending = False; $n = 0; - foreach($fields as $i => $field) + foreach($fields as $field) { if ($str_pending !== False) { @@ -839,12 +845,24 @@ class db_backup { if (in_array($table,$this->exclude_tables)) continue; // dont backup - $total = 0; + // do we have a primary key? + // --> use it to order and limit rows, to kope with rows being added during backup + // otherwise new rows can cause rows being backed up twice and + // backups don't restore because of doublicate keys + $pk = $schema['pk'] && count($schema['pk']) == 1 ? $schema['pk'][0] : null; + + $total = $max = 0; do { $num_rows = 0; - // querying only chunks for 100 rows, to not run into memory limit on huge tables - foreach($this->db->select($table, '*', false, __LINE__, __FILE__, $total, '', false, self::ROW_CHUNK) as $row) + // querying only chunks for 10000 rows, to not run into memory limit on huge tables + foreach($this->db->select($table, '*', + empty($pk) ? false : $pk.' > '.$max, // limit by maximum primary key already received + __LINE__, __FILE__, + empty($pk) ? $total : 0, // if no primary limit by number of received rows + empty($pk) ? '' : 'ORDER BY '.$pk.' ASC', // order by primary key + false, self::ROW_CHUNK) as $row) { + if (!empty($pk)) $max = $row[$pk]; if ($total === 0) fwrite($f,"\ntable: $table\n".implode(',',array_keys($row))."\n"); array_walk($row,array('db_backup','escape_data'),$schema['fd']); @@ -870,14 +888,14 @@ class db_backup //echo $name.'
'; $zip->addFile($name, 'database_backup/'.basename($name)); $count = 1; - foreach($file_list as $num => $file) + foreach($file_list as $file) { //echo substr($file,strlen($dir)+1).'
'; //echo $file.'
'; $zip->addFile($file,substr($file,strlen($dir)+1));//,substr($file); if(($count++) == 100) { // the file descriptor limit $zip->close(); - if($zip = new ZipArchive()) { + if(($zip = new ZipArchive())) { $zip->open($filename); $count =0; } @@ -1009,7 +1027,7 @@ class db_backup } else { - if (!$only_vals && $key === 'nullable') + if ($key === 'nullable') { $def .= $val ? 'True' : 'False'; } From 6b0ed9111f1235dee6aed7f950eecb60c4f8a50c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 12 Jul 2014 08:51:31 +0000 Subject: [PATCH 12/67] * API: fixed broken configuration, causing eg. ActiveDirectory or LDAP authentication to fail (you need to run Setup >> Clear cache!) all config vars with names starting with an "a" were returning false instead there correct value --- phpgwapi/inc/class.config.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.config.inc.php b/phpgwapi/inc/class.config.inc.php index a838a8db55..b90ca0efde 100755 --- a/phpgwapi/inc/class.config.inc.php +++ b/phpgwapi/inc/class.config.inc.php @@ -309,7 +309,7 @@ class config return json_decode($str, true); } // handling of not serialized strings - if ($str[0] != 'a' && $str[1] != ':') + if ($str[0] != 'a' || $str[1] != ':') { return $str; } From 930b880347644f0398b1b7cdbdf81554aa760027 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 12 Jul 2014 10:11:53 +0000 Subject: [PATCH 13/67] fixed fatal error "class errorlog not found" --- logout.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/logout.php b/logout.php index f0fdedc79d..6c45d62d12 100755 --- a/logout.php +++ b/logout.php @@ -36,17 +36,7 @@ if($verified) $GLOBALS['egw']->hooks->process('logout'); $GLOBALS['egw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']); } -else -{ - if(is_object($GLOBALS['egw']->log)) - { - $GLOBALS['egw']->log->write(array( - 'text' => 'W-VerifySession, could not verify session during logout', - 'line' => __LINE__, - 'file' => __FILE__ - )); - } -} + $GLOBALS['egw']->session->egw_setcookie('eGW_remember','',0,'/'); $GLOBALS['egw']->session->egw_setcookie('sessionid'); $GLOBALS['egw']->session->egw_setcookie('kp3'); From ff1934a51ff5c820a4e2cfbc32943f1729923e65 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 13 Jul 2014 08:55:48 +0000 Subject: [PATCH 14/67] fixed typo --- phpgwapi/lang/egw_de.lang | 2 +- phpgwapi/lang/egw_en.lang | 2 +- phpgwapi/lang/egw_fi.lang | 2 +- phpgwapi/lang/egw_fr.lang | 2 +- phpgwapi/lang/egw_it.lang | 2 +- phpgwapi/lang/egw_ru.lang | 2 +- phpgwapi/lang/egw_sk.lang | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpgwapi/lang/egw_de.lang b/phpgwapi/lang/egw_de.lang index f623a9c4bf..5c20ff89bb 100644 --- a/phpgwapi/lang/egw_de.lang +++ b/phpgwapi/lang/egw_de.lang @@ -560,7 +560,7 @@ oman common de OMAN on *nix systems please type: %1 common de Auf *nix Systemen bitte %1 eingeben on mouse over common de On Maus Over only private common de nur private -only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likly not be suppored! groupdav de Wird nur von einigen vollständigen Clients (z.B. von Apple) unterstützt. Wenn Sie eine URL eingeben müssen, wird es vermutlich nicht unterstützt! +only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likely not be supported! groupdav de Wird nur von einigen vollständigen Clients (z.B. von Apple) unterstützt. Wenn Sie eine URL eingeben müssen, wird es vermutlich nicht unterstützt! only yours common de nur eigene oops! you caught us in the middle of system maintainance. common de Hoppla! Sie haben uns in der Mitte einer Systemwartung erwischt. open common de Öffnen diff --git a/phpgwapi/lang/egw_en.lang b/phpgwapi/lang/egw_en.lang index 31cd9debaf..5f7b91d2d7 100644 --- a/phpgwapi/lang/egw_en.lang +++ b/phpgwapi/lang/egw_en.lang @@ -560,7 +560,7 @@ oman common en OMAN on *nix systems please type: %1 common en On *nix systems please type: %1 on mouse over common en On mouse over only private common en Only private -only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likly not be suppored! groupdav en Only supported by a few fully conformant clients (eg. from Apple). If you have to enter a URL, it will most likly not be suppored! +only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likely not be supported! groupdav en Only supported by a few fully conformant clients (eg. from Apple). If you have to enter a URL, it will most likely not be supported! only yours common en Only yours oops! you caught us in the middle of system maintainance. common en Oops! You caught us in the middle of system maintenance. open common en Open diff --git a/phpgwapi/lang/egw_fi.lang b/phpgwapi/lang/egw_fi.lang index 955a63e18f..bf34e656df 100644 --- a/phpgwapi/lang/egw_fi.lang +++ b/phpgwapi/lang/egw_fi.lang @@ -519,7 +519,7 @@ oman common fi OMAN on *nix systems please type: %1 common fi *nix-järjestelmissä voit kirjoittaa: %1 on mouse over common fi Hiirellä osoittamalla only private common fi Vain yksityiset -only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likly not be suppored! groupdav fi Toiminto tuettu vain muutamissa laitteissa. Jos URL täytyy syöttää, toiminto todennäköisesti ei ole tuettu. +only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likely not be supported! groupdav fi Toiminto tuettu vain muutamissa laitteissa. Jos URL täytyy syöttää, toiminto todennäköisesti ei ole tuettu. only yours common fi Vain omat oops! you caught us in the middle of system maintainance. common fi Hups... Huoltokatko meneillään! open common fi Avaa diff --git a/phpgwapi/lang/egw_fr.lang b/phpgwapi/lang/egw_fr.lang index dd8cefa426..66397b3df3 100644 --- a/phpgwapi/lang/egw_fr.lang +++ b/phpgwapi/lang/egw_fr.lang @@ -538,7 +538,7 @@ oman common fr OMAN on *nix systems please type: %1 common fr Sur les systèmes *nix SVP tapez: %1 on mouse over common fr Sur le relâchement du clic de la souris only private common fr seulement privés -only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likly not be suppored! groupdav fr Seulement supporté par les clients pleinement respectueux de la norme (ie. d'Apple). Si vous devez entrer une URL, cela ne sera probablement pas supporté. +only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likely not be supported! groupdav fr Seulement supporté par les clients pleinement respectueux de la norme (ie. d'Apple). Si vous devez entrer une URL, cela ne sera probablement pas supporté. only yours common fr Seulement les vôtres oops! you caught us in the middle of system maintainance. common fr Oups ! Vous êtes arrivé en pleine maintenance système. open common fr Ouvrir diff --git a/phpgwapi/lang/egw_it.lang b/phpgwapi/lang/egw_it.lang index 6ed3a4928f..975fe697f0 100644 --- a/phpgwapi/lang/egw_it.lang +++ b/phpgwapi/lang/egw_it.lang @@ -511,7 +511,7 @@ oman common it OMAN on *nix systems please type: %1 common it Sui sistemi *nix prego digita: %1 on mouse over common it Al passaggio del mouse only private common it solo privati -only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likly not be suppored! groupdav it Supportato solo da alcuni client conformi (p.es. Apple). Se devi inserire un URL, con ogni probabilità non sarà supportato! +only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likely not be supported! groupdav it Supportato solo da alcuni client conformi (p.es. Apple). Se devi inserire un URL, con ogni probabilità non sarà supportato! only yours common it solo personali oops! you caught us in the middle of system maintainance. common it Ops! Ci avete presi mentre stiamo facendo lavori di manutenzione! open common it Apri diff --git a/phpgwapi/lang/egw_ru.lang b/phpgwapi/lang/egw_ru.lang index 72c9d14791..17016248c7 100644 --- a/phpgwapi/lang/egw_ru.lang +++ b/phpgwapi/lang/egw_ru.lang @@ -536,7 +536,7 @@ oman common ru Оман on *nix systems please type: %1 common ru В *NIX-системах пожалуйста наберите: %1 on mouse over common ru При наведенном курсоре only private common ru только личные -only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likly not be suppored! groupdav ru полностью поддерживается только несколько совместимых клиентов(например от Apple).если вы введёте адрес,то скорей всего не поддерживается! +only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likely not be supported! groupdav ru полностью поддерживается только несколько совместимых клиентов(например от Apple).если вы введёте адрес,то скорей всего не поддерживается! only yours common ru только Ваши oops! you caught us in the middle of system maintainance. common ru Опс! Вы застукали нас прямо во время обслуживания системы. open common ru Открыть diff --git a/phpgwapi/lang/egw_sk.lang b/phpgwapi/lang/egw_sk.lang index f281b8a419..a8f47abdb1 100644 --- a/phpgwapi/lang/egw_sk.lang +++ b/phpgwapi/lang/egw_sk.lang @@ -514,7 +514,7 @@ oman common sk OMÁN on *nix systems please type: %1 common sk Na *NIX systémoch prosím napíšte: %1 on mouse over common sk Pri namierení myši only private common sk iba súkromné -only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likly not be suppored! groupdav sk Podporované iba niektorými plne kompatibilnými klientmi (napr. od Apple). Ak musíte zadať URL, pravdepodobne to nebude podporované! +only supported by a few fully conformant clients (eg. from apple). if you have to enter a url, it will most likely not be supported! groupdav sk Podporované iba niektorými plne kompatibilnými klientmi (napr. od Apple). Ak musíte zadať URL, pravdepodobne to nebude podporované! only yours common sk iba vaše oops! you caught us in the middle of system maintainance. common sk Ajajaj! Zastihli ste nás práve počas údržby systému. open common sk Otvoriť From 8c6ac14093df554f5eb1b3c7063278665d12ce03 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 13 Jul 2014 09:01:09 +0000 Subject: [PATCH 15/67] fixed typo --- addressbook/inc/class.addressbook_groupdav.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_groupdav.inc.php b/addressbook/inc/class.addressbook_groupdav.inc.php index 954ad76a4e..61a052b5bc 100644 --- a/addressbook/inc/class.addressbook_groupdav.inc.php +++ b/addressbook/inc/class.addressbook_groupdav.inc.php @@ -1110,7 +1110,7 @@ class addressbook_groupdav extends groupdav_handler 'type' => 'multiselect', 'label' => 'Addressbooks to sync in addition to personal addressbook', 'name' => 'addressbook-home-set', - 'help' => lang('Only supported by a few fully conformant clients (eg. from Apple). If you have to enter a URL, it will most likly not be suppored!'). + 'help' => lang('Only supported by a few fully conformant clients (eg. from Apple). If you have to enter a URL, it will most likely not be supported!'). '
'.lang('They will be sub-folders in users home (%1 attribute).','CardDAV "addressbook-home-set"'). '
'.lang('Select "%1", if your client does not support multiple addressbooks.',lang('Sync all selected into one')). '
'.lang('Select "%1", if your client support groups, eg. OS X or iOS addressbook.',lang('Distribution lists as groups')), From f011a6c3d1c9257329c6d5e7916dff93c20e4dee Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 13 Jul 2014 09:14:58 +0000 Subject: [PATCH 16/67] fixed broken regular expression for multiple comma-separated values (dash in character class has to be last character!) --- etemplate/js/et2_widget_selectAccount.js | 6 +++--- etemplate/js/et2_widget_selectbox.js | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/etemplate/js/et2_widget_selectAccount.js b/etemplate/js/et2_widget_selectAccount.js index 8813d4b377..a44e883b86 100644 --- a/etemplate/js/et2_widget_selectAccount.js +++ b/etemplate/js/et2_widget_selectAccount.js @@ -291,7 +291,7 @@ var et2_selectAccount = et2_selectbox.extend( */ set_value: function(_value) { - if(typeof _value == "string" && this.options.multiple && _value.match(/^[,0-9A-Za-z/-_]+$/) !== null) + if(typeof _value == "string" && this.options.multiple && _value.match(this._is_multiple_regexp) !== null) { _value = _value.split(','); } @@ -312,7 +312,7 @@ var et2_selectAccount = et2_selectbox.extend( // Not having a value to look up causes an infinite loop if(!search[j]) continue; - + // Options are not indexed, so we must look for(var i = 0; !found && i < this.options.select_options.length; i++) { @@ -748,7 +748,7 @@ var et2_selectAccount = et2_selectbox.extend( .appendTo(option); this.egw().link_title('home-accounts', value, function(name) {this.text(name).removeClass("loading");}, label); }, - + /** * Overwritten attachToDOM metod to modify attachToDOM */ diff --git a/etemplate/js/et2_widget_selectbox.js b/etemplate/js/et2_widget_selectbox.js index da86a058f7..cce0683055 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -423,10 +423,20 @@ var et2_selectbox = et2_inputWidget.extend( this.set_select_options(this.options.select_options); }, + /** + * Regular expression, to check string-value contains multiple comma-separated values + */ + _is_multiple_regexp: /^[,0-9A-Za-z/_-]+$/, + + /** + * Set value + * + * @param _value + */ set_value: function(_value) { if (typeof _value == "number") _value = ""+_value; // convert to string for consitent matching - if(typeof _value == "string" && this.options.multiple && _value.match(/^[,0-9A-Za-z/-_]+$/) !== null) + if(typeof _value == "string" && this.options.multiple && _value.match(this._is_multiple_regexp) !== null) { _value = _value.split(','); } @@ -915,7 +925,7 @@ var et2_selectbox_ro = et2_selectbox.extend([et2_IDetachedDOM], if(typeof _value == "string") { - _value = _value.match(/^[,0-9A-Za-z]+$/) !== null ? _value.split(',') : [_value]; + _value = _value.match(this._is_multiple_regexp) !== null ? _value.split(',') : [_value]; } this.span.empty(); From f11f9937acbd98b7366fc4c68e88004576e486ec Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 13 Jul 2014 09:38:55 +0000 Subject: [PATCH 17/67] make detection of serialized values more robust, to allow string like eg. "a:hello" --- phpgwapi/inc/class.config.inc.php | 7 ++++--- phpgwapi/inc/common_functions.inc.php | 14 ++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/phpgwapi/inc/class.config.inc.php b/phpgwapi/inc/class.config.inc.php index b90ca0efde..fc6adbed46 100755 --- a/phpgwapi/inc/class.config.inc.php +++ b/phpgwapi/inc/class.config.inc.php @@ -313,17 +313,18 @@ class config { return $str; } - // handling of old PHP serialized and addslashed prefs + // handling of old PHP serialized config values $data = php_safe_unserialize($str); if($data === false) { - // manually retrieve the string lengths of the serialized array if unserialize failed + // manually retrieve the string lengths of the serialized array if unserialize failed (iso / utf-8 conversation) $data = php_safe_unserialize(preg_replace_callback('!s:(\d+):"(.*?)";!s', function($matches) { return 's:'.mb_strlen($matches[2],'8bit').':"'.$matches[2].'";'; }, $str)); } - return $data; + // returning original string, if unserialize failed, eg. for "a:hello" + return $data === false ? $str : $data; } /** diff --git a/phpgwapi/inc/common_functions.inc.php b/phpgwapi/inc/common_functions.inc.php index d703a46316..08c68c1bfc 100755 --- a/phpgwapi/inc/common_functions.inc.php +++ b/phpgwapi/inc/common_functions.inc.php @@ -1549,7 +1549,7 @@ function php_safe_unserialize($str) preg_match('/(^|;|{)[OC]:\d+:"/', $str)) { error_log(__METHOD__."('$str') contains objects --> return false"); - return false; + return null; // null, not false, to not trigger behavior of returning string itself to app code } return unserialize($str); } @@ -1601,18 +1601,16 @@ if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE_ */ function json_php_unserialize($str, $allow_not_serialized=false) { - if ($str[0] == 'a' && $str[1] == ':' || $str === 'N;') + if (($str[0] == 'a' && $str[1] == ':' || $str === 'N;') && + ($arr = php_safe_unserialize($str)) !== false) { - return php_safe_unserialize($str); + return $arr; } - elseif (!$allow_not_serialized || $str[0] == '[' || $str[0] == '{') + if (!$allow_not_serialized || $str[0] == '[' || $str[0] == '{') { return json_decode($str, true); } - else - { - return $str; - } + return $str; } /** From 21bcc81b2182181f9626460ac63bd8deba340082 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 13 Jul 2014 10:27:46 +0000 Subject: [PATCH 18/67] * Preferences: non-admins were allowed to changed default, forced or group preferences --- preferences/inc/class.preferences_settings.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/preferences/inc/class.preferences_settings.inc.php b/preferences/inc/class.preferences_settings.inc.php index c62452b1c0..8bd2544066 100644 --- a/preferences/inc/class.preferences_settings.inc.php +++ b/preferences/inc/class.preferences_settings.inc.php @@ -68,7 +68,11 @@ class preferences_settings { case 'save': case 'apply': - // ToDo: save preferences + // check if user has rights to store preferences for $type and $account_id + if ($content['old_type'] !== 'user' && !$GLOBALS['egw_info']['user']['apps']['admin']) + { + throw new egw_exception_no_permission_admin; + } list($type,$account_id) = explode(':', $content['old_type']); // merge prefs of all tabs together again $prefs = array(); @@ -463,7 +467,7 @@ class preferences_settings 'default' => 'Default preferences', 'forced' => 'Forced preferences', ); - if ($GLOBALS['egw_info']['apps']['admin']) + if ($GLOBALS['egw_info']['user']['apps']['admin']) { $content['type'] = $type; if (($id = $GLOBALS['egw']->preferences->get_account_id()) != $GLOBALS['egw_info']['user']['account_id']) From 8a36e40b1094a611f5db7c9f707d2771f42aef6d Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 14 Jul 2014 09:59:02 +0000 Subject: [PATCH 19/67] Call applyFilters() function instead of setting directly, which skipped change detection. Fixes selection not cleared when applying a favorite. --- etemplate/js/et2_extension_nextmatch.js | 9 ++++++++- phpgwapi/js/jsapi/app_base.js | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index 4e1b9a0ba8..c4e2daac5c 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -387,6 +387,14 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], * @param _set filter(s) to set eg. { filter: '' } to reset filter in NM header */ applyFilters: function(_set) { + var changed = false; + + // Cleared explicitly + if(typeof _set != 'undefined' && jQuery.isEmptyObject(_set)) + { + changed = true; + this.activeFilters = {}; + } if(typeof this.activeFilters == "undefined") { this.activeFilters = {col_filter: {}}; @@ -396,7 +404,6 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], this.activeFilters.col_filter = {}; } - var changed = false; if (typeof _set == 'object') { for(var s in _set) diff --git a/phpgwapi/js/jsapi/app_base.js b/phpgwapi/js/jsapi/app_base.js index 6a95167240..1ed8cf87dd 100644 --- a/phpgwapi/js/jsapi/app_base.js +++ b/phpgwapi/js/jsapi/app_base.js @@ -285,8 +285,7 @@ var AppJS = Class.extend( if(state.state && state.state.search) state.state.search = unescape(state.state.search); // Apply - _widget.activeFilters = state.state || state.filter || {}; - _widget.applyFilters(); + _widget.applyFilters(state.state || state.filter || {}); nextmatched = true; }, this, et2_nextmatch); if(nextmatched) return false; From c54e53d4054fd4a6d1950b8c653c9f3aa6aff9df Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 14 Jul 2014 10:02:47 +0000 Subject: [PATCH 20/67] fixed PHP Strict Standards: Declaration of etemplate_widget_*::set_attrs() should be compatible with etemplate_widget::set_attrs() --- .../inc/class.etemplate_widget_menupopup.inc.php | 7 ++++--- .../inc/class.etemplate_widget_nextmatch.inc.php | 16 ++++++++++++---- .../inc/class.etemplate_widget_textbox.inc.php | 7 ++++--- .../inc/class.etemplate_widget_tree.inc.php | 5 +++-- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/etemplate/inc/class.etemplate_widget_menupopup.inc.php b/etemplate/inc/class.etemplate_widget_menupopup.inc.php index ebb9e22087..e38712913d 100644 --- a/etemplate/inc/class.etemplate_widget_menupopup.inc.php +++ b/etemplate/inc/class.etemplate_widget_menupopup.inc.php @@ -48,12 +48,13 @@ class etemplate_widget_menupopup extends etemplate_widget * Reimplemented to parse our differnt attributes * * @param string|XMLReader $xml + * @param boolean $cloned=true true: object does NOT need to be cloned, false: to set attribute, set them in cloned object * @return etemplate_widget_template current object or clone, if any attribute was set * @todo Use legacy_attributes instead of leaving it to typeOptions method to parse them */ - public function set_attrs($xml) + public function set_attrs($xml, $cloned=true) { - parent::set_attrs($xml); + parent::set_attrs($xml, $cloned); // set attrs[multiple] from attrs[options], unset options only if it just contains number or rows if ($this->attrs['options'] > 1) @@ -94,7 +95,7 @@ class etemplate_widget_menupopup extends etemplate_widget switch ($widget_type) { - case 'select-account': + case 'select-account': // If in allowed options, skip account check to support app-specific options if(count($allowed) > 0 && in_array($val,$allowed)) continue; diff --git a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php index 9ac912398d..b217ab1a3d 100644 --- a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php +++ b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php @@ -175,7 +175,7 @@ class etemplate_widget_nextmatch extends etemplate_widget { $cat_app = $value['cat_app'] ? $value['cat_app'] : $GLOBALS['egw_info']['flags']['current_app']; $value['options-cat_id'] = array(); - + // Add 'All', if not already there if(!$value['options-cat_id'][''] && !($value['options-cat_id'][0] && $value['options-cat_id'][0]['value'] == '')) { @@ -369,7 +369,7 @@ class etemplate_widget_nextmatch extends etemplate_widget if ($knownUids) { // row_id not set for nextmatch --> just skip them, we can't identify the rows - if (!$row_id) + if (!$row_id) { foreach($knownUids as $uid) { @@ -1024,9 +1024,17 @@ class etemplate_widget_nextmatch_filterheader extends etemplate_widget_menupopup */ class etemplate_widget_nextmatch_accountfilter extends etemplate_widget_menupopup { - public function set_attrs($xml) + /** + * Parse and set extra attributes from xml in template object + * + * @param string|XMLReader $xml + * @param boolean $cloned=true true: object does NOT need to be cloned, false: to set attribute, set them in cloned object + * @return etemplate_widget_template current object or clone, if any attribute was set + */ + public function set_attrs($xml, $cloned=true) { - parent::set_attrs($xml); + parent::set_attrs($xml, $cloned); + $this->attrs['type'] = 'select-account'; } } diff --git a/etemplate/inc/class.etemplate_widget_textbox.inc.php b/etemplate/inc/class.etemplate_widget_textbox.inc.php index d3912d89b2..ff3fe70573 100644 --- a/etemplate/inc/class.etemplate_widget_textbox.inc.php +++ b/etemplate/inc/class.etemplate_widget_textbox.inc.php @@ -49,11 +49,12 @@ class etemplate_widget_textbox extends etemplate_widget * Reimplemented to handle legacy read-only by setting size < 0 * * @param string|XMLReader $xml - * @return etemplate_widget_textbox current object or clone, if any attribute was set + * @param boolean $cloned=true true: object does NOT need to be cloned, false: to set attribute, set them in cloned object + * @return etemplate_widget_template current object or clone, if any attribute was set */ - public function set_attrs($xml) + public function set_attrs($xml, $cloned=true) { - parent::set_attrs($xml); + parent::set_attrs($xml, $cloned); // Legacy handling only // A negative size triggered the HTML readonly attibute, but not etemplate readonly, diff --git a/etemplate/inc/class.etemplate_widget_tree.inc.php b/etemplate/inc/class.etemplate_widget_tree.inc.php index e65e3bcdbc..a962e7e008 100644 --- a/etemplate/inc/class.etemplate_widget_tree.inc.php +++ b/etemplate/inc/class.etemplate_widget_tree.inc.php @@ -51,12 +51,13 @@ class etemplate_widget_tree extends etemplate_widget * Reimplemented to parse our differnt attributes * * @param string|XMLReader $xml + * @param boolean $cloned=true true: object does NOT need to be cloned, false: to set attribute, set them in cloned object * @return etemplate_widget_template current object or clone, if any attribute was set */ - public function set_attrs($xml) + public function set_attrs($xml, $cloned=true) { $this->attrs['type'] = $xml->localName; - parent::set_attrs($xml); + parent::set_attrs($xml, $cloned); // set attrs[multiple] from attrs[options] if ($this->attrs['options'] > 1) From 025f31872feaf9559affab53ca2084c033dbd14e Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 14 Jul 2014 10:19:32 +0000 Subject: [PATCH 21/67] Fix delete confirmation dialog in Global categories edit popup --- admin/inc/class.admin_categories.inc.php | 4 ++-- admin/js/app.js | 22 +++++++++++++++++++ admin/templates/default/categories.edit.xet | 11 +++++----- .../class.preferences_categories_ui.inc.php | 3 ++- 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/admin/inc/class.admin_categories.inc.php b/admin/inc/class.admin_categories.inc.php index 1ac2b7daf1..e4bbb091b6 100644 --- a/admin/inc/class.admin_categories.inc.php +++ b/admin/inc/class.admin_categories.inc.php @@ -127,10 +127,10 @@ class admin_categories { $cats = new categories($content['owner'] ? $content['owner'] : categories::GLOBAL_ACCOUNT,$content['appname']); - if ($content['delete']['delete']) + if ($content['delete']['delete'] || $content['delete']['subs']) { $button = 'delete'; - $delete_subs = $content['delete']['subs']; + $delete_subs = $content['delete']['subs']?true:false; } else { diff --git a/admin/js/app.js b/admin/js/app.js index 6cd3bf7b9a..20f8bd392f 100644 --- a/admin/js/app.js +++ b/admin/js/app.js @@ -767,5 +767,27 @@ app.classes.admin = AppJS.extend( } return true; + }, + + /** + * Delete confirmation dialog + * + */ + delete_category: function () + { + var _buttons = [ + {"button_id": "delete[cancel]","text": 'Cancel', id: 'delete[cancel]', image: 'cancel', "default":true}, + {"button_id": "delete[delete]","text": 'Delete', id: 'delete[delete]', image: 'delete'}, + {"button_id": "delete[subs]","text": 'Delete including sub-enteries', id: 'delete[subs]', image: 'delete'}, + ]; + var self = this; + var delDialog_callBack = function (_buttons) + { + if (_buttons != "delete[cancel]") + { + self.et2.getInstanceManager().submit(_buttons); + } + }; + et2_dialog.show_dialog(delDialog_callBack,"Are you sure you want to delete this category ?","Delete",{},_buttons); } }); diff --git a/admin/templates/default/categories.edit.xet b/admin/templates/default/categories.edit.xet index fa2bd97914..e3f2147c51 100644 --- a/admin/templates/default/categories.edit.xet +++ b/admin/templates/default/categories.edit.xet @@ -17,14 +17,13 @@ - + - +