Commit Graph

27 Commits

Author SHA1 Message Date
Mikael Nordfeldth
2a4dc77a63 The overloaded DB_DataObject function staticGet is now called getKV
I used this hacky sed-command (run it from your GNU Social root, or change the first grep's path to where it actually lies) to do a rough fix on all ::staticGet calls and rename them to ::getKV

   sed -i -s -e '/DataObject::staticGet/I!s/::staticGet/::getKV/Ig' $(grep -R ::staticGet `pwd`/* | grep -v -e '^extlib' | grep -v DataObject:: |grep -v "function staticGet"|cut -d: -f1 |sort |uniq)

If you're applying this, remember to change the Managed_DataObject and Memcached_DataObject function definitions of staticGet to getKV!

This might of course take some getting used to, or modification fo StatusNet plugins, but the result is that all the static calls (to staticGet) are now properly made without breaking PHP Strict Standards. Standards are there to be followed (and they caused some very bad confusion when used with get_called_class)

Reasonably any plugin or code that tests for the definition of 'GNUSOCIAL' or similar will take this change into consideration.
2013-08-18 13:13:56 +02:00
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
9ca3c3d1c3 move core schema to class files 2011-08-22 17:52:02 -04:00
Siebrand Mazeland
9587f9f55b * i18n/L10n and translator documentation updates.
* whitespace and indentation updates
2010-09-28 23:42:18 +02:00
Siebrand Mazeland
125ff142e8 * mark a few message for translation
* add translator documentation
2010-07-29 13:36:08 +02:00
Brion Vibber
b771a8bb21 Fix regression in remote subscription; added hasRole() shadow method on Remote_profile.
DB_DataObject hides errors by silently returning null for any non-existent method call, making it harder to tell what the heck's going on... the rights check for blocked remote users returned null for the check for subscribe rights, thus eval'ing to false. We now log a note in this circumstance, which would have cut about 3 hours off of the debug time.
2009-11-25 22:23:21 +00:00
Evan Prodromou
df86aa7214 define LACONICA and accept LACONICA for backwards compatibility 2009-08-26 10:41:36 -04:00
Evan Prodromou
865b716f09 change LACONICA to STATUSNET 2009-08-25 18:42:34 -04:00
Evan Prodromou
4737563b95 a distributed -> the distributed 2009-08-25 18:14:12 -04:00
Evan Prodromou
c8b8f07af1 change Laconica and Control Yourself to StatusNet in PHP files 2009-08-25 18:12:20 -04:00
Evan Prodromou
aec6456c91 Update copyright dates in files modified in 2009 2009-06-20 16:12:55 -07:00
Evan Prodromou
793a6a1155 change Controlez-Vous to Control Yourself 2009-06-20 16:00:04 -07: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
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
499afd8c22 replies from people you're not subscribed to over Jabber
darcs-hash:20080715195513-84dde-454419c971015be385d9c4c35f7acbee419031f9.gz
2008-07-15 15:55:13 -04:00
Mike Cochrane
4b656f47df Merge conflicts and kill a whole lot of trailing whitespace on lines.
darcs-hash:20080709224630-533db-b5399baef280133858dac9b89c2cd6a2aba9f861.gz
2008-07-09 18:46:30 -04:00
Evan Prodromou
7979176e14 generate classes for db schema with URIs
darcs-hash:20080522184109-84dde-0d13fc6890f85613554f5dd64b1baa67bbcaa8f6.gz
2008-05-22 14:41:09 -04:00
Evan Prodromou
46b3f1c3a7 remove validation code
darcs-hash:20080521110253-84dde-e8d6f62225bb56f5e08b28b35d23ccfbe56984fd.gz
2008-05-21 07:02:53 -04:00
Evan Prodromou
52600ce0b0 trim whitespace
darcs-hash:20080520191412-84dde-a607dbe848279639630edd1ab4616d05cc2318d1.gz
2008-05-20 15:14:12 -04:00
Evan Prodromou
5d1a6f0fef add validation methods to classes
darcs-hash:20080520185756-84dde-290bc12cddfc1738a96385e95821d466eff11196.gz
2008-05-20 14:57:56 -04:00
Evan Prodromou
3b14b7901c fixes to make it all lint
Ran everything through php -l, found out that it didn't compile.

So: fixed the am-I-running-in-Laconica check at the top of each file.
Some syntax fixes in shownotice, showstream, common.

darcs-hash:20080517154701-84dde-8d38da89c5b9cb3b40704adb04a4de880c204181.gz
2008-05-17 11:47:01 -04:00
Evan Prodromou
b6cfd2dffe license block for source code
Added GNU Affero GPL license block to source code.

Added name "LACONICA". I think it should work fine.

darcs-hash:20080514192648-84dde-a430dc438a4e3741c62ccf30ee7f85ecc968b159.gz
2008-05-14 15:26:48 -04:00
Evan Prodromou
0036795582 deny access to include files
darcs-hash:20080514190009-84dde-30f0f1b5955d71cd85563e12078ab02bf8645524.gz
2008-05-14 15:00:09 -04:00
Evan Prodromou
0fa97d6e2e add data objects
darcs-hash:20080507171542-84dde-232baccc10f015e8c0e80edf0ceea4aa5c85b4b7.gz
2008-05-07 13:15:42 -04:00