Commit graph

11960 commits

Author SHA1 Message Date
friendica
7b39fac5f0 forgot to add catcloud to the widget doc 2014-11-17 20:11:05 -08:00
friendica
7e8f3e4dfb requote ignore 2014-11-17 18:46:57 -08:00
friendica
af9015c8ed place holder 2014-11-17 18:29:57 -08:00
RedMatrix
913dafc593 Merge pull request #698 from habeascodice/master
some sql fixes
2014-11-18 13:00:26 +11:00
Habeas Codice
e61dbf722d implicit type conversion 2014-11-17 16:49:17 -08:00
Habeas Codice
d0e0a8fb27 implicit type conversion 2014-11-17 16:37:47 -08:00
Habeas Codice
4fa0df2927 another one 2014-11-17 16:01:17 -08:00
friendica
65a6121014 fix the update_unseen stuff on the channel page also 2014-11-17 15:43:03 -08:00
friendica
064b48fa71 Merge https://github.com/friendica/red into pending_merge 2014-11-17 15:27:18 -08:00
friendica
13a7637d9d whitespace 2014-11-17 15:26:32 -08:00
friendica
c0ad4763b3 add unseen count and way to mark unseen to list mode. Also fix automatic mark of unseen so as to work with list mode. 2014-11-17 15:18:06 -08:00
Habeas Codice
96427a23a3 Merge branch 'master' of https://github.com/habeascodice/red 2014-11-17 15:15:02 -08:00
Habeas Codice
bcaa32a83a fix boolean 2014-11-17 15:13:49 -08:00
RedMatrix
e59f7cc198 Merge pull request #697 from pafcu/master
Fix dirsearch parser to not get confused by logic terms in values and to ...
2014-11-18 08:49:54 +11:00
RedMatrix
de1d24c80c Merge pull request #696 from habeascodice/master
simple commandline mysql to postgres migrator
2014-11-18 08:33:24 +11:00
RedMatrix
5aba2e82df Merge pull request #695 from pafcu/master
Switch to a better datetime picker widget
2014-11-18 08:33:04 +11:00
Habeas Codice
9443ef8a3d simple command-line migrator from mysql to postgres
provided with the WorksForMe(tm) warranty of fitness for a purpose implied or otherwise
2014-11-17 12:26:24 -08:00
Stefan Parviainen
ece9819b4d Fix dirsearch parser to not get confused by logic terms in names and to handle quoted single word names 2014-11-17 18:51:37 +01:00
habeascodice
540b7af2c1 Merge branch 'master' of https://github.com/habeascodice/red 2014-11-17 08:30:26 -08:00
Stefan Parviainen
e190adc589 Use new date selector for item expiry 2014-11-17 16:51:46 +01:00
friendica
b11ed7f88e allow somebody to access the "home page content" (whatever that may be) even after logging in by including a home/splash argument. It appears that nothing else is required to provide 'sys' channel webpage contents except a link in the admin page to create them. There *may* be an issue with comanche theme selection but we'll cross that bridge when we come to it. Also thinking that we might want to map /home/foo to /page/sys/foo in the longer term scheme of things. 2014-11-16 22:46:52 -08:00
friendica
cd404f5710 remove old timers 2014-11-16 20:33:50 -08:00
friendica
b3383a2547 speed things up a wee bit 2014-11-16 20:23:22 -08:00
friendica
acc8c69242 when in list mode, make the max height half of the normal height before 'divgrow' kicks in. 2014-11-16 19:33:58 -08:00
friendica
591f10e235 module cleanup 2014-11-16 19:08:10 -08:00
friendica
18cedf4def blog/list mode display settings 2014-11-16 16:48:35 -08:00
friendica
cbaee76dd9 "list mode" (forum and blog mode, no comments or comment boxes displayed on the summary page) 2014-11-16 16:19:24 -08:00
friendica
1c249a5b06 some poller optimisations and a fix for undefined (empty) dbtype which shows up as a mysql error that 'rand' isn't found. 2014-11-16 15:51:42 -08:00
Stefan Parviainen
c1b8608940 Switch to a better datetime picker widget 2014-11-16 13:56:45 +01:00
friendica
7e58bfe931 Merge https://github.com/friendica/red into pending_merge 2014-11-15 14:04:20 -08:00
friendica
f299922df3 minor changes to support forum mode 2014-11-15 14:03:41 -08:00
friendica
87cdfc1751 doc updates 2014-11-15 14:03:28 -08:00
marijus
8b1e83128a fix lost $sql_extra in recent sql query changes 2014-11-15 14:39:36 +01:00
friendica
ad8668be9e Merge https://github.com/friendica/red into pending_merge 2014-11-13 18:51:42 -08:00
friendica
3d55c9da86 buttonify some design elements that had not yet been buttonified 2014-11-13 18:51:30 -08:00
RedMatrix
f864e3d7d8 Merge pull request #693 from habeascodice/master
Add bitwise xor to db_getfunc()
2014-11-14 13:06:07 +11:00
Habeas Codice
ee38bebbd6 Add bitwise xor to db_getfunc() 2014-11-13 17:57:21 -08:00
friendica
d543652002 Merge https://github.com/friendica/red into pending_merge 2014-11-13 17:23:50 -08:00
RedMatrix
71237860c9 Merge pull request #691 from dawnbreak/master
Changed two strange looking places in boot.php.
2014-11-14 12:22:25 +11:00
friendica
edda931197 mysql driver - in debug mode for statements that return true/false report the sql along with the result so we can match it to an offending statement. This has bugged me for some time but never got around to fixing it until now. 2014-11-13 16:34:36 -08:00
Klaus Weidenbach
e8b77fbdff Fixed a variable conflict in mod/xchan.php.
A variable $rr inside the foreachs was used twice.
Add translation to mod/xchan.php.
2014-11-14 00:45:25 +01:00
friendica
b5da015789 put timeout code in place but don't turn it on. 2014-11-13 15:34:35 -08:00
RedMatrix
25d69a9068 Merge pull request #692 from habeascodice/master
missed during merge
2014-11-14 09:02:48 +11:00
Habeas Codice
a2d9dd1882 violates new sql standards
missed during merge
2014-11-13 13:58:04 -08:00
RedMatrix
9132a1c195 Merge pull request #690 from habeascodice/master
Initial postgres support
2014-11-14 08:52:38 +11:00
Klaus Weidenbach
e4859d4bd7 Changed two strange looking places in boot.php.
There have been two places that looked wrong, but I don't know how I can test
them. So please review and test if I am not wrong.
2014-11-13 22:40:06 +01:00
Habeas Codice
ac27db22c1 Merge remote-tracking branch 'upstream/master'
Conflicts:
	boot.php
	include/dba/dba_driver.php
	include/diaspora.php
	include/follow.php
	include/session.php
	include/zot.php
	mod/photos.php
	mod/ping.php
2014-11-13 13:06: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
Jeroen
109cb93663 update nl 2014-11-13 16:27:33 +00:00
friendica
306f5d9cbe let's try this without a timeout 2014-11-13 01:04:26 -08:00