Commit graph

3870 commits

Author SHA1 Message Date
friendica
3d55c9da86 buttonify some design elements that had not yet been buttonified 2014-11-13 18:51:30 -08:00
friendica
b5da015789 put timeout code in place but don't turn it on. 2014-11-13 15:34:35 -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
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
friendica
800e457290 populate initial ACL before the ajax loader gets called, just in case the form is submitted before it completes. Related to issue #615 2014-11-12 18:35:33 -08:00
marijus
1ed144b83c make search and advanced search use the same input form 2014-11-12 10:27:13 +01:00
friendica
4b9ec6645b cleanup 2014-11-11 20:44:43 -08:00
friendica
3fa003b5a8 add some subtle delineation to directory entries, remove forced link on homepage element (SECURITY) 2014-11-11 15:13:18 -08:00
marijus
d145ef2021 some work on directory widgets 2014-11-11 23:09:55 +01:00
marijus
f72035ec93 tie the narrow nav-pills to .widget instead of aside 2014-11-11 21:09:05 +01:00
friendica
0a84b45793 Merge https://github.com/friendica/red into pending_merge 2014-11-10 19:22:23 -08:00
friendica
d432f4ccd5 issue #683 - don't linkify homepage field without validating 2014-11-10 19:20:23 -08:00
RedMatrix
ecdfa0b96d Merge pull request #686 from beardy-unixer/master
Add a new theme flag - library.  Not directly available to be used itsel...
2014-11-11 13:40:03 +11:00
friendica
5619902776 indicate public forums in directory results (there will be some [possibly considerable] lag time before existing forums are correctly tagged). 2014-11-10 17:44:02 -08:00
friendica
0b4575a40b class is a reserved word 2014-11-10 14:23:06 -08:00
Thomas Willingham
9ddf49c661 Add a new theme flag - library. Not directly available to be used itself but
installed as a lib for other themes.  Like SDL, or GTK.

Get rid of mobility - it's better done with Comanche and schemas.

Describe themes instead of restricting them.  Mobile themes can be used as
the desktop theme and vice-versa.  This deals with the problem of "but my
device is something inbetween".

Presently not exposed to members.
2014-11-10 19:34:39 +00:00
friendica
2e695d1da2 menu page cleanup 2014-11-09 17:39:54 -08:00
RedMatrix
3730abb13a Merge pull request #681 from pafcu/master
New layout for directory
2014-11-09 16:08:22 +11:00
Stefan Parviainen
28f3d7be5a New layout for directory 2014-11-09 00:18:26 +01:00
friendica
7a8842f443 Merge https://github.com/friendica/red into pending_merge 2014-11-08 13:15:52 -08:00
friendica
adb5cec0d2 add acl loading fix to menu-item edits 2014-11-08 13:14:08 -08:00
marijus
862f0ff29a prevent posting before acl got populated since this will disregard the default acl setting and the post will be visible to the default audience without warning. the chance that this happens is quite small while writing a post but can easily happen on eg editing photos (maybe just tick a checkbox and press submit). the acl and submit buttons are disabled by default and will be activated as soon as acl is populated. 2014-11-08 21:55:44 +01:00
Stefan Parviainen
b5fad9feef Fix merge conflict 2014-11-08 20:53:41 +01:00
Stefan Parviainen
89aea08182 Highlight badge on hover 2014-11-08 20:30:33 +01:00
Stefan Parviainen
1a8fc73b57 Fix highlighting of login button 2014-11-08 20:06:08 +01:00
zottel
a22ba7629b update to German strings 2014-11-07 22:19:17 +01:00
marijus
2cfe0f1545 provide lockstate for photo edit 2014-11-07 12:13:38 +01:00
Olivier van Helden (hal)
13fd91d6f5 fix nbsp tag typoes in french translation 2014-11-07 05:14:01 +01:00
friendica
1fbd1a79c7 Provide a way to mark photos as adult and hide them from the default album view. Still need a button or setting to enable "unsafe viewing". This has no effect anywhere but in the album views. They can still be viewed by flipping through the individual photos with 'prev' and 'next'. We probably need a comprehensive strategy for how to deal with n-s-f-w photos in albums so consider this a band-aid which requires additional work and integration with other facilities which access these photos. It is entirely optional. 2014-11-06 17:27:28 -08:00
friendica
038e7c8923 crude skeleton for location manager and the UI sucks but at least it's on a webpage and you don't have to do it by hand. 2014-11-05 18:39:10 -08:00
RedMatrix
9c9c18b4a6 Merge pull request #674 from pafcu/master
Fix duplicate element id
2014-11-06 06:48:06 +11:00
Stefan Parviainen
1a445a17d8 Fix duplicate element id 2014-11-05 17:19:46 +01:00
marijus
b16ee29cc3 release the navbar in landscape mode on small devices 2014-11-05 10:32:30 +01:00
friendica
1896855c85 minor adjustments to make the form work as designed 2014-11-04 17:38:49 -08:00
friendica
d5d6158973 ok heads up - potentially destabilising change. I've tried to sort out all the default connection permissions for those who don't have a predefined (or therefore have a "custom") permissions role. Unfortunately this includes most people that were using this software more than a month ago. The real changes are that the SELF address book entry no longer holds "auto-permissions" but instead holds your "default permissions" (if you have a pre-defined role, the defaults will be pulled from the role table).
The auto permissions have moved to a pconfig (uid.system.autoperms). A DB update will move these settings into their new homes.

What used to be the "Auto-permissions settings" page is now the "default permissions settings" page and a checkbox therein decides whether or not to apply the permissions automatically. A link to this page will only be shown when you have the "custom" role selected.

With luck nobody will notice anything wrong. But at least for the next few days, please review permissions that have been assigned to new connections (either automatically or manually) and make sure they make sense (e.g. they aren't "nothing"). You still need to take action when seeing a message "permissions have changed but not yet submitted" as we always let you review and perhaps adjust the settings _before_ a connection is established (unless you have autoperms turned on).
2014-11-04 17:11:02 -08:00
friendica
ba7f1bb8ee configurable visual alerts/notifications 2014-11-04 15:24:24 -08:00
marijus
73e645fe3d class > id mixup 2014-11-04 09:35:39 +01:00
marijus
ba73b60177 missing </div> 2014-11-04 09:29:11 +01:00
friendica
ca1df08d92 posted-date-selector - spacing was slightly off in dropdown entries 2014-11-03 16:57:30 -08:00
friendica
fdb9b9d52e Merge https://github.com/friendica/red into pending_merge 2014-11-03 14:51:28 -08:00
friendica
a6d8c3193a various UI issues related to having an enormous number of entries in the posted_date selector including years/months that had no posts 2014-11-03 14:49:03 -08:00
marijus
1d923d2b0d one </div> to much and css fixes 2014-11-03 12:54:17 +01:00
marijus
2f85d12a6c if deleting a photo go away to album 2014-11-03 10:46:57 +01:00
marijus
8cfe8a5f25 css fixes 2014-11-02 19:36:28 +01:00
marijus
dc5e05d334 even more photos work 2014-11-01 23:55:36 +01:00
marijus
30281b161c close the eventual open tool if the other opens 2014-11-01 20:30:13 +01:00
marijus
5d151b9886 do not reload page for photo upload 2014-10-31 20:25:43 +01:00
Thomas Willingham
5d1bb1b685 Smarty3 now lives in store 2014-10-31 16:09:46 +00:00