Update of /cvsroot/webnotes/webnotes/core
In directory usw-pr-cvs1:/tmp/cvs-serv6788/core
Modified Files:
note_api.php string_api.php
Log Message:
Implemented 0000001: Cross referencing
Index: note_api.php
===================================================================
RCS file: /cvsroot/webnotes/webnotes/core/note_api.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- note_api.php 13 Sep 2002 07:17:53 -0000 1.15
+++ note_api.php 15 Sep 2002 02:25:58 -0000 1.16
@@ -108,7 +108,7 @@
$info['id'] = $v_id;
$info['email'] = $v_email;
- $info['note'] = string_preserve_spaces( string_disable_html( $v_note ) );
+ $info['note'] = string_add_note_links( $p_url, string_preserve_spaces( string_disable_html( $v_note ) ) );
#Removed by Remon tell we fix the problem in the sql_to_unix_time
#$info['date'] = date( 'M, d Y H:i', sql_to_unix_time( $v_date_submitted ) );
Index: string_api.php
===================================================================
RCS file: /cvsroot/webnotes/webnotes/core/string_api.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- string_api.php 13 Sep 2002 07:17:53 -0000 1.4
+++ string_api.php 15 Sep 2002 02:25:58 -0000 1.5
@@ -47,4 +47,9 @@
function string_disable_html( $p_string ) {
return str_replace(array('<', '>'), array('<', '>'), $p_string );
}
+ ### --------------------
+ function string_add_note_links( $p_page_url, $p_note ) {
+ return ( preg_replace( '/#([0-9]+)/', "<a href=\"$p_page_url#\\1\">#\\1</a>", $p_note ) );
+ }
+ ### --------------------
?>
|