Changeset 8956 for extensions/event_cats/maintain.inc.php
- Timestamp:
- Jan 28, 2011, 8:56:39 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/event_cats/maintain.inc.php
r7098 r8956 23 23 // +-----------------------------------------------------------------------+ 24 24 25 // Keeps file coded in UTF-8 without BOM : é25 // Keeps file coded in UTF-8 without BOM : é 26 26 27 27 // *********************************************************************** 28 // ** maintain.inc.php : Installation page for Piwigo plugin Event Cats**28 // ** maintain.inc.php : Installation page for Piwigo plugin Event Cats ** 29 29 // *********************************************************************** 30 30 … … 42 42 global $prefixeTable; 43 43 44 pwg_query(" 45 DELETE IGNORE FROM `".CONFIG_TABLE."` WHERE `param` = 'event_cats' LIMIT 1; 46 "); 44 pwg_query("DELETE FROM `".CONFIG_TABLE."` WHERE `param` = 'event_cats' LIMIT 1;"); 47 45 return pwg_query('DROP TABLE IF EXISTS `'.$prefixeTable.'event_cats`;'); 48 46 } … … 74 72 75 73 /* 76 Explanations on table structure :74 Explanations on table structure : 77 75 78 code : the code used as "autolog" argument. If thie code provided by the 79 visitor does not exist in the table, the administrator can choose 80 whether the visitor is redirected to the home page (nothing 81 happens) or to the "access denied" page; 82 user_id: the account concerned in following values; 83 action : the action to perform: 84 ec_nok: code disabled: account not logged in, visitor (guest) redirected 85 to an explaining Additional Page (arg2 field). If Additional Page 86 plugin is not activated, redirection to the "access denied" page; 87 ec_ok : code OK, account logged in. Redirection depends on arg1 and arg2 88 values. There are four cases: 89 arg1 and arg2 are both NULL: home page; 90 arg1 not NULL and arg2 NULL: category; 91 arg1 NULL and arg2 not NULL: Additional Page; 92 arg1 and arg2 both not NULL: Image page. 93 If arg1 is a valid category id, and arg2 is not a valid image id, 94 redirection to category. In all other cases where the arg1 or arg2 95 is not valid, redirection to home page. 96 arg1 : (described above); 97 arg2 : (described above); 98 forced : allows the administrator to impose that, for certain codes, the 99 settings specified in the database ("action", "arg1", "arg2") are 100 applied, whatever can be the arguments given in the URL; 101 comment: a reminder for the webmaster. 76 code : the code used as "autolog" argument. If thie code provided by the 77 visitor does not exist in the table, the administrator can choose 78 whether the visitor is redirected to the home page (nothing 79 happens) or to the "access denied" page ; 80 user_id : the account concerned in following values ; 81 action : the action to perform : 82 ec_nok : code disabled : account not logged in, visitor (guest) redirected 83 to an explaining Additional Page (arg2 field). If Additional Page 84 plugin is not activated, redirection to the "access denied" page ; 85 ec_ok : code OK, account logged in. Redirection depends on arg1 and arg2 86 values. There are four cases : 87 arg1 and arg2 are both NULL : home page ; 88 arg1 not NULL and arg2 NULL : category ; 89 arg1 NULL and arg2 not NULL : Additional Page ; 90 arg1 and arg2 both not NULL : Image page. 91 If arg1 is a valid category id, and arg2 is not a valid image id, 92 redirection to category. In all other cases where the arg1 or arg2 93 is not valid, redirection to home page. 94 arg1 : (described above) ; 95 arg2 : (described above) ; 96 forced : allows the administrator to impose that, for certain codes, the 97 settings specified in the database ("action", "arg1", "arg2") are 98 applied, whatever can be the arguments given in the URL. 102 99 103 * As a precision :100 * As a precision : 104 101 in the PHP code, the "action" can also have the following values, so to 105 display accurate messages in the admin page :106 ec_nok_action_pb : the same "code" is used in more than one entries in the107 DB (which is allowed) and is not always associated to108 the same action ('ec_ok' in one or more entries, and109 'ec_nok' in one or more other entries). This is110 confusing and makes impossible to log in using this111 code;112 ec_nok_userid_pb : the same "code" is used in more than one entries in the113 DB (which is allowed) and is not always associated to114 the same user id. This is confusing and makes115 impossible to log in using this code;116 ec_nok_userid_miss : the user id associated to this code does not exist in117 the user ids table;118 ec_nok_ap_pb : not valid Additional Page id -> access denied;119 ec_ok_ap_pb : not valid Additional Page id -> home page;120 ec_ok_cat_pb : not valid category id -> home page;121 ec_ok_img_pb : not valid image id -> category page;102 display accurate messages in the admin page : 103 ec_nok_action_pb : the same "code" is used in more than one entries in the 104 DB (which is allowed) and is not always associated to 105 the same action ('ec_ok' in one or more entries, and 106 'ec_nok' in one or more other entries). This is 107 confusing and makes impossible to log in using this 108 code ; 109 ec_nok_userid_pb : the same "code" is used in more than one entries in the 110 DB (which is allowed) and is not always associated to 111 the same user id. This is confusing and makes 112 impossible to log in using this code ; 113 ec_nok_userid_miss : the user id associated to this code does not exist in 114 the user ids table ; 115 ec_nok_ap_pb : not valid Additional Page id -> access denied ; 116 ec_ok_ap_pb : not valid Additional Page id -> home page ; 117 ec_ok_cat_pb : not valid category id -> home page ; 118 ec_ok_img_pb : not valid image id -> category page ; 122 119 123 120 _ the two main fields are "user_id" and "code", as the main purpose of the … … 127 124 _ though, even if "action", "user_id" and "code" are important, all of them 128 125 can be omitted (thus can be NULL), and both "user_id" and "code" can be 129 repeated (thus are not UNIQUE). This because :126 repeated (thus are not UNIQUE). This because : 130 127 _ the same code can automatically log in ("autolog") the same account 131 128 following several ways, depending on "cat", "img", and "ap" arguments of 132 the URL ; and thus different ways can be stored in the DB;129 the URL ; and thus different ways can be stored in the DB ; 133 130 _ a "disabled" code (the user tries to "autolog", but (s)he's not allowed 134 to) does not need a corresponding "user_id", thus "user_id" can be NULL ;131 to) does not need a corresponding "user_id", thus "user_id" can be NULL ; 135 132 _ "user_id" field is used to store groups ids when "code" is NULL, to 136 identify groups authorized to duplication ;133 identify groups authorized to duplication ; 137 134 _ "code" does not have the MySQL UNIQUE attribute, but it has to be unique 138 135 when the "forced" Event Cats parameter is true, which is the case when this
Note: See TracChangeset
for help on using the changeset viewer.