Raphaël Barrois [Fri, 19 Feb 2010 14:17:46 +0000 (15:17 +0100)]
Add new PlSubIterator
Creates a new "subiterator" when the result of a given callback changes
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Stéphane Jacob [Thu, 18 Feb 2010 17:51:32 +0000 (18:51 +0100)]
Moves makeForlife to PlUser.
Signed-off-by: Stéphane Jacob <sj@m4x.org>
Florent Bruneau [Tue, 16 Feb 2010 21:11:58 +0000 (22:11 +0100)]
Add map and filter functions on iterator.
PlIterator PlIteratorUtils::map(PlIterator $src, $callback);
PlIterator PlIteratorUtils::filter(PlIterator $src, $callback)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Tue, 16 Feb 2010 20:43:37 +0000 (21:43 +0100)]
Fix formatCustomOrder.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Raphaël Barrois [Tue, 16 Feb 2010 10:33:00 +0000 (11:33 +0100)]
Add XDB::formatCustomOrder (to create a custom order in an SQL query)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Florent Bruneau [Sun, 14 Feb 2010 19:49:45 +0000 (20:49 +0100)]
2010.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Sun, 14 Feb 2010 16:31:45 +0000 (17:31 +0100)]
Add PlImage, short wrapper to send images.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Sun, 14 Feb 2010 10:33:01 +0000 (11:33 +0100)]
Makes the $limit argument optional.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Raphaël Barrois [Fri, 12 Feb 2010 23:11:52 +0000 (00:11 +0100)]
Make PlSet data protected
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Raphaël Barrois [Wed, 10 Feb 2010 08:41:11 +0000 (09:41 +0100)]
Add XDB::formatWildcard
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Raphaël Barrois [Fri, 5 Feb 2010 15:36:06 +0000 (16:36 +0100)]
Fixes PlSet (orders weren't working)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Raphaël Barrois [Thu, 4 Feb 2010 22:45:54 +0000 (23:45 +0100)]
Use a working "ordering" system in PlSets...
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Raphaël Barrois [Thu, 4 Feb 2010 22:45:27 +0000 (23:45 +0100)]
Add folding, PFO_Random
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Raphaël Barrois [Thu, 4 Feb 2010 20:38:43 +0000 (21:38 +0100)]
Minor bugfixes
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Raphaël Barrois [Thu, 21 Jan 2010 00:54:47 +0000 (01:54 +0100)]
BugFixes in PlSet and PlFilter
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Raphaël Barrois [Wed, 20 Jan 2010 22:58:55 +0000 (23:58 +0100)]
Merge all plfilter-related files, and make it an include
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Raphaël Barrois [Wed, 20 Jan 2010 22:54:24 +0000 (23:54 +0100)]
Make PlSet PHP-compatible...
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Raphaël Barrois [Wed, 20 Jan 2010 16:15:23 +0000 (17:15 +0100)]
Imrpove API for PlSet, create abstract PlFilter
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Raphaël Barrois [Tue, 19 Jan 2010 21:39:08 +0000 (22:39 +0100)]
Add PlFilter, PFC, PFO
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Vincent Zanotti [Sun, 15 Nov 2009 23:05:38 +0000 (00:05 +0100)]
Merge commit 'origin/core-1.0.2' into core
Vincent Zanotti [Sat, 14 Nov 2009 23:53:18 +0000 (00:53 +0100)]
Allows addJsLink to be used for non-static Javascript.
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Vincent Zanotti [Fri, 13 Nov 2009 10:42:47 +0000 (11:42 +0100)]
Update ChangeLog
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Vincent Zanotti [Fri, 13 Nov 2009 10:38:55 +0000 (11:38 +0100)]
Update ChangeLog
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Vincent Zanotti [Mon, 9 Nov 2009 01:49:49 +0000 (02:49 +0100)]
Adds support for database table prefixes.
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Vincent Zanotti [Sun, 8 Nov 2009 21:20:58 +0000 (22:20 +0100)]
Serves javascript file from a per-version directory, to prevent cross-version caching issues.
Also normalizes the javascript inclusion, moving the common ones to PlPage implementations (prepares the upcoming javascript minimization).
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Vincent Zanotti [Sun, 8 Nov 2009 19:18:49 +0000 (20:18 +0100)]
Update ChangeLog
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Vincent Zanotti [Sun, 8 Nov 2009 03:37:09 +0000 (04:37 +0100)]
Factorizes the content type / content cache headers, and improves caching of static resources.
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Stéphane Jacob [Mon, 21 Sep 2009 15:07:07 +0000 (17:07 +0200)]
Typo.
Stéphane Jacob [Mon, 14 Sep 2009 21:10:45 +0000 (23:10 +0200)]
A foreign email address has to be valid to be added to a ML.
Stéphane Jacob [Thu, 30 Jul 2009 22:21:40 +0000 (00:21 +0200)]
[@attribute] has been replaced by [attribute] in jQuery.
Vincent Zanotti [Thu, 30 Jul 2009 15:13:21 +0000 (17:13 +0200)]
Update ChangeLog
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Vincent Zanotti [Thu, 30 Jul 2009 15:09:22 +0000 (17:09 +0200)]
Updates the ChangeLog for the next release.
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Stéphane Jacob [Mon, 27 Jul 2009 21:10:18 +0000 (23:10 +0200)]
Prevents a file_get_contents warning when retrieving sql errors.
Raphaël Barrois [Tue, 21 Jul 2009 15:17:28 +0000 (17:17 +0200)]
Fix bug in PlUser::getSilentWithUID
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Raphaël Barrois [Tue, 21 Jul 2009 15:16:45 +0000 (17:16 +0200)]
Finish migration of "promo" field to X.org User class
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Stéphane Jacob [Thu, 16 Jul 2009 21:19:41 +0000 (23:19 +0200)]
Typo.
Stéphane Jacob [Tue, 7 Jul 2009 15:15:40 +0000 (17:15 +0200)]
Adds Xelnor to the authors.
Raphaël Barrois [Tue, 30 Jun 2009 10:26:15 +0000 (12:26 +0200)]
Remove X.org-specific "promo" field from PlUser
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Stéphane Jacob [Mon, 29 Jun 2009 05:46:51 +0000 (07:46 +0200)]
Oooops: typo.
Stéphane Jacob [Sun, 28 Jun 2009 23:11:05 +0000 (01:11 +0200)]
Fixes display of sql errors.
Stéphane Jacob [Sat, 27 Jun 2009 15:22:15 +0000 (17:22 +0200)]
Modifies plwizzard for showing a confirmation message when the profile is modified.
Vincent Zanotti [Wed, 17 Jun 2009 21:01:44 +0000 (23:01 +0200)]
Merge commit 'origin/core-1.0.0' into core
Vincent Zanotti [Wed, 17 Jun 2009 20:57:35 +0000 (22:57 +0200)]
Fixes the display of our favicon.
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Vincent Zanotti [Wed, 17 Jun 2009 00:13:03 +0000 (02:13 +0200)]
Removes an unused statement.
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Vincent Zanotti [Mon, 15 Jun 2009 18:41:10 +0000 (20:41 +0200)]
Removes the deprecated S::has_perms method (not used anymore in master).
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Vincent Zanotti [Wed, 27 May 2009 14:31:31 +0000 (16:31 +0200)]
Updates the "catch-all mode" to allow the owner to specify the catch-all address.
Also prevents this mode from being used in a production environment.
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Raphaël Barrois [Wed, 27 May 2009 13:57:58 +0000 (15:57 +0200)]
Adds support for "catchmail" config value
Set in [Core] section, forces all mails to be sent to admin_email instead of
the recipients defined by addTo, addCc, addBcc.
Useful for development purposes.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Vincent Zanotti [Sat, 23 May 2009 21:07:18 +0000 (23:07 +0200)]
Merge commit 'origin/core-1.0.0' into core
Vincent Zanotti [Sat, 23 May 2009 21:03:30 +0000 (23:03 +0200)]
Adds a "SECURITY" file which will list our security bugfixes.
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Vincent Zanotti [Mon, 20 Apr 2009 21:20:03 +0000 (23:20 +0200)]
Passes down the list of input-to-output relations to the field callback.
It allows this callback to actually use the input in a proper way (the first
parameter of the cb is the user input, which is improperly keyed).
Also make the getValue method public and static to simplify the computation
of output keys by the callbacks.
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Vincent Zanotti [Mon, 20 Apr 2009 19:58:23 +0000 (21:58 +0200)]
Revert "Updates the CSVImporter so that callbacks for cell generation have
access to values that are already available."
Fix was worse than the original issue, as the getValue method is used in two
completely different ways in makeRequestArgs and makeAssoc.
This reverts commit
82ccb5452cd953d71c49e0075d9ecbbb2f6b5456.
Florent Bruneau [Sun, 22 Feb 2009 21:35:32 +0000 (22:35 +0100)]
Accept User and Profile object as condition.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Vincent Zanotti [Fri, 10 Apr 2009 00:04:28 +0000 (02:04 +0200)]
Merge commit 'origin/core-1.0.0' into core
Vincent Zanotti [Thu, 9 Apr 2009 23:59:55 +0000 (01:59 +0200)]
Updates the CSVImporter so that callbacks for cell generation have access to values that are already available.
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Florent Bruneau [Sat, 14 Feb 2009 17:43:32 +0000 (18:43 +0100)]
Add a 'flat' mode to PlArrayIterator.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Sat, 14 Feb 2009 17:16:19 +0000 (18:16 +0100)]
Helper function to format some queries.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Sun, 1 Feb 2009 15:48:08 +0000 (16:48 +0100)]
Add a parameter to allow recompilation of templates that changed when not
in debug mode.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Sun, 1 Feb 2009 13:16:08 +0000 (14:16 +0100)]
Fix another notice.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Sun, 1 Feb 2009 13:13:11 +0000 (14:13 +0100)]
Fix a notice.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Tue, 27 Jan 2009 21:36:49 +0000 (22:36 +0100)]
Add PlDict that wraps an array and exposes the same API than Get:: Post::,
Env::, Session::.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Tue, 27 Jan 2009 21:20:30 +0000 (22:20 +0100)]
Add a small prefilter on plpage to avoid notices when using {if $machin}
Just write {if t($machin)} to avoid the notice.
WARN: only works with pattern {if t(...)}, don't try {if t(...) || t(...)}
(or improve the regexp :).
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Tue, 27 Jan 2009 21:00:32 +0000 (22:00 +0100)]
Hum...
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Wed, 21 Jan 2009 12:34:55 +0000 (13:34 +0100)]
Can use a User object in addTo, setFrom...
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Stéphane Jacob [Tue, 20 Jan 2009 21:00:36 +0000 (22:00 +0100)]
Adds killError, etc like trigError, etc.
Stéphane Jacob [Tue, 20 Jan 2009 20:39:55 +0000 (21:39 +0100)]
Alignment.
Stéphane Jacob [Tue, 20 Jan 2009 20:13:23 +0000 (21:13 +0100)]
Gives nicer display to the MySQL errors gathering page.
Florent Bruneau [Mon, 12 Jan 2009 10:46:15 +0000 (11:46 +0100)]
Happy New Year
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Tue, 6 Jan 2009 21:35:04 +0000 (22:35 +0100)]
Triggers must be displaid when page is loaded via ajax.
Can configure ajax animation.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Tue, 6 Jan 2009 20:25:17 +0000 (21:25 +0100)]
Add 'userdata' in PlWizard.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Mon, 5 Jan 2009 22:25:07 +0000 (23:25 +0100)]
Add Platal::notAllowed().
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Mon, 5 Jan 2009 20:16:29 +0000 (21:16 +0100)]
Merge commit 'origin/core-1.0.0' into core
Florent Bruneau [Sun, 4 Jan 2009 20:11:09 +0000 (21:11 +0100)]
Don't reload jquery here.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Vincent Zanotti [Sat, 3 Jan 2009 13:32:22 +0000 (14:32 +0100)]
Adds type information to the subclass-defined method 'fetch' of PlFeed, to ensure subclasses are considering $user as an object and not as an id.
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
Florent Bruneau [Tue, 30 Dec 2008 21:54:09 +0000 (22:54 +0100)]
Add a special abstract method PlUser::password(): we want to be able to
fetch the password of a user but we don't want to store this password
in the session (or whatever).
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Tue, 30 Dec 2008 17:12:07 +0000 (18:12 +0100)]
Add helper methods User::getWithUID and User::getSilentWithUID.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Tue, 30 Dec 2008 17:10:31 +0000 (18:10 +0100)]
Add PlMailer::sendTo($user).
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Mon, 29 Dec 2008 21:31:59 +0000 (22:31 +0100)]
Make conditional flag addition lighter to write:
Was:
if ($cond) {
$flag->addFlag('myflag');
}
Now:
$flag->addFlag('myflag', $cond);
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Sun, 28 Dec 2008 20:46:36 +0000 (21:46 +0100)]
Assign platal in _run.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Sat, 27 Dec 2008 23:09:06 +0000 (00:09 +0100)]
XDB improvements.
Added methods to XDB namespace:
* XDB::fetchOne(Row|Assoc|Cell)
* XDB::fetchAll(Row|Assoc)
* XDB::fetchColumn
fetchAll(Row|Assoc) now take 2 optional arguments:
* a column to use as the as the key of the returned object
* a flag telling whether we allow simplification of the returned array if a key is defined and only one other column remain
e.g.:
$fids = XDB::fetchAllAssoc('name', 'SELECT fid, name FROM forums');
-> array('xorg.general' => '1', 'xorg.promo.x2003' => '2', ...)
$fids = XDB::fetchAllAssoc('name', true, 'SELECT fid, name FROM forums');
-> array('xorg.general' => array('fid' => '1'),
'xorg.promo.x2003' => array('fid => '2'), ...)
$fnames = XDB::fetchAllAssoc('fid', 'SELECT fid, name FROM forums');
-> array('1' => 'xorg.general', '2' => 'xorg.promo.2003', ...);
$f = XDB::fetchAllAssoc('SELECT fid, name FROM forums');
-> array(array('fid' => '1', 'name' => 'xorg.general'),
array('fid' => '2', 'name' => 'xorg.promo.x2003'),
...)
Note: Optional arguments given to XDB::fetch... MUST be given before the
query.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Fri, 26 Dec 2008 20:29:27 +0000 (21:29 +0100)]
Allow can set debug mode at runtime.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Tue, 23 Dec 2008 10:54:22 +0000 (11:54 +0100)]
Handler get_rights is not in the core module anymore.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Tue, 23 Dec 2008 10:12:18 +0000 (11:12 +0100)]
Add XDB::format() that build a string using XDB format:
$str = XDB::format('machin {?}', $arg);
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Mon, 22 Dec 2008 22:07:31 +0000 (23:07 +0100)]
A module can redefine a previously defined handler.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Mon, 22 Dec 2008 21:27:11 +0000 (22:27 +0100)]
Add S::suid() to get suid informations. Add S::admin() (deprecates S::has_perms()).
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Mon, 22 Dec 2008 20:55:36 +0000 (21:55 +0100)]
Move DummyLogger in its own file.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Mon, 22 Dec 2008 16:46:07 +0000 (17:46 +0100)]
Allow session informations to override the result of check_perms. In that
case, display a message.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Mon, 22 Dec 2008 16:36:32 +0000 (17:36 +0100)]
Some API breakage:
* plsession officially contains an abstract *protected* method named makePerms.
* startSUID takes an optionnal argument with destination permission level.
* Adds S::b($key) to get a session variable as a boolean.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Sun, 21 Dec 2008 23:04:26 +0000 (00:04 +0100)]
Checks the current logger is still valid in S::logger().
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Sun, 21 Dec 2008 22:16:30 +0000 (23:16 +0100)]
Add support for 'secure' cookies (https only, not accessible via
javascript).
Keep in mind this is just a hint given to the browser.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Sun, 21 Dec 2008 18:05:13 +0000 (19:05 +0100)]
Cookie management using Cookie:: class.
* Cookie::set() to set a cookie for a given number of days.
* Cookie::kill() to kill a cookie.
Both methods change the value of the cookie both remotely (cookie stored by
the browser) and locally ($_COOKIE and Cookie::).
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Vincent Zanotti [Sun, 21 Dec 2008 14:54:16 +0000 (15:54 +0100)]
Removes compatibility with non-hruid code (please use core-1.0.0 for non-hruid-compatible code).
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
Florent Bruneau [Sun, 21 Dec 2008 14:48:31 +0000 (15:48 +0100)]
Merge commit 'origin/core-1.0.0' into core
Vincent Zanotti [Sun, 21 Dec 2008 14:13:17 +0000 (15:13 +0100)]
Adds support for disallowed URIs in plat/al's configuration, which are translated into the robots.txt file.
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
Florent Bruneau [Sat, 20 Dec 2008 17:12:34 +0000 (18:12 +0100)]
Merge commit 'origin/core-1.0.0' into core
Florent Bruneau [Sat, 20 Dec 2008 17:05:47 +0000 (18:05 +0100)]
Log SQL errors.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Thu, 18 Dec 2008 22:31:25 +0000 (23:31 +0100)]
Merge commit 'origin/core-1.0.0' into core
Florent Bruneau [Thu, 18 Dec 2008 22:26:11 +0000 (23:26 +0100)]
Critical: Permissions were not correctly checked before fetching wiki pages.
*All wiki pages where public since last release*
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Thu, 11 Dec 2008 22:07:54 +0000 (23:07 +0100)]
Merge branch 'core-1.0.0' into core
Florent Bruneau [Thu, 11 Dec 2008 22:07:06 +0000 (23:07 +0100)]
Prepare changelog for next version.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Florent Bruneau [Thu, 11 Dec 2008 22:03:58 +0000 (23:03 +0100)]
Fix cache management of the wiki.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>