Commit graph

3675 commits

Author SHA1 Message Date
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
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
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
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
marijus
8b1e83128a fix lost $sql_extra in recent sql query changes 2014-11-15 14:39:36 +01: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
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
Habeas Codice
a2d9dd1882 violates new sql standards
missed during merge
2014-11-13 13:58: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
friendica
a2cf1900c8 this should make all the 'sys' webpage design tools useable by the admin 2014-11-12 18:04:00 -08:00
friendica
f42a16ca04 Merge https://github.com/friendica/red into pending_merge 2014-11-12 15:32:15 -08:00
friendica
498344e81f sys edit ability to menus and menu items 2014-11-12 01:43:34 -08:00
marijus
1ed144b83c make search and advanced search use the same input form 2014-11-12 10:27:13 +01:00
friendica
ada2e43ea2 extend sys support to layouts 2014-11-12 00:48:09 -08:00
friendica
9be4fcce55 uid not set in webpages.php, start on editwebpage.php 2014-11-11 22:55:24 -08:00
friendica
4b9ec6645b cleanup 2014-11-11 20:44:43 -08:00
friendica
b5af667985 slow progress on sys publishing, making sure all the data we need is in the places we need it but validate it anyway 2014-11-11 19:29:30 -08:00
friendica
37742be6af some more work on sys publishing 2014-11-11 18:57:59 -08:00
friendica
570577a990 a couple of places where we need to look for a sys channel euid. 2014-11-11 18:05:50 -08:00
friendica
f2d5f23d58 Nothing here, move along. 2014-11-11 15:50:27 -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
friendica
325b269b22 the code is a bit crufty, but this should fix issue #687 2014-11-11 01:05:29 -08: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
6209465233 add public forum identification to libzot. No attempt is made to identify other types of forums or weird custom channel permissions. If the channel is auto-accept and taggable, it's a public forum. 2014-11-10 15:21:04 -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
friendica
d5d1f655d9 remove extraneous logging 2014-11-09 16:11:56 -08:00
friendica
50b9cc6f39 directory listing shows phantom keywords 2014-11-09 16:11:03 -08:00
Stefan Parviainen
28f3d7be5a New layout for directory 2014-11-09 00:18:26 +01:00
friendica
b6ae56b069 Merge https://github.com/friendica/red into pending_merge 2014-11-07 05:16:14 -08:00
friendica
1cc1bc8e81 fix broken photo edits when adult flag is changed 2014-11-07 05:15:39 -08:00
marijus
2cfe0f1545 provide lockstate for photo edit 2014-11-07 12:13:38 +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
marijus
5e7e8d1089 provide a lockstate for photo uploads 2014-11-06 11:57:33 +01: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
friendica
3b22e2f5f5 some minor cleanup of unreported (and as yet undiscovered) issues with permissions toggling. No smoking guns and no obvious issues discovered here. Repeated and tried to duplicate zottell's issue as described without seeing any obvious problems. 2014-11-05 16:21:03 -08:00
friendica
74b3e0a7eb changed notification description 2014-11-04 18:29:17 -08: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
friendica
a80e696b77 wall posted comment to a top-level wall post which arrived via a route (e.g. was posted to a forum) had no route, hence downstream recipients report route mismatch 2014-11-03 17:35:42 -08:00
marijus
287d5e0f10 if uploading a photo go away to album 2014-11-03 11:19:27 +01:00