Commit graph

205 commits

Author SHA1 Message Date
Mike Macgirvin
718102c11d symfony work 2024-03-28 17:05:09 +11:00
Mike Macgirvin
15a8339fba use symfony wrapper with legacy fallback 2024-03-28 13:12:56 +11:00
Mike Macgirvin
64cb01c166 rename Code to src 2024-03-13 16:21:03 +11:00
Mike Macgirvin
da46476ce8 better handling of xdebug with phpstorm 2022-08-13 09:23:40 +10:00
nobody
a8e96322f0 it's done 2022-02-15 20:08:28 -08:00
nobody
389b2e5b17 initial psr12 conversion 2021-12-03 09:33:36 +11:00
zotlabs
67ebc86812 config updates 2018-11-20 19:15:15 -08:00
redmatrix
516c43ba15 more work associated with DBA and index.php shuffle 2016-05-24 17:54:45 -07:00
redmatrix
84ba6393ad relocate index and db 2016-05-24 16:36:55 -07:00
redmatrix
1977ab35c0 remove the app_menu hook - no longer used anywhere in core. Several addons still hook into it, but we can remove these over time. 2016-05-16 21:39:37 -07:00
redmatrix
2dcedd6951 more work on sessions and cookies, as some anomalies appeared in caldav and firefox which suggested deeper issues 2016-05-16 17:07:39 -07:00
redmatrix
a674b05e96 register shutdown procedure 2016-05-09 19:13:27 -07:00
redmatrix
d62f490814 Setup was horked after this commit and I couldn't easily make it right so reverting - will try again at a future date
Revert "remove global db variable"

This reverts commit c3b0c0f32a.
2016-04-25 20:12:36 -07:00
redmatrix
c3b0c0f32a remove global db variable 2016-04-25 16:55:33 -07:00
redmatrix
91cc365143 reverse the logic of the jsenabled setting so that sessions without js are performance penalised instead of regular sessions. 2016-04-12 22:55:26 -07:00
redmatrix
0fe4957274 when setting the session handler as an object using the auto register shutdown flag, explicitly calling session_write_close() should no longer be required. It shouldn't cause any issues if it is called twice, but the session driver interface has been known to sometimes act in unexpected ways and there are lots of "subtleties" which can often be difficult to debug. The mentioned flag implies PHP 5.4 minimum but I believe we require that anyway. 2016-04-10 17:42:32 -07:00
redmatrix
9b66b5eee3 objectify all the session management stuff 2016-04-08 04:44:10 -07:00
redmatrix
fb9c12df15 rework the "remember me" fix to be a bit less hackish 2016-04-06 02:33:11 -07:00
redmatrix
a703835b5c Bug: "remember me" doesn't 2016-04-03 17:38:17 -07:00
redmatrix
44283dbbbb change the App constructor 2016-03-31 20:24:30 -07:00
redmatrix
0cda431456 create miniApp to convert existing settings files to the static App class 2016-03-31 20:15:47 -07:00
redmatrix
9abd95fad3 static App 2016-03-31 16:06:03 -07:00
redmatrix
1cd3b41825 deprecate $a->get_baseurl() 2016-03-30 22:13:24 -07:00
redmatrix
b101a8f6fb missing function 2016-02-24 11:20:46 -08:00
redmatrix
1db3409f36 add router class 2016-02-19 16:19:15 -08:00
redmatrix
b4e3cd000f rev update 2016-02-05 00:06:35 -08:00
redmatrix
a341c889b7 add oembed provider for photos 2016-01-31 15:55:27 -08:00
redmatrix
10ed334e8c various issues from the forums 2016-01-17 16:29:32 -08:00
redmatrix
baedd25309 'auto channel creation' - if the corresponding config variable is set, create a channel when an account is created.
Plugins can provide the necessary channel details (probably from an extended registration form). If no details are provided, a social (mostly public) channel will be created using the LHS of the email address and you will be directed to your channel page (unless email verification is required, in which case this step will be delayed until successful validation and login). If the reddress is already assigned a random name(1000-9999) reddress will be assigned.
2016-01-12 15:43:08 -08:00
redmatrix
37368bda65 change _newwin to _blank because the window named _newwin may be hard to find if you have lots of windows/tabs open. 2015-11-20 12:49:38 -08:00
ken restivo
e56633d5b0 Throw HTTP error and display error message when database is unavailable. #179 2015-11-19 20:58:13 -08:00
redmatrix
15b6e8faa4 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	include/identity.php
	include/widgets.php
	util/messages.po
	view/it/messages.po
	view/it/strings.php
2015-07-19 21:08:34 -07:00
redmatrix
964e461e09 allow plugins to provide module handlers for arbitrary modules that haven't been installed on the system. 2015-07-15 21:01:18 -07:00
redmatrix
b43c0bc471 we aren't using the module_aside functions or hooks any more 2015-06-25 22:46:25 -07:00
Klaus Weidenbach
e90c331bf6 Add PHP's xml module check and upload limits to setup.
And some documentation.
2015-05-24 02:58:52 +02:00
friendica
37384c0b27 automated warning after a few days if poller is dead 2015-03-02 18:02:06 -08:00
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