Revisions for scry/vote.php

Location: [ Horde ] / scry / vote.php View: Logs | Branches | Statistics
Search Revisions:
Show diffs between and
Show Differences shows diffs to the previous revision. If you select a revision by clicking its row, Show Differences will show the differences to the selected row.
Show Branch:
  Revision Date Author Log Message
1.46 (+2 -2 lines) 04/15/2008 01:06 AM Chuck Hagenbuch chuck

- Use .html.php for view templates (or whatever format is appropriate, like .xml.php)
- simplify templates directory depth

1.45 (+2 -2 lines) 01/02/2008 06:13 AM Jan Schneider jan

Happy New Year

1.44 (+2 -1 lines) 11/26/2007 03:33 AM Duck duck

Include files missed by autoloader.

1.43 (+3 -11 lines) 11/24/2007 07:48 AM Duck duck

Show permission check is done in getPoll() already. Redirect to view results/comments page after voting.

1.42 (+9 -11 lines) 11/24/2007 07:00 AM Duck duck

- check if poll is existing directly in getPoll()
- use count() for hasVoted inseted selecting data
- avoid some warnings

1.41 (+8 -10 lines) 11/23/2007 09:35 PM Duck duck

First optimization step reducing the number of queries and simplify query types:
- use just one simple query in getPolls() as retrieving polls ID separated is not needed and choices are retrieved by getVotes()
- track choice count on vote instead of having a join query to get the choices count
- cannot find any usage of poll_results_to so remove it
- use div and CSS insted of requesting the server for the pixel.php colored image
- add a dedicated and cached get poll function (getPoll still is called when lisitng polls several times for every poll)
- make getVotes() statis as we get them in the poll list then again later when chekig individual poll actions in isEditabe()
- remove settings the group permission. poll_group was droped last year so the cast to set the group permission never occurs
- use scry_voted cookie even to reduce DB access in hasVoted()

Permissions
- Avoid permission check overhead for common poll show/read task by do not set the permission of every poll as default permission on poll creation time. Create the default permission only when you actually pass to the permission editing form. Check the default permissions in the Scry::hasPermission function for non existing permissions.

Demographics
- Added demographics.php config file to define demographics groups
- Added hook to detect user demographics group belonging
- Add a drop down to which display between demographics groups in poll view

Others changes:
- spited read support in sql driver
- template -> view
- php5 constants and function definitions
- replace deprecated is_a with interface of
- autoload

1.40 (+2 -2 lines) 01/02/2007 07:48 AM Jan Schneider jan

Happy New Year

1.39 (+5 -3 lines) 01/01/2007 07:41 PM Jan Schneider jan

Assign copyright to The Horde Project for those copyright holders that already agreed to it.

1.38 (+2 -2 lines) 11/30/2006 10:45 PM Chuck Hagenbuch chuck

Move forms to lib/Forms.

1.37 (+2 -1 lines) 11/30/2006 10:32 PM Chuck Hagenbuch chuck

include missing class.

1.36 (+2 -2 lines) 11/18/2006 01:58 AM Ben Klang bklang

* Standardized poll management links
* Changed $scry->isVotable() to accept a poll_id for API consistency
* Remove need to pass $votes to $scry->isEditable()
* Only allow group to be set on poll creation.  Further permissions editing will be done with a new UI

1.35 (+10 -1 lines) 11/17/2006 01:22 AM Ben Klang bklang

* Implement per-poll permissions
* Scry::isEditable() no longer returns true if the poll is closed
* Drop storage of the poll group in the SQL driver

ToDo: Allow existing polls' permissions to be edited by users with PERMS_EDIT.  Probably will reuse Perms_UI if possible.

1.34 (+7 -7 lines) 04/09/2006 08:02 PM Chuck Hagenbuch chuck

Remove unnecessary references and Horde_Form::singleton calls.

1.33 (+2 -2 lines) 01/01/2006 04:11 PM Jan Schneider jan

Happy new year\!

1.32 (+3 -3 lines) 05/18/2005 06:38 AM Jan Schneider jan

Fix viral method name typo.

1.31 (+2 -2 lines) 01/03/2005 09:35 AM Jan Schneider jan

Happy New Year

1.30 (+2 -2 lines) 11/03/2004 03:59 PM Chuck Hagenbuch chuck

Use new menus.

1.29 (+2 -2 lines) 10/18/2004 08:46 PM Chuck Hagenbuch chuck

Registry::getParam() -> Registry::get().

1.28 (+47 -71 lines) 08/24/2004 04:21 AM mdjukic

- separate out the inline block viewing from the regular vote script
- apply patch from Roel Gloudemans <roel@gloudemans.info>:
"Scry wasn't working from a giapeto block. The problem was that the page_id
parameter was missing from the url."

1.27 (+4 -8 lines) 06/11/2004 05:26 PM Chuck Hagenbuch chuck

Fix form behavior when the form isn't valid.

1.26 (+2 -2 lines) 04/07/2004 10:43 AM Chuck Hagenbuch chuck

No more HORDE_LIBS.

1.25 (+3 -2 lines) 02/26/2004 08:02 AM eraserhd

* Use Variables::getDefaultVariables() instead of Horde_Form::getDefaultVars()
* Delete Horde_Form::getDefaultVars()
* Make sure that appropriate files require 'Horde/Variables.php'

1.24 (+5 -5 lines) 02/25/2004 11:19 PM eraserhd

* Delete Horde_Form_Vars::, use Variables:: instead.
* Delete Horde_Form_Renderer_rows::, was only used by Hermes and depends on
Horde_Form_Vars:: cruft.

1.23 (+2 -2 lines) 01/17/2004 05:57 PM Jan Schneider jan

All footers look the same, so why not use only one.

1.22 (+2 -2 lines) 01/01/2004 10:16 AM Jan Schneider jan

Happy new year everyone.

1.21 (+2 -3 lines) 11/22/2003 08:44 PM Chuck Hagenbuch chuck

Re-work how we handle custom form renderers, and hopefully make them a bit
easier to use/more useful.

Horde_Form_Renderer::_renderForm() no longer bails out with a custom renderer
and calls a render() method, which doesn't actually exist in the base class.
Instead, there is a Horde_Form::getRenderer() method (which replaces
Horde_Form::getCustomRenderer()) that simply returns the correct renderer
for the form. You then just use that instead of $renderer = &new Horde_Form_Renderer()
- the base class will return a basic Horde_Form_Renderer for you.

In the custom form renderer class itself, you just extend the Horde_Form_Renderer
class and override any methods that you want to alter, instead of necessarily
having to re-write the whole render() loop.

I've updated every occurrance of any of this code that I can find to take
advantage of this new architecture, and made a few minor tweaks while I
was at it. Also, some phpdoc comments for the custom renderer stuff.

1.20 (+1 -5 lines) 11/19/2003 04:29 PM Chuck Hagenbuch chuck

Make the poll showing block work again, and clean up the poll summary block.

1.19 (+3 -4 lines) 09/29/2003 07:32 AM mdjukic

don't default to formatted menu, generate full menu parts and use them in the templates

1.18 (+3 -3 lines) 09/18/2003 12:34 PM Jan Schneider jan

Class name changes. Missed that module completely.

1.17 (+5 -5 lines) 09/18/2003 09:11 AM mdjukic

fix class name

1.16 (+9 -8 lines) 07/10/2003 04:40 PM Chuck Hagenbuch chuck

- remove global $scry_template variable (helps avoid lots of scope problems)
- clean up blocks a bit
- shorten the polls summary display
- display better title in the poll block; still need to fix inlining and voting here.

1.15 (+7 -4 lines) 07/08/2003 12:32 PM Chuck Hagenbuch chuck

- page titles
- message if there aren't any polls
- string consistency

1.14 (+2 -3 lines) 07/07/2003 04:14 PM Chuck Hagenbuch chuck

- clean up vote checking
- allow a local scry admin

1.13 (+4 -4 lines) 05/23/2003 08:44 AM mdjukic

streamline the vote results view

1.12 (+4 -4 lines) 05/15/2003 05:15 PM mdjukic

since this file is used for blocks too, avoids the problem of returning  from a different form on the same page

1.11 (+47 -34 lines) 05/05/2003 01:54 PM mdjukic

- style
- use isVotable() and not hasVoted()
- error checking for invalid polls
- better error reporting when invalid poll and no poll available

1.10 (+4 -4 lines) 05/05/2003 10:29 AM mdjukic

check for isset of

1.9 (+61 -35 lines) 05/04/2003 06:38 PM mdjukic

set up this file for use when inlining, such as in horde blocks, clean up a lot the logic for displaying and processing the form, use  and SCRY_TEMPLATES

1.8 (+3 -6 lines) 04/05/2003 05:59 AM mdjukic

new horde_form syntax

1.7 (+3 -3 lines) 03/26/2003 09:41 PM mdjukic

use the new Form.php syntax for setting up variables

1.6 (+3 -3 lines) 02/20/2003 03:29 PM Chuck Hagenbuch chuck

More useful results for polls, some cleanup.

1.5 (+3 -3 lines) 02/02/2003 12:43 PM mdjukic

get rid of unneeded extra params when rendering inactive, style

1.4 (+6 -14 lines) 02/01/2003 07:34 PM mdjukic

some style cleaning and use the Scry::getResultsGraph

1.3 (+5 -5 lines) 01/29/2003 12:23 PM mdjukic

use better naming scheme for the backend

1.2 (+12 -1 lines) 01/22/2003 12:16 PM mdjukic

add notify where missing and start putting in some proper standardised headers

1.1 01/21/2003 11:29 PM mdjukic

the voting script