[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: bookmarks import.php,1.17,1.18 list.php,1.27,1.2
From: |
Michael Totschnig <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: bookmarks import.php,1.17,1.18 list.php,1.27,1.28 maillink.php,1.12,1.13 maintain.php,1.29,1.30 search.php,1.18,1.19 tree.php,1.27,1.28 view.php,1.20,1.21 |
Date: |
Tue, 25 Mar 2003 18:02:24 -0500 |
Update of /cvsroot/phpgroupware/bookmarks
In directory subversions:/tmp/cvs-serv3331
Modified Files:
import.php list.php maillink.php maintain.php search.php
tree.php view.php
Log Message:
syncing 0.9.16 and HEAD
Index: import.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/import.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** import.php 17 Nov 2001 02:51:36 -0000 1.17
--- import.php 25 Mar 2003 23:02:22 -0000 1.18
***************
*** 131,135 ****
if (empty($bkfile) || $bkfile == "none")
{
! $error_msg .= "<br>Netscape bookmark filename is
required!";
break;
}
--- 131,135 ----
if (empty($bkfile) || $bkfile == "none")
{
! $error_msg .= '<br>'.lang('Netscape bookmark filename
is required!');
break;
}
***************
*** 145,154 ****
$bookmarker->url_format_check = 0;
$bookmarker->url_responds_check = false;
while ($line = @fgets($fd, 2048))
{
// URLs are recognized by A HREF tags in the NS
file.
! if (eregi('<A HREF="([^"]*)[^>]*>(.*)</A>',
$line, $match))
! {
$url_parts = @parse_url($match[1]);
if ($url_parts[scheme] == 'http' ||
$url_parts[scheme] == 'https' || $url_parts[scheme] == 'ftp' ||
$url_parts[scheme] == 'news')
--- 145,160 ----
$bookmarker->url_format_check = 0;
$bookmarker->url_responds_check = false;
+
+ $utf8flag = False;
while ($line = @fgets($fd, 2048))
{
+ if ((strcmp('<META HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=UTF-8">', rtrim($line)) == 0) &&
function_exists('iconv'))
+ {
+ $utf8flag = True;
+ }
// URLs are recognized by A HREF tags in the NS
file.
! elseif (eregi('<A HREF="([^"]*)[^>]*>(.*)</A>',
$line, $match))
! {
$url_parts = @parse_url($match[1]);
if ($url_parts[scheme] == 'http' ||
$url_parts[scheme] == 'https' || $url_parts[scheme] == 'ftp' ||
$url_parts[scheme] == 'news')
***************
*** 181,185 ****
$values['category'] =
sprintf('%s|%s',$cid,$scid);
$values['url'] = $match[1];
! $values['name'] = $match[2];
$values['rating'] = 0;
--- 187,194 ----
$values['category'] =
sprintf('%s|%s',$cid,$scid);
$values['url'] = $match[1];
!
! //if iconv fails, fall back to
undecoded string
! $name_iconv = ($utf8flag ?
iconv('UTF-8','ISO-8859-1',$match[2]) : False);
! $values['name'] =
($name_iconv ? $name_iconv : $match[2]);
$values['rating'] = 0;
***************
*** 214,221 ****
$id = -1;
if ($folder_index == 0)
{
$cat_index ++;
! $cat_array[$cat_index] =
$match[1];
$id = $cat_index + $cat_start;
}
--- 223,234 ----
$id = -1;
+ //if iconv fails, fall back to
undecoded string
+ $folder_name_iconv = ($utf8flag ?
iconv('UTF-8','ISO-8859-1',$match[1]) : False);
+ $folder_name = ($folder_name_iconv ?
$folder_name_iconv : $match[1]);
+
if ($folder_index == 0)
{
$cat_index ++;
! $cat_array[$cat_index] =
$folder_name;
$id = $cat_index + $cat_start;
}
***************
*** 223,231 ****
{
$scat_index ++;
! $scat_array[$scat_index] =
$match[1];
$id = $scat_index + $scat_start;
}
$folder_stack[$folder_index] = $id;
! $folder_name_stack[$folder_index] =
$match[1];
}
elseif (eregi('</DL>', $line))
--- 236,244 ----
{
$scat_index ++;
! $scat_array[$scat_index] =
$folder_name;
$id = $scat_index + $scat_start;
}
$folder_stack[$folder_index] = $id;
! $folder_name_stack[$folder_index] =
$folder_name;
}
elseif (eregi('</DL>', $line))
***************
*** 239,247 ****
else
{
! $error_msg .= "<br>Unable to open temp file " . $bkfile
. " for import.";
}
unset($msg);
! $msg .= sprintf("<br>%s bookmarks imported from %s
successfully.", $inserts, $bkfile_name);
$error_msg = $all_errors;
// break;
--- 252,260 ----
else
{
! $error_msg .= '<br>'.lang('Unable to open temp file %1
for import.',$bkfile);
}
unset($msg);
! $msg .= '<br>'.lang("%1 bookmarks imported from %2
successfully.", $inserts, $bkfile_name);
$error_msg = $all_errors;
// break;
***************
*** 249,252 ****
--- 262,269 ----
$GLOBALS['phpgw']->template->set_var('FORM_ACTION',$GLOBALS['phpgw']->link('/bookmarks/import.php'));
+ $GLOBALS['phpgw']->template->set_var('lang_name',lang('Enter the name
of the Netscape bookmark file<br>that you want imported into bookmarker
below.'));
+ $GLOBALS['phpgw']->template->set_var('lang_file',lang('Netscape
Bookmark File'));
+ $GLOBALS['phpgw']->template->set_var('lang_import_button',lang('Import
Bookmarks'));
+ $GLOBALS['phpgw']->template->set_var('lang_note',lang('<b>Note:</b>
This currently works with netscape bookmarks only'));
$GLOBALS['phpgw']->common->phpgw_footer();
?>
Index: list.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/list.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** list.php 18 Nov 2001 15:46:24 -0000 1.27
--- list.php 25 Mar 2003 23:02:22 -0000 1.28
***************
*** 93,102 ****
if ($total_bookmarks >
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'])
{
! $total_matchs = lang('showing x - x of x',($start + 1),
($start +
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']),$total_bookmarks);
}
else
{
! $total_matchs = lang('showing x',$total_bookmarks);
}
$GLOBALS['phpgw']->template->set_var('showing',$total_matchs);
--- 93,102 ----
if ($total_bookmarks >
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'])
{
! $total_matchs = lang('showing %1 - %2 of %3',($start + 1),
($start +
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']),$total_bookmarks);
}
else
{
! $total_matchs = lang('showing %1',$total_bookmarks);
}
$GLOBALS['phpgw']->template->set_var('showing',$total_matchs);
Index: maillink.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/maillink.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** maillink.php 17 Nov 2001 02:51:36 -0000 1.12
--- maillink.php 25 Mar 2003 23:02:22 -0000 1.13
***************
*** 22,26 ****
$GLOBALS['phpgw']->bookmarks = createobject('bookmarks.bookmarks');
- $GLOBALS['phpgw']->send = createobject('phpgwapi.send');
$GLOBALS['phpgw']->template->set_file(array(
--- 22,25 ----
***************
*** 28,31 ****
--- 27,31 ----
'body' => 'maillink.body.tpl'
));
+
app_header(&$GLOBALS['phpgw']->template);
***************
*** 39,92 ****
// Check if there was a submission
! while (is_array($HTTP_POST_VARS) && list($key, $val) =
each($HTTP_POST_VARS))
{
! switch ($key)
! {
! // Send button clicked
! case 'bk_send':
! // Strip space and tab from anywhere in the To
field
! $to = $validate->strip_space($to);
!
! // Trim the subject
! $subject = trim($subject);
! // Do we have all necessary data?
! if (empty($to) || empty($subject) ||
empty($message))
! {
! $error_msg .= "<br>Please fill out
<B>To E-Mail Address</B>, <B>Subject</B>, and <B>Message</B>!";
! break;
! }
! // the To field may contain one or more email
addresses
! // separated by commas. Check each one for
proper format.
! $to_array = explode(",", $to);
! while (list($key, $val) = each($to_array))
! {
! // Is email address in the proper
format?
! if (!$validate->is_email($val))
! {
! $error_msg .= "<br>To address
$val invalid. Format must be <strong>address@hidden</strong> and domain must
exist!<br><small> $validate->ERROR </small>";
! break;
! }
! }
! if (isset ($error_msg))
{
break;
}
! // add additional headers to our email
! $addl_headers = sprintf("From: %s <%s>",
stripslashes($from_name), $from);
!
! $addl_headers =
sprintf('%s\n%s',$addl_headers,$GLOBALS['phpgw']->template->parse('_footer','footer'));
!
! // send the message
! $send->msg('email',$to,$subject,$mail_message .
$GLOBALS['phpgw']->bookmarks->config['mail_footer'],'','','','No reply
<noreply@' . $SERVER_NAME . '>');
!
! $msg .= "<br>mail-this-link message sent to
$to.";
! break;
! default:
! break;
}
}
--- 39,92 ----
// Check if there was a submission
! if ($GLOBALS['HTTP_POST_VARS']['send']) // Send button clicked
{
! $validate = createobject('phpgwapi.validator');
! // Strip space and tab from anywhere in the To field
! $to = $validate->strip_space($GLOBALS['HTTP_POST_VARS']['to']);
! // Trim the subject
! $subject = trim($GLOBALS['HTTP_POST_VARS']['subject']);
! $message = $GLOBALS['HTTP_POST_VARS']['message'];
! // Do we have all necessary data?
! if (empty($to) || empty($subject) || empty($message))
! {
! $error_msg .= '<br>'.lang('Please fill out <B>To E-Mail
Address</B>, <B>Subject</B>, and <B>Message</B>!');
! }
! else
! {
! // the To field may contain one or more email addresses
! // separated by commas. Check each one for proper
format.
! $to_array = explode(",", $to);
! while (list($key, $val) = each($to_array))
! {
! // Is email address in the proper format?
! if (!$validate->is_email($val))
{
+ $error_msg .= '<br>'.lang('To address
%1 invalid. Format must be <strong>address@hidden</strong> and domain must
exist!',$val).
+
'<br><small>'.$validate->ERROR.'</small>';
break;
}
+ }
+ }
! if (!isset ($error_msg))
! {
! $send = createobject('phpgwapi.send');
! // add additional headers to our email
! $addl_headers = sprintf("%s: %s
<%s>",lang('From'),stripslashes($from_name), $from);
!
! //$addl_headers =
sprintf('%s\n%s',$addl_headers,$GLOBALS['phpgw']->template->parse('_footer','footer'));
! $reply_to =
$GLOBALS['phpgw_info']['user']['fullname'].'
<'.$GLOBALS['phpgw_info']['user']['preferences']['email']['address'].'>';
! if (empty($replay_to))
! {
! $reply_to = 'No reply <noreply@' .
$GLOBALS['phpgw_info']['server']['mail_suffix'].'>';
! }
! // send the message
! $send->msg('email',$to,$subject,$message ."\n".
$GLOBALS['phpgw']->bookmarks->config['mail_footer'],'','','',$reply_to);
!
! $msg .= '<br>'.lang('mail-this-link message sent to
%1.',$to);
}
}
***************
*** 94,98 ****
if (empty($subject))
{
! $subject = 'Found a link you might like';
}
--- 94,98 ----
if (empty($subject))
{
! $subject = lang('Found a link you might like');
}
***************
*** 121,125 ****
echo '<pre>'; print_r($bm_id); echo '</pre>';
! while (list(,$id) = each($bm_id) && is_array($bm_id))
{
$GLOBALS['phpgw']->db->query("select * from
phpgw_bookmarks where bm_id='$id' and $filtermethod",__LINE__,__FILE__);
--- 121,125 ----
echo '<pre>'; print_r($bm_id); echo '</pre>';
! while (is_array($bm_id) && (list(,$id) = each($bm_id)))
{
$GLOBALS['phpgw']->db->query("select * from
phpgw_bookmarks where bm_id='$id' and $filtermethod",__LINE__,__FILE__);
***************
*** 143,148 ****
}
! $message = "I thought you would be interested in the following
link(s):\n";
! while (list(,$link) = each($links))
{
$message .= sprintf("%s -
%s\n",$link['name'],$link['url']);
--- 143,148 ----
}
! $message = lang('I thought you would be interested in the
following link(s):')."\n";
! while (list(,$link) = @each($links))
{
$message .= sprintf("%s -
%s\n",$link['name'],$link['url']);
***************
*** 154,157 ****
--- 154,158 ----
$GLOBALS['phpgw']->template->set_var('lang_from',lang('Message from'));
$GLOBALS['phpgw']->template->set_var('lang_to',lang('To E-Mail
Addresses'));
+ $GLOBALS['phpgw']->template->set_var('lang_multiple_addr',lang('(comma
separate multiple addresses)'));
$GLOBALS['phpgw']->template->set_var('lang_subject',lang('Subject'));
$GLOBALS['phpgw']->template->set_var('lang_message',lang('Message'));
Index: maintain.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/maintain.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** maintain.php 30 Apr 2002 23:44:00 -0000 1.29
--- maintain.php 25 Mar 2003 23:02:22 -0000 1.30
***************
*** 104,111 ****
$GLOBALS['phpgw']->db->next_record();
! $bookmark['name'] = $GLOBALS['phpgw']->db->f('bm_name');
$bookmark['url'] = $GLOBALS['phpgw']->db->f('bm_url');
! $bookmark['desc'] = $GLOBALS['phpgw']->db->f('bm_desc');
! $bookmark['keywords'] =
$GLOBALS['phpgw']->db->f('bm_keywords');
$bookmark['category'] =
$GLOBALS['phpgw']->db->f('bm_category') . '|' .
$GLOBALS['phpgw']->db->f('bm_subcategory');
$bookmark['rating'] =
$GLOBALS['phpgw']->db->f('bm_rating');
--- 104,111 ----
$GLOBALS['phpgw']->db->next_record();
! $bookmark['name'] =
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('bm_name'));
$bookmark['url'] = $GLOBALS['phpgw']->db->f('bm_url');
! $bookmark['desc'] =
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('bm_desc'));
! $bookmark['keywords'] =
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('bm_keywords'));
$bookmark['category'] =
$GLOBALS['phpgw']->db->f('bm_category') . '|' .
$GLOBALS['phpgw']->db->f('bm_subcategory');
$bookmark['rating'] =
$GLOBALS['phpgw']->db->f('bm_rating');
Index: search.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/search.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** search.php 17 Nov 2001 02:51:36 -0000 1.18
--- search.php 25 Mar 2003 23:02:22 -0000 1.19
***************
*** 44,51 ****
// the following fields are selectable
$field = array(
! 'phpgw_bookmarks.bm_name' => 'Name',
! 'phpgw_bookmarks.bm_keywords' => 'Keywords',
! 'phpgw_bookmarks.bm_url' => 'URL',
! 'phpgw_bookmarks.bm_desc' => 'Description'
// 'phpgw_bookmarks.bm_category' => 'Category',
// 'phpgw_bookmarks.bm_subcategory' => 'Sub Category',
--- 44,51 ----
// the following fields are selectable
$field = array(
! 'phpgw_bookmarks.bm_name' => lang('Name'),
! 'phpgw_bookmarks.bm_keywords' => lang('Keywords'),
! 'phpgw_bookmarks.bm_url' => lang('URL'),
! 'phpgw_bookmarks.bm_desc' => lang('Description')
// 'phpgw_bookmarks.bm_category' => 'Category',
// 'phpgw_bookmarks.bm_subcategory' => 'Sub Category',
***************
*** 267,270 ****
--- 267,271 ----
$GLOBALS['phpgw']->template->set_var(array(
'QUERY_CONDITION' =>
$GLOBALS['phpgw']->strip_html($q->query),
+ 'LANG_QUERY_CONDITION' => lang('Query Condition'),
'BOOKMARK_LIST' => $bookmark_list,
'TREE_SEARCH_URL' => $tree_search_url
Index: tree.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/tree.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** tree.php 18 Mar 2002 02:51:07 -0000 1.27
--- tree.php 25 Mar 2003 23:02:22 -0000 1.28
***************
*** 36,40 ****
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
! // $GLOBALS['phpgw']->template->set_var('messages',lang('Tree view'));
$location_info = $GLOBALS['phpgw']->bookmarks->read_session_data();
--- 36,40 ----
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
! $GLOBALS['phpgw']->template->set_var('messages',lang('Tree view'));
$location_info = $GLOBALS['phpgw']->bookmarks->read_session_data();
***************
*** 88,92 ****
*/
! $categories =
$GLOBALS['phpgw']->categories->return_array('mains',0,$GLOBALS['phpgw']->categories->total(),'','cat_name','',True);
/* Added to keep track of displayed items, so they do not repeat */
--- 88,93 ----
*/
! $categories =
$GLOBALS['phpgw']->categories->return_array('mains',0,False,'','cat_name','',True);
!
/* Added to keep track of displayed items, so they do not repeat */
Index: view.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/view.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** view.php 18 Jun 2002 01:02:09 -0000 1.20
--- view.php 25 Mar 2003 23:02:22 -0000 1.21
***************
*** 91,100 ****
$GLOBALS['phpgw']->template->set_var('lang_header',lang('View
bookmark'));
! $GLOBALS['phpgw']->template->set_var('input_url','<a href="' .
$GLOBALS['phpgw']->link('/bookmarks/redirect.php','bm_id=' .
$GLOBALS['phpgw']->db->f('bm_id'))
! . '" target="_new">' . $GLOBALS['phpgw']->db->f('bm_url') .
'</a>');
!
$GLOBALS['phpgw']->template->set_var('input_name',$GLOBALS['phpgw']->db->f('bm_name'));
!
$GLOBALS['phpgw']->template->set_var('input_desc',$GLOBALS['phpgw']->db->f('bm_desc'));
!
$GLOBALS['phpgw']->template->set_var('input_keywords',$GLOBALS['phpgw']->db->f('bm_keywords'));
! $GLOBALS['phpgw']->template->set_var('input_rating','<img src="' .
$GLOBALS['phpgw']->common->get_image_path('bookmarks') . '/bar-' .
$GLOBALS['phpgw']->db->f('bm_rating'). '.jpg">');
$category =
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->categories->return_name($GLOBALS['phpgw']->db->f('bm_category')));
--- 91,99 ----
$GLOBALS['phpgw']->template->set_var('lang_header',lang('View
bookmark'));
! $GLOBALS['phpgw']->template->set_var('input_url','<a href="' .
$GLOBALS['phpgw']->link('/bookmarks/redirect.php','bm_id=' .
$GLOBALS['phpgw']->db->f('bm_id')) . '" target="_new">' .
$GLOBALS['phpgw']->db->f('bm_url') . '</a>');
!
$GLOBALS['phpgw']->template->set_var('input_name',$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('bm_name')));
!
$GLOBALS['phpgw']->template->set_var('input_desc',$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('bm_desc')));
!
$GLOBALS['phpgw']->template->set_var('input_keywords',$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('bm_keywords')));
! $GLOBALS['phpgw']->template->set_var('input_rating','<img src="' .
$GLOBALS['phpgw']->common->get_image_path('bookmarks') . '/bar-' .
$GLOBALS['phpgw']->db->f('bm_rating') . '.jpg">');
$category =
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->categories->return_name($GLOBALS['phpgw']->db->f('bm_category')));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: bookmarks import.php,1.17,1.18 list.php,1.27,1.28 maillink.php,1.12,1.13 maintain.php,1.29,1.30 search.php,1.18,1.19 tree.php,1.27,1.28 view.php,1.20,1.21,
Michael Totschnig <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: bookmarks/inc class.bookmarks.inc.php,1.24,1.25 class.plist.inc.php,1.11,1.12 class.sqlquery.inc.php,1.3,1.4 header.inc.php,1.11,1.12
- Next by Date:
[Phpgroupware-cvs] CVS: bookmarks/setup phpgw_de.lang,1.6,1.7 phpgw_en.lang,1.7,1.8 phpgw_fr.lang,1.6,1.7
- Previous by thread:
[Phpgroupware-cvs] CVS: bookmarks/inc class.bookmarks.inc.php,1.24,1.25 class.plist.inc.php,1.11,1.12 class.sqlquery.inc.php,1.3,1.4 header.inc.php,1.11,1.12
- Next by thread:
[Phpgroupware-cvs] CVS: bookmarks/setup phpgw_de.lang,1.6,1.7 phpgw_en.lang,1.7,1.8 phpgw_fr.lang,1.6,1.7
- Index(es):