- Timestamp:
- Nov 20, 2009, 10:56:32 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/event_cats/include/evntcats_main_funcs.inc.php
r4282 r4329 180 180 */ 181 181 function build_ec_addp() { 182 global $ec_lists , $ec_ap_ok;183 if ( $ec_ap_ok) {182 global $ec_lists; 183 if (EC_AP_OK) { 184 184 $res = pwg_query("SELECT `id`, `title` FROM `".ADD_PAGES_TABLE."`"); 185 185 while ($r = mysql_fetch_assoc($res)) { … … 244 244 */ 245 245 function build_ec_table() { 246 global $ec_lists , $ec_ap_ok;246 global $ec_lists; 247 247 248 248 $q = pwg_query(" … … 287 287 case 2: // Additional Page 288 288 if ( 289 $ec_ap_okand (289 EC_AP_OK and ( 290 290 is_in($ec_entry['action'], 'ec_ok') or 291 291 $ec_entry['action'] == 'ec_nok' … … 322 322 function build_ec_lists() { 323 323 324 global $ec_ap_ok, $template, $ec_lists, $conf;325 326 324 // Construction of $ec_lists['add_pages'] array var 327 325 build_ec_addp(); … … 373 371 FROM ".EVNTCATS_TABLE." 374 372 WHERE `code` IS NULL 375 AND `arg1` = '1'373 AND `arg1` = 1 376 374 AND `arg2` IS NOT NULL 377 375 ;", … … 385 383 array_from_query(" 386 384 SELECT `arg2` 387 FROM ".EVNTCATS_TABLE."385 FROM `".EVNTCATS_TABLE."` 388 386 WHERE `code` IS NULL 389 AND `arg1` = '2'387 AND `arg1` = 2 390 388 AND `arg2` IS NOT NULL 391 389 ;", … … 400 398 $users_granted_ids = array(); 401 399 400 $c = (count($t = mysql_fetch_row(pwg_query(" 401 SELECT `arg2` 402 FROM `".EVNTCATS_TABLE."` 403 WHERE `code` IS NULL 404 AND `arg1` = 3 405 AND `arg2` IS NOT NULL 406 LIMIT 1; 407 "))) == 0) ? 0 : intval($t[0]); 408 402 409 $users_granted_thks_gen_ids = array(); 403 if ($ec_gen_granted = ( read_ec_conf('duplic_gen') != '0')) {410 if ($ec_gen_granted = (($c & 8) != 0)) { 404 411 $users_granted_thks_gen_ids = order_by_name( 405 412 array_diff( … … 425 432 $types_granted_ids = array(); 426 433 $users_granted_thks_types_ids = array(); 427 $c = intval(read_ec_conf('duplic_type')); 428 if ($c != 0) { 434 if (($c & 7) != 0) { 429 435 if (($c & 1) != 0) $types_granted_ids[] = '1'; 430 436 if (($c & 2) != 0) $types_granted_ids[] = '2'; … … 547 553 // Returns an array which values are all the user_ids allowed to display a 548 554 // "duplicate" link. The keys of this array are strange (for direct allowed 549 // users, keys are usernames), but normallynot used555 // users, keys are usernames), but should not used 550 556 return $users_granted_ids; 551 557 } … … 561 567 */ 562 568 function dup_allowed($user_id) { 563 return true;569 return in_array($user_id, build_dup_arrays()); 564 570 } 565 571
Note: See TracChangeset
for help on using the changeset viewer.