Commit Graph

169 Commits

Author SHA1 Message Date
Michael 5554448162 Now storing the "manually approve" data / fix update routine 2019-01-14 06:36:08 +00:00
Hypolite Petovan 5e1ceb57de Escape global namespaced get_app() calls
- Add deprecated status
2019-01-03 21:27:36 -05:00
Hypolite Petovan acaee626f5 Remove include/ requires that are now done directly from Composer 2018-12-24 09:56:25 -05:00
Hypolite Petovan d53ff9c34d Add support for FULLTEXT indices in Database\DBStructure 2018-12-23 15:40:49 -05:00
Hypolite Petovan 48a356dba2 Fix formatting in Database\DBStructure 2018-12-23 15:32:23 -05:00
Hypolite Petovan c5558cc459
Merge pull request #6224 from annando/dba-delete-contact
Avoid duplicated contacts, improve contact deletion, avoid memory issues
2018-12-02 16:16:59 -05:00
Michael 066a040cc7 Avoid duplicated contacts, improve contact deletion, avoid memory issues 2018-12-02 16:25:25 +00:00
Hypolite Petovan 458981f75c Replace x() by isset(), !empty() or defaults()
- Remove extraneous parentheses around empty() calls
- Remove duplicate calls to intval(), count() or strlen() after empty()
- Replace ternary operators outputting binary value with empty() return value
- Rewrite defaults() without x()
2018-11-30 09:06:22 -05:00
Hypolite Petovan 6eb6cc94c7 Move config/dbstructure.php to config/dbstructure.config.php 2018-11-25 01:14:44 -05:00
fabrixxm c13e078c42 dbstructure: check for comment value or use default
fix #6119
2018-11-17 11:43:01 +01:00
Philipp Holzer 270e817954
Adding force to update routine
- Introduced Cache::NEVER Lock (never expiring lock)
- Force flag for dbstructure update
- Moving the business logic to central place in Update class
2018-10-31 14:44:40 +01:00
Philipp Holzer 87f3fe24f7
Moving UPDATE defines/constants out of boot 2018-10-31 14:44:23 +01:00
Adam Magness 50da89d861 Logger Levels
update logger levels in calls
2018-10-30 09:58:45 -04:00
Adam Magness 14fde5dc9b Log function
implement log() function.
2018-10-30 09:57:14 -04:00
Hypolite Petovan a22196edae Add/Fix Doxygen headers for classes 2018-10-22 16:50:55 -04:00
Hypolite Petovan 2debdbd0c9 Fix dbstructure console outputting addon structure as well 2018-10-22 16:50:55 -04:00
Hypolite Petovan 19ffc0510b Move DB_UPDATE_VERSION from boot.php to config/dbstructure.php 2018-10-22 16:50:55 -04:00
Hypolite Petovan fad99b8619 Switch from dbstructure.json to dbstructure.php 2018-10-22 16:50:55 -04:00
Hypolite Petovan e511790d62 Move NULL_DATE from boot.php to DBA::NULL_DATETIME
- Add DBA::NULL_DATE constant
2018-10-22 16:50:55 -04:00
Hypolite Petovan 4ffcb77554 Simplify L10n::t + sprintf instances 2018-10-20 09:02:35 -04:00
Hypolite Petovan a8d3a4d218 Add missing L10n::popLang calls 2018-10-20 09:02:10 -04:00
Michael Vogel 389685e099
Merge pull request #5920 from MrPetovan/bug/remove-password-from-register
Avoid storing plaintext password in register table
2018-10-17 21:04:11 +02:00
Hypolite Petovan 481b0ac138 Fix notices in include/enotify 2018-10-15 23:13:00 -04:00
Hypolite Petovan 7f143c3159 Fix various spelling mistakes 2018-10-14 11:32:54 -04:00
Philipp Holzer 5a02e39a65
Rename App Methods
- renamed a lot of App methods to CamelCase
- replaced direct public variables with get-/set-Methods
2018-10-10 00:16:06 +02:00
Michael 5250552fe2 Removed obsolete post update that sometimes never finishes 2018-09-02 17:48:25 +00:00
Michael Vogel cf6140e86f Ensure that the post update doesn't end prematurely (#5684) 2018-08-28 07:56:25 -04:00
Roland Häder 61693419e8 Cleanups: isResult() more used, readability improved (#5608)
* [diaspora]: Maybe SimpleXMLElement is the right type-hint?

* Changes proposed + pre-renaming:
- pre-renamed $db -> $connection
- added TODOs for not allowing bad method invocations (there is a
  BadMethodCallException in SPL)

* If no record is found, below $r[0] will fail with a E_NOTICE and the code
doesn't behave as expected.

* Ops, one more left ...

* Continued:
- added documentation for Contact::updateSslPolicy() method
- added type-hint for $contact of same method
- empty lines added + TODO where the bug origins that $item has no element 'body'

* Added empty lines for better readability

* Cleaned up:
- no more x() (deprecated) usage but empty() instead
- fixed mixing of space/tab indending
- merged else/if block goether in elseif() (lesser nested code blocks)

* Re-fixed DBM -> DBA switch

* Fixes/rewrites:
- use empty()/isset() instead of deprecated x()
- merged 2 nested if() blocks into one
- avoided nested if() block inside else block by rewriting it to elseif()
- $contact_id is an integer, let's test on > 0 here
- added a lot spaces and some empty lines for better readability

* Rewrite:
- moved all CONTACT_* constants from boot.php to Contact class

* CR request:
- renamed Contact::CONTACT_IS_* -> Contact::* ;-)

* Rewrites:
- moved PAGE_* to Friendica\Model\Profile class
- fixed mixure with "Contact::* rewrite"

* Ops, one still there (return is no function)

* Rewrite to Proxy class:
- introduced new Friendica\Network\Proxy class for in exchange of proxy_*()
  functions
- moved also all PROXY_* constants there as Proxy::*
- removed now no longer needed mod/proxy.php loading as composer's auto-load
  will do this for us
- renamed those proxy_*() functions to better names:
  + proxy_init()           -> Proxy::init()         (public)
  + proxy_url()            -> Proxy::proxifyUrl()   (public)
  + proxy_parse_html()     -> Proxy::proxifyHtml()  (public)
  + proxy_is_local_image() -> Proxy::isLocalImage() (private)
  + proxy_parse_query()    -> Proxy::parseQuery()   (private)
  + proxy_img_cb()         -> Proxy::replaceUrl()   (private)

* CR request:
- moved all PAGE_* constants to Friendica\Model\Contact class
- fixed all references of both classes

* Ops, need to set $a here ...

* CR request:
- moved Proxy class to Friendica\Module
- extended BaseModule

* Ops, no need for own instance of $a when self::getApp() is around.

* Proxy-rewrite:
- proxy_url() and proxy_parse_html() are both non-module functions (now
  methods)
- so they must be splitted into a seperate class
- also the SIZE_* and DEFAULT_TIME constants are both not relevant to module

* No instances from utility classes

* Fixed error:
- proxify*() is now located in `Friendica\Util\ProxyUtils`

* Moved back to original place, ops? How did they move here? Well, it was not
intended by me.

* Removed duplicate (left-over from split) constants and static array. Thank to
MrPetovan finding it.

* Renamed ProxyUtils -> Proxy and aliased it back to ProxyUtils.

* Rewrite:
- stopped using deprecated NETWORK_* constants, now Protocol::* should be used
- still left them intact for slow/lazy developers ...

* Ops, was added accidentally ...

* Ops, why these wrong moves?

* Ops, one to much (thanks to MrPetovan)

* Ops, wrong moving ...

* moved back to original place ...

* spaces added

* empty lines add for better readability.

* convertered spaces -> tab for code indenting.

* CR request: Add space between if and brace.

* CR requests fixed + move reverted
- ops, src/Module/*.php has been moved to src/Network/ accidentally
- reverted some parts in src/Database/DBA.php as pointed out by Annando
- removed internal TODO items
- added some spaces for better readability
2018-08-24 01:05:49 -04:00
Michael Vogel dc3d2d5988 "dba" is now "DBA". This hadn't been respected at some places (#5655)
* "dba" is now "DBA". This hadn't been respected at some places

* Cleaning up unneeded stuff
2018-08-23 09:51:58 -04:00
Michael Vogel 16a081871c Improved profile page, improved "limit" handling (#5639)
* Improved profile page, improved "limit" handling

* Update will now work again

* Update will work now
2018-08-20 06:26:05 +02:00
Roland Häder e06fc2aa69 Stopped using deprecated constants NETWORK_* (#5537)
* Rewrite:
- stopped using deprecated NETWORK_* constants, now Protocol::* should be used
- still left them intact for slow/lazy developers ...

* Removed deprecated NETWORK_* constants as per code reviewer's request.
2018-08-11 22:40:44 +02:00
Michael 5037f9c460 Console script to ensure that all post updates are finished 2018-08-10 21:20:25 +00:00
Michael Vogel c032011143 Post update script for setting the uri-id (#5573)
* Post update is working now

* Changed text.
2018-08-06 18:40:41 +02:00
Michael Vogel 810c108297 Fix: Notes can be posted again. Never use "defaults" with "false" (#5551) 2018-08-04 16:06:36 +02:00
Hypolite Petovan 6a6695b167 Change DBStructure::definition to use config/dbstructure.json 2018-08-04 13:24:04 +02:00
Michael Vogel 489d3daa94 Trying to clean up a little bit more (#5517)
* "post-type" replaces "bookmark" and "type"

* The permission set is now removed upon expiry

* Post update now stores the permission set

* We don't store the permissions in the item table anymore

* Postupdate now handles "postopts" as well

* "post-type" replaces "bookmark" and "type"

* "post-type" replaces "bookmark" and "type"

* "post-type" replaces "bookmark" and "type"

* The permission set is now removed upon expiry

* The permission set is now removed upon expiry

* We don't store the permissions in the item table anymore

* Postupdate now handles "postopts" as well

* Multiplicated update functions

* And some more duplicated functions ...

* Removed duplicate functions
2018-07-28 16:04:56 -04:00
Michael Vogel 36d4516e7a Missing stuff in "develop"? (#5516)
* "post-type" replaces "bookmark" and "type"

* Removed some more type

* Added index to permission set

* The permission set is now stored

* The permission set is now removed upon expiry

* Post update now stores the permission set

* New file

* Permissions are now sorted

* The permission set is now used for item permissions

* Check for allow_cid, ... is superfluous. Checking for "private" is enough

* We query the permissionset

* Permissions are displayed correctly

* Changed index

* We don't store the permissions in the item table anymore

* Permission fields are now deprecated

* Reversed ...

* Postupdate now handles "postopts" as well

* Set deprecated fields to "null" if empty

* Postupdates are enabled again

* "post-type" replaces "bookmark" and "type"

* The permission set is now stored

* The permission set is now removed upon expiry

* Postupdate now handles "postopts" as well
2018-07-28 13:11:46 -04:00
Michael Vogel 5f77e98d76 Postupdate is now working again (#5512)
* "post-type" replaces "bookmark" and "type"

* Removed some more type

* Added index to permission set

* The permission set is now stored

* The permission set is now removed upon expiry

* Post update now stores the permission set

* New file

* Permissions are now sorted

* The permission set is now used for item permissions

* Check for allow_cid, ... is superfluous. Checking for "private" is enough

* We query the permissionset

* Permissions are displayed correctly

* Changed index

* We don't store the permissions in the item table anymore

* Permission fields are now deprecated

* Reversed ...

* Postupdate now handles "postopts" as well

* Set deprecated fields to "null" if empty

* Postupdates are enabled again
2018-07-27 19:24:26 -04:00
Michael Vogel 986106a8f7 Item storage: Permissions aren't stored in the items anymore (#5495)
* The permission set is now used for item permissions

* Check for allow_cid, ... is superfluous. Checking for "private" is enough

* We query the permissionset

* Permissions are displayed correctly

* Changed index

* We don't store the permissions in the item table anymore

* Permission fields are now deprecated

* Reversed ...
2018-07-25 19:14:55 -04:00
Hypolite Petovan a6fb3568f9 Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
Hypolite Petovan d3a598f589 Update DBA::escape to match dbesc() 2018-07-23 15:13:42 -04:00
Hypolite Petovan 538b81d10d Delete Database\DBM class file 2018-07-23 11:04:15 -04:00
Hypolite Petovan aa26943f92 Rename DBA::esc_array to DBA::escapeArray
- Rename internal method DBA::esc_array_callback to
DBA::escapeArrayCallback
2018-07-23 11:04:15 -04:00
Hypolite Petovan ecea7425f8 Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
Hypolite Petovan 0ec44f3e8a Rename DBM method calls to DBA method calls 2018-07-23 11:02:24 -04:00
Hypolite Petovan 8ddb94ef06 Use DateTimeFormat::utc() instead of DBM::date() 2018-07-23 10:57:47 -04:00
Hypolite Petovan c55e389bbc Add Database\DBM methods to Database\DBA 2018-07-23 10:57:47 -04:00
Hypolite Petovan cdd8e4fd9d Rename DBA::get_db to DBA::getConnection
- Rename DBA::$db to DBA::$connection
2018-07-22 19:28:29 -04:00
Hypolite Petovan 415b982d39 Rename DBA::num_rows to DBA::numRows 2018-07-22 19:27:35 -04:00
Hypolite Petovan 1f2c0b98b5 Rename DBA::server_info to DBA::serverInfo 2018-07-22 19:27:35 -04:00