Commit graph

169 commits

Author SHA1 Message Date
friendica
18f5e269ce fix 404 pages for derivative themes by pretending we've found a module called '404'. This way all the correct theme initialisation stuff will happen. 2015-02-22 23:05:21 -08:00
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -08: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
Thomas Willingham
474e7fff00 Remove legacy custom/ 2014-11-04 19:40:00 +00:00
friendica
11ccf253e2 Heads up: "custom/module.php" is deprecated. Please read this commit if you are affected. 2014-10-30 20:27:41 -07:00
friendica
cb15c73dae move all theme initialisation to one place - just after calling module_init. Revert if there are serious issues, but please note the issues in as much detail as possible so we can work through them. 2014-10-20 16:47:58 -07:00
friendica
f8468b4c3a allow custom role permissions and fix site timezone. 2014-09-29 23:36:41 -07:00
Alexandre Hannud Abdo
bc389ff934 Language selection: case-insensitive and system language
Fixed ignoring HTTP_ACCEPT_LANGUAGE tags that had uppercase
characters.

Fixed defining a->language too soon to ever get the system lang
2014-05-23 10:16:03 -03:00
friendica
b3cc05c41d try to fix random logouts 2014-05-12 17:04:03 -07:00
friendica
4cf684a701 better checking for SSL servers, even though it probably doesn't fix the cookie bug 2014-05-08 18:50:33 -07:00
friendica
c410406922 remove the redundant install check 2014-05-08 16:33:35 -07:00
friendica
d4e00c7bde turn off ssl cookie protection by default since nobody that has problems with it is apparently able to debug it. PLEASE turn it on by
util/config system ssl_cookie_protection 1
if you use SSL. Please debug it if you have a problem and have any basic technical skills at all and tell us why it doesn't work so we can fix it and turn this on by default because it is very very very important.
2014-05-08 16:28:40 -07:00
friendica
1ca8584390 Do our best to provide sane cookie defaults. 2014-05-07 16:31:54 -07:00
friendica
1fa8bc12e5 try again 2014-05-05 18:49:58 -07:00
friendica
2949030461 revert 2014-05-05 18:38:11 -07:00
friendica
f0653ace22 improved cookie security 2014-05-05 18:35:02 -07:00
friendica
ebd52368bb strip hard-wired zids from posted links as they will have the wrong identity when somebody tries to view the link 2014-02-16 14:13:26 -08:00
friendica
baf3b052f6 don't load any configs from DB if installing - especially in style.pcss 2014-02-02 18:18:22 -08:00
friendica
02e4527de6 better check for setup module 2014-02-02 14:09:09 -08:00
friendica
b39c0d54c0 some windows fixes 2014-02-02 14:06:36 -08:00
Michael Meer
c5ac5544cb clean up logger commands. Placed apostrophs at the end from some comments to keep the syntax highlighting in vi working 2014-01-30 11:04:20 +01:00
Michael Meer
0a2b2a1390 attempt with fix URL for testing works 2014-01-30 10:39:09 +01:00
zottel
1280a9abfa prevent reload loop if JS is active, but no cookies accepted 2014-01-16 14:22:59 +01:00
friendica
475b24ca9e more dav work 2014-01-03 01:44:25 -08:00
zottel
198264aaf9 set JS cookie 2013-12-09 13:30:00 +01:00
friendica
f3d351621d Saved searches on the matrix/network page just got a lot more interesting. Hint: it's all about autocomplete 2013-10-01 19:54:22 -07:00
dsp1986
ff56e95c6e fix include paths 2013-09-17 09:41:48 +02:00
friendica
ef414ba94c fix homebase variable 2013-08-15 05:20:23 -07:00
friendica
fbdee83dca some object/thing tweaks 2013-07-03 20:37:39 -07:00
friendica
765d6e0a97 push refresh messages, performance work on conversations and configs, doc updates 2013-06-14 16:54:58 -07:00
friendica
b866cc26fa templatise alt_pager 2013-06-03 18:16:00 -07:00
fabrixxm
d4c07930d5 add $db_port to .htconfig.php and $a->config['syste]['smarty3_folder'] for compiled templates 2013-05-10 06:13:24 -04:00
friendica
552f03122c db abstraction layer 2013-04-22 20:02:21 -07:00
friendica
abd58bce68 set hidden flags on new directory entries, not just existing ones 2013-03-26 19:37:33 -07:00
friendica
b86277b0ff dangerous typo that removes all your hublocs, fix reshare formatting 2013-03-11 16:13:09 -07:00
Zach Prezkuta
a0d19ffb72 implement Smarty3 2013-01-06 15:57:11 -07:00
friendica
3795720421 move all the final page construction to a construct_page() function 2013-01-04 20:27:41 -08:00
friendica
f8bd476b88 import the toggle_mobile stuff to shut up some warnings 2013-01-03 15:52:05 -08:00
friendica
c360565d0a get rid of undefined $ error by mangling theme specific JS include order 2012-12-13 04:47:06 -08:00
friendica
c70777e19c a bit of e_all cleanup 2012-12-08 14:18:02 -08:00
friendica
7c047bea33 Allow anybody to completely over-ride any module on their own site without any core code edits. Just copy an existing module file to 'custom/{module}.php' and edit to your liking. 2012-11-28 01:23:16 -08:00
friendica
22841e1566 start implementing zot-id 2012-11-08 19:07:19 -08:00
friendica
152641bf24 that was certainly some fun debugging (not) 2012-11-04 20:53:59 -08:00
friendica
f5b1eee177 mv mod_install to mod_setup, conflict with name of install dir 2012-11-03 14:59:46 -07:00
friendica
7915e597ec more theme stuff 2012-11-03 06:32:27 -07:00
friendica
e36ca7b41f fix page title 2012-10-29 17:32:23 -07:00
friendica
e3c2e58979 "profile url" e.g. the wall/stream is now "channel url". "Profile URL" goes to the profile details. 2012-10-29 17:14:02 -07:00
friendica
ceeb4db6e3 Give the UI a little love after all the backend mods 2012-10-24 19:13:29 -07:00
friendica
8f9ddcb536 lotsa little fixes 2012-10-21 22:11:02 -07:00