aboutsummaryrefslogtreecommitdiffstats
path: root/mod/import.php
Commit message (Collapse)AuthorAgeFilesLines
* title missing sending to diaspora (which doesn't support titles but let's ↵friendica2015-02-091-1/+1
| | | | not go there).
* mod/import: try ten times to create a unique webbie if the chosen one is in use.friendica2014-12-181-3/+27
|
* PostgreSQL support initial commitHabeas Codice2014-11-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* fix import sql errorfriendica2014-10-131-1/+1
|
* disable email notifications when bulk importing content.friendica2014-10-081-0/+5
|
* optionally include wall items (posts) in import/exportfriendica2014-09-251-2/+55
|
* when importing channels - use the new location notification message to tell ↵friendica2014-09-161-9/+4
| | | | your original site where it sits in terms of primary.
* channel export with itemsfriendica2014-09-151-0/+6
|
* honour service class restrictions for total_identities, total_channels ↵friendica2014-09-151-1/+28
| | | | ("friends") and total_feeds both when importing channels and subsequently when syncing clones. Limits are based on the local system - additional entries are silently dropped.
* This is long overdue - use a symblic constant NULL_DATE instead of the ↵friendica2014-09-081-1/+1
| | | | easily mis-typed sequence '0000-00-00 00:00:00'
* We really can't do this without a hubloc. I was hoping we could, but ↵friendica2014-08-221-2/+3
| | | | notifier is setup to take hublocs, not xchans.
* if photo import failed during channel import, reset the xchan_photo_date so ↵friendica2014-06-041-1/+7
| | | | it will automatically fix itself.
* remove a couple of mysql reserved words from being used as table or row ↵friendica2013-12-221-1/+1
| | | | names. For this round we're getting 'group' and 'desc'. Warning: potentially destabilising as this touches a lot of code.
* add poco and follow to default xchan creationfriendica2013-12-041-1/+3
|
* change from refresh_all to a directory update - which does a refresh_all and ↵friendica2013-09-081-1/+3
| | | | also updates the directory.
* perform a refresh_all when an import has completed so that all your ↵friendica2013-09-081-0/+2
| | | | connections get a fresh update.
* if changing primary hub during an import operation - remove the old xchan ↵friendica2013-08-191-0/+25
| | | | and create a fresh xchan pointing at this instance. Also a minor edit to increase the default photo upload limit for new sites. There aren't many cameras left that will take photos < 800k in size.
* fix import from filefriendica2013-08-151-4/+4
|
* fix default channel setting after importfriendica2013-07-181-4/+9
|
* import requires a valid accountfriendica2013-06-081-0/+7
|
* Merge https://github.com/friendica/red into zpullfriendica2013-06-081-0/+1
|\
| * Another missing includeThomas Willingham2013-06-071-0/+1
| |
* | remove uploaded import file once we're done with it.friendica2013-06-081-0/+1
|/
* set default channel to new import if a default channel wasn't already setfriendica2013-06-051-0/+2
|
* missing include, plus change to new red api path for basic exportfriendica2013-06-051-2/+2
|
* doh - would probably help to decode the data before trying to use it...friendica2013-06-051-0/+1
|
* mysql 5.1 chokes on 'select * from group' since group is a keywordZach Prezkuta2013-05-121-2/+2
|
* photo driver abstractionfriendica2013-04-251-2/+2
|
* add groups and personal configs to export/importfriendica2013-02-211-0/+57
|
* unset auto increment keys on importfriendica2013-02-191-0/+3
|
* that should be the last critical piece. Everything else is gravy.friendica2013-02-191-4/+4
|
* dang - this is almost testable. Still have to figure out the best way to ↵friendica2013-02-191-22/+57
| | | | deal with the profile photo. Otherwise if you're really brave you could give it a go and see what happens. The worst that could happen is that it destroys the universe. Not a big deal. More likely you could end up with a bunch of imported things that have to be cleaned up. Less likely but entirely possible is that nothing useful will happen at all and it'll white screen.
* the heavy lifting is done for location migration aka channel import - now ↵friendica2013-02-191-1/+144
| | | | it's just connecting all the dots. Don't get impatient, there are a lot of dots.
* more groundwork for channel importfriendica2013-02-141-8/+50
|
* fill in the basic outline of what needs to happen on importationfriendica2013-01-121-1/+33
|
* skeleton for channel importfriendica2013-01-121-0/+32