Commit Graph

25 Commits

Author SHA1 Message Date
Mikael Nordfeldth 1a9a8ea730 staticGet for sub-Managed_DataObject classes now calls parent
The parent class for our database objects, Managed_DataObject, has a
dynamically assigned class in staticGet which objects get put into,
leaving us with less code to do the same thing.

We will probably have to move away from the DB_DataObject 'staticGet'
call as it is nowadays deprecated.
2013-08-12 19:46:44 +02:00
Evan Prodromou bb0cf686df Pass null to Profile::profileInfo() 2013-06-08 21:12:29 -04:00
Evan Prodromou 806f7d439a Bad variable in Message::asActivity() 2013-06-08 21:07:51 -04:00
Evan Prodromou 96d7b68c50 Store direct messages as an activity 2013-06-08 17:54:27 -04:00
Evan Prodromou 9ca3c3d1c3 move core schema to class files 2011-08-22 17:52:02 -04:00
Brion Vibber 043f0ad152 URL shortening fix for direct messages: if we're going to shorten the text, shorten the rendered text too. 2010-12-02 13:59:51 -08:00
Brion Vibber aa96c3c1d9 Fix for tickets #2917, #2262: user URL shortening options not being applied in non-web channels
common_shorten_links() can only access the web session's logged-in user, so never properly took user options into effect for posting via XMPP, API, mail, etc.

Adds an optional $user parameter on common_shorten_links(), and a $user->shortenLinks() as a clearer interface for that.
Tweaked some lower-level functions so $user gets passed down -- making the $notice_id param previously there for saving URLs at notice save time generalized a little.

Note also ticket #2919: there's a lot of duplicate code calling the shortening, checking the length, and reporting near-identical error messages. These should be consolidated to aid in code and translation maintenance.
2010-12-02 13:41:56 -08:00
Siebrand Mazeland b03ece26eb * i18n/L10n and translator documentation updates.
* whitespace and indentation updates
2010-09-28 23:21:09 +02:00
Siebrand Mazeland 125ff142e8 * mark a few message for translation
* add translator documentation
2010-07-29 13:36:08 +02:00
Evan Prodromou 797a0d79fb create a method for notification for new messages, and use it 2009-12-15 10:31:25 -05:00
Evan Prodromou 440af7ed7a silenced users can't send direct messages 2009-11-16 19:51:41 +01:00
Evan Prodromou d88839d167 methods for Message to check max content length 2009-08-21 07:20:59 -04:00
Evan Prodromou 4b44308988 Messages can be >140c in classes 2009-08-21 06:33:21 -04:00
Evan Prodromou 04ef1ba8ee change function headers to K&R style
Another huge change, for PEAR code standards compliance. Function
headers have to be in K&R style (opening brace on its own line),
instead of having the opening brace on the same line as the function
and parameters. So, a little perl magic found all the function
definitions and move the opening brace to the next line (properly
indented... usually).

darcs-hash:20081223193323-84dde-a28e36ecc66672c783c2842d12fc11043c13ab28.gz
2008-12-23 14:33:23 -05:00
Evan Prodromou eb2f9c98ac replace NULL with null
Another global search-and-replace update. Here, I've replaced the PHP
keyword 'NULL' with its lowercase version. This is another PEAR code
standards change.

darcs-hash:20081223192129-84dde-4a0182e0ec16a01ad88745ad3e08f7cb501aee0b.gz
2008-12-23 14:21:29 -05:00
Evan Prodromou edbc0c665c replace all tabs with four spaces
The PEAR coding standards decree: no tabs, but indent by four spaces.
I've done a global search-and-replace on all tabs, replacing them by
four spaces. This is a huge change, but it will go a long way to
getting us towards phpcs-compliance. And that means better code
readability, and that means more participation.

darcs-hash:20081223191907-84dde-21e8efe210e6d5d54e935a22d0cee5c7bbfc007d.gz
2008-12-23 14:19:07 -05:00
millette ce08833303 shorten urls for posts > 140 chars only, from anywhere. Only show long urls in title attributes for links we shortened ourselves.
darcs-hash:20081128210114-099f7-4e4cde0a983c2ac6d41efb59b46cb7dbf45dc7a6.gz
2008-11-28 16:01:14 -05:00
Evan Prodromou 8da61dc1d3 path correct in require_once for memcached
darcs-hash:20080926161824-5ed1f-b4fb53e5ca65bb099aabbba6ea60a13496f669a2.gz
2008-09-26 12:18:24 -04:00
Evan Prodromou f6615f70e5 prepend Memcached_DataObject require with INSTALLDIR
darcs-hash:20080926161540-5ed1f-2e9dc6f2297c612208214a6d52f36ce0dd7aa4de.gz
2008-09-26 12:15:40 -04:00
Evan Prodromou e2e6bbb298 caching layer for DB/DataObject
I added a new class, Memcached_DataObject, that will (optionally)
fetch data out of a memcached server if it's available. This only
works on 'staticGet'.

Methods that write to the database (insert, update, delete) will clear
and set the cache correctly, too.

darcs-hash:20080926160941-5ed1f-922de078b4c1941853ad014edf9a17fae486f8cf.gz
2008-09-26 12:09:41 -04:00
Evan Prodromou a4cca01451 save created date
darcs-hash:20080917191652-5ed1f-f066e906146146cfe0ffb80055ea15d71f491f3c.gz
2008-09-17 15:16:52 -04:00
Evan Prodromou ea8fce0052 fix missing variable in save-new-message
darcs-hash:20080917190306-5ed1f-f2d339ce6d5c7c32940046012a0d4702be6eade2.gz
2008-09-17 15:03:06 -04:00
Evan Prodromou 130ba28886 newmessage and showmessage
darcs-hash:20080917174741-5ed1f-c090055487bab0df52d25ad6550d3850ef5f7661.gz
2008-09-17 13:47:41 -04:00
Evan Prodromou 7416e50daa inbox and outbox for direct messages
Added an inbox and outbox for direct messages.

Factored common code to mailbox.php. Factored common code with
stream.php to personal.php.

darcs-hash:20080916195346-84dde-b5c846f713a970c41fd1b0671cb333e91f3cb920.gz
2008-09-16 15:53:46 -04:00
Evan Prodromou d57b39e8a5 Database and classes for direct messages
darcs-hash:20080916185126-84dde-2983718fc2ab11874c839489290b8a827985274d.gz
2008-09-16 14:51:26 -04:00