diff options
author | friendica <info@friendica.com> | 2015-01-15 17:34:53 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-15 17:34:53 -0800 |
commit | 6cd26c359054e188d41a97d3d97e3c659f2dede9 (patch) | |
tree | d5de7af38448da80d1770bee6aa05bb998ce09ae /include | |
parent | 35276c2da92a29132be2aaa75a63658d440e87e5 (diff) | |
parent | 597b07e8cc40144abce63f0779d28c2dbc376a22 (diff) | |
download | volse-hubzilla-6cd26c359054e188d41a97d3d97e3c659f2dede9.tar.gz volse-hubzilla-6cd26c359054e188d41a97d3d97e3c659f2dede9.tar.bz2 volse-hubzilla-6cd26c359054e188d41a97d3d97e3c659f2dede9.zip |
Merge branch 'pocorate'
Diffstat (limited to 'include')
-rw-r--r-- | include/socgraph.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/socgraph.php b/include/socgraph.php index 740886b1c..dbc25f9c1 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -117,6 +117,7 @@ function poco_load($xchan = '',$url = null) { $name = $entry['displayName']; $hash = $entry['hash']; $rating = ((array_key_exists('rating',$entry)) ? intval($entry['rating']) : 0); + $rating = ((array_key_exists('rating_text',$entry)) ? escape_tags($entry['rating_text']) :''); if(x($entry,'urls') && is_array($entry['urls'])) { foreach($entry['urls'] as $url) { @@ -188,17 +189,19 @@ function poco_load($xchan = '',$url = null) { ); if(! $r) { - q("insert into xlink ( xlink_xchan, xlink_link, xlink_rating, xlink_updated ) values ( '%s', '%s', %d, '%s' ) ", + q("insert into xlink ( xlink_xchan, xlink_link, xlink_rating, xlink_rating_text, xlink_updated ) values ( '%s', '%s', %d, '%s', '%s' ) ", dbesc($xchan), dbesc($hash), intval($rating), + dbesc($rating_text), dbesc(datetime_convert()) ); } else { - q("update xlink set xlink_updated = '%s', xlink_rating = %d where xlink_id = %d", + q("update xlink set xlink_updated = '%s', xlink_rating = %d, xlink_rating_text = '%s' where xlink_id = %d", dbesc(datetime_convert()), intval($rating), + dbesc($rating_text), intval($r[0]['xlink_id']) ); } |