Commit graph

96 commits

Author SHA1 Message Date
redmatrix
d537fc854b typo and update to rfc7033 (webfinger) as well as webfinger diagnostic page 2015-05-24 17:59:31 -07:00
redmatrix
52e38d7c24 search result heading not translatable 2015-05-24 15:57:59 -07:00
friendica
a707e9b9f5 issue #178, searching for words such as 'data' would return private items regardless of their unobscured content. 2015-04-19 23:16:17 -07:00
friendica
f1e73abd21 issue #226 2015-04-05 21:32:54 -07:00
friendica
a2e3ca6fd8 add loadtime search to channel and fix it for home. display and search need further investigation 2015-03-21 16:46:28 -07:00
friendica
e157371c39 remote_user => remote_channel 2015-01-28 20:58:59 -08:00
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -08:00
friendica
d73972e8e2 provide a json feed of search results 2015-01-26 17:09:33 -08:00
friendica
e528483d81 hide friends broken, add parameter for item search by verb 2015-01-13 14:42:54 -08:00
friendica
f28103d595 wall tags 2014-12-15 14:37:31 -08:00
Habeas Codice
1a5a5c7edb PostgreSQL support initial commit
There were 11 main types of changes:
- UPDATE's and DELETE's sometimes had LIMIT 1 at the end of them. This is not only non-compliant but
it would certainly not do what whoever wrote it thought it would. It is likely this mistake was just
copied from Friendica. All of these instances, the LIMIT 1 was simply removed.
- Bitwise operations (and even some non-zero int checks) erroneously rely on MySQL implicit
integer-boolean conversion in the WHERE clauses. This is non-compliant (and bad programming practice
to boot). Proper explicit boolean conversions were added. New queries should use proper conventions.
- MySQL has a different operator for bitwise XOR than postgres. Rather than add yet another dba_
func, I converted them to "& ~" ("AND NOT") when turning off, and "|" ("OR") when turning on. There
were no true toggles (XOR). New queries should refrain from using XOR when not necessary.
- There are several fields which the schema has marked as NOT NULL, but the inserts don't specify
them. The reason this works is because mysql totally ignores the constraint and adds an empty text
default automatically. Again, non-compliant, obviously. In these cases a default of empty text was
added.
- Several statements rely on a non-standard MySQL feature
(http://dev.mysql.com/doc/refman/5.5/en/group-by-handling.html). These queries can all be rewritten
to be standards compliant. Interestingly enough, the newly rewritten standards compliant queries run
a zillion times faster, even on MySQL.
- A couple of function/operator name translations were needed (RAND/RANDOM, GROUP_CONCAT/STRING_AGG,
UTC_NOW, REGEXP/~, ^/#) -- assist functions added in the dba_
- INTERVALs: postgres requires quotes around the value, mysql requires that there are not quotes
around the value -- assist functions added in the dba_
- NULL_DATE's -- Postgres does not allow the invalid date '0000-00-00 00:00:00' (there is no such
thing as year 0 or month 0 or day 0). We use '0001-01-01 00:00:00' for postgres. Conversions are
handled in Zot/item packets automagically by quoting all dates with dbescdate().
- char(##) specifications in the schema creates fields with blank spaces that aren't trimmed in the
code. MySQL apparently treats char(##) as varchar(##), again, non-compliant. Since postgres works
better with text fields anyway, this ball of bugs was simply side-stepped by using 'text' datatype
for all text fields in the postgres schema. varchar was used in a couple of places where it actually
seemed appropriate (size constraint), but without rigorously vetting that all of the PHP code
actually validates data, new bugs might come out from under the rug.
- postgres doesn't store nul bytes and a few other non-printables in text fields, even when quoted.
bytea fields were used when storing binary data (photo.data, attach.data). A new dbescbin() function
was added to handle this transparently.
- postgres does not support LIMIT #,# syntax. All databases support LIMIT # OFFSET # syntax.
Statements were updated to be standard.

These changes require corresponding changes in the coding standards. Please review those before
adding any code going forward.

Still on my TODO list:
- remove quotes from non-reserved identifiers and make reserved identifiers use dba func for quoting
- Rewrite search queries for better results (both MySQL and Postgres)
2014-11-13 12:21:58 -08:00
friendica
3d7d6ec21f honour sys channel permissions for who can view the sys owned content 2014-07-26 18:48:25 -07:00
friendica
00904d4994 cleanup 2014-06-19 16:09:02 -07:00
friendica
97a4479513 don't provide a second (actually third counting the navbar) search box on the search page if you've got saved searches turned on. This should solve some problems with duplicate html id's (and save wasn't working anyway). If you don't have saved search ability (which will provide a saved search widget in the sidebar), provide a simple search box in the main content region but without save ability. 2014-06-03 18:19:27 -07:00
friendica
04cd60a0e3 add sys channel (discover) posts to "anonymous" search. They will by default be public. 2014-06-03 17:17:26 -07:00
friendica
7b24b78af9 add fh to other page templates 2014-03-27 00:35:46 -07:00
Thomas Willingham
e9ce68559e Stop Google DDoSing me by providing block_public_search, which unlike
block_public will block *only* searching without an observer.
2014-01-19 23:48:26 +00:00
friendica
7910221832 preparatory work for supporting a "list view" mode for conversations. This would be useful for forum-like channels and/or block-oriented themes. 2014-01-08 15:20:12 -08:00
friendica
a084a3fa47 comanchify mod_search - we've got three modules left to Comanchify: admin, directory and message - each of which introduces "interesting challenges" 2013-12-20 01:39:42 -08:00
friendica
941f81eb30 check that every invocation of htmlspecialchars has the right arg list 2013-12-12 02:01:42 -08:00
marijus
76d8501d67 saved search icon work and bugfixes for #tags not beeing deletable and save button showing if saved search is disabled 2013-12-10 00:32:49 +01:00
marijus
3a4c32475e search should respect max items to load as well 2013-11-22 14:17:47 +01:00
friendica
89fc319c90 fix search to display more than one item 2013-10-10 21:31:40 -07:00
friendica
a2b20bd58f one more edge case in the public perms - don't match perms = 0 which is private, this and prior checkin are for issue #114 2013-09-22 23:00:55 -07:00
friendica
956d275693 fixes for display and search privacy enforcement 2013-09-22 22:52:48 -07:00
friendica
a8dd7280b3 get rid of more variables with dashes in the names - use underscore *except* in CSS. These were probably already here, but if you see any - please keep them out of PHP and MySQL where they sometimes get interpreted as a subtraction operation and are a bugger to find. 2013-08-15 22:52:19 -07:00
friendica
d093981d68 another temporary fix to mod/search to only return one of each post. 2013-06-23 04:51:27 -07:00
friendica
dd9d32bcb3 make tag searches work at least as well as the normal search - which still is quite broken, but at least return some results without introducing too many security holes 2013-06-20 17:09:11 -07:00
friendica
c0cc494bf3 fix mod-display when not logged in. 2013-06-18 02:06:16 -07:00
friendica
112dbf3abd get search page working with live-update and endless scroll, still not perfect - there may be duplicated content and possibly unauthorised content and 'timeago' not working correctly - will deal with those later, but at least you can see results. 2013-05-09 18:08:00 -07:00
friendica
cb0a90d628 small updates 2013-05-08 21:30:54 -07:00
Thomas Willingham
fb8a0e06c4 Updated build_query for mid 2013-03-25 19:20:12 +00:00
friendica
ddf5bf8968 rename 'uri' (and parent_uri) to 'mid' (and parent_mid) since these no longer remotely resemble uri's and are actually message_id's. This change is potentially destabilising because it touches a lot of code and structure. But it has to get done and there's no better time than the present. 2013-03-21 18:25:41 -07:00
friendica
ba3cff6d9a progress on tag delivery 2013-02-11 00:20:14 -08:00
friendica
99c5f88963 mod_display - no fun. Not working at all. But a bit of progress. 2013-02-10 04:55:29 -08:00
friendica
beb3301d43 security fixes related to directory access and sites that are off the grid 2013-01-22 02:56:32 -08:00
friendica
45be26dd81 more heavy lifting on API - though need to re-visit events and give them all message_ids from the origination site. 2013-01-19 22:21:00 -08:00
friendica
8fd40fc1c0 typo 2013-01-18 19:16:27 -08:00
friendica
d22069ad22 link people search from navbar 2013-01-18 19:15:08 -08:00
friendica
4c21abe533 verify table needs auto_increment flag 2013-01-02 23:07:46 -08:00
friendica
ece59b778e turn off some "advanced" features by default, like archives and saved search - even though we don't yet have a screen to turn them on. That will come. 2012-11-03 16:40:05 -07:00
friendica
3ebb4a3dc7 updates 2012-09-09 21:17:06 -07:00
friendica
03209d2d0d updates 2012-07-14 20:39:46 -07:00
friendica
9ac32c49e2 move saved searches to new taxonomy 2012-07-11 17:54:00 -07:00
friendica
e7957e1448 create fetch_tags function, make search work again, change logo 2012-07-10 19:28:02 -07:00
friendica
29bdf432f0 fewer "bob smith to bob smith via wall-to-wall". 2012-06-02 00:40:38 -07:00
friendica
514c994e6a possible sql injection in search 2012-05-29 17:14:35 -07:00
friendica
21d79e787e Merge https://github.com/friendica/friendica into pull
Conflicts:
	mod/search.php
2012-05-29 16:50:42 -07:00
friendica
419cf91aae bugfixes: private photo embeds and search for strings with % 2012-05-29 16:44:02 -07:00
Michael Vogel
a5dc41ab13 Saved searches now can search for tags as well 2012-05-26 11:51:48 +02:00