Révision a2baadd1
Ajouté par Assos Assos il y a environ 10 ans
drupal7/sites/all/modules/cas/cas.admin.inc | ||
---|---|---|
310 | 310 |
), |
311 | 311 |
), |
312 | 312 |
); |
313 |
|
|
313 | 314 |
$form['advanced']['cas_proxy_settings']['cas_pgtformat'] = array( |
314 | 315 |
'#type' => 'radios', |
315 | 316 |
'#title' => t('CAS PGT storage file format'), |
316 | 317 |
'#default_value' => variable_get('cas_pgtformat', 'plain'), |
317 | 318 |
'#options' => array('plain' => t('Plain Text'), 'xml' => t('XML')), |
319 |
'#after_build' => array('cas_pgtformat_version_check'), |
|
318 | 320 |
); |
319 | 321 |
|
320 | 322 |
$form['advanced']['cas_proxy_settings']['cas_pgtpath'] = array( |
... | ... | |
325 | 327 |
'#description' => t("Only needed if 'Use CAS proxy initializer' is configured. Leave empty for default."), |
326 | 328 |
); |
327 | 329 |
|
330 |
$form['advanced']['cas_proxy_list'] = array( |
|
331 |
'#type' => 'textarea', |
|
332 |
'#title' => t('CAS proxy list'), |
|
333 |
'#description' => t("If CAS client could be proxied, indicate each proxy server absolute url per line. If not provided, phpCAS will exclude by default all tickets provided by proxy. Each proxy server url could be a plain url or a regular expression. IMPORTANT : regular expression delimiter must be a slash. For example : https://proxy.example.com/ AND/OR regular expression : /^https:\/\/app[0-9]\.example\.com\/rest\//."), |
|
334 |
'#default_value' => variable_get('cas_proxy_list', ''), |
|
335 |
'#after_build' => array('cas_proxy_list_version_check'), |
|
336 |
); |
|
337 |
|
|
328 | 338 |
$form['advanced']['cas_debugfile'] = array( |
329 | 339 |
'#type' => 'textfield', |
330 | 340 |
'#title' => t('CAS debugging output filename'), |
... | ... | |
359 | 369 |
} |
360 | 370 |
return $element; |
361 | 371 |
} |
372 |
|
|
373 |
/** |
|
374 |
* Proxy chain object only exists with phpCAS version >= 1.3. As phpCAS CAS.php |
|
375 |
* is include only after building element 'cas_library_dir', we must check it after it. |
|
376 |
*/ |
|
377 |
function cas_proxy_list_version_check($element, &$form_state) { |
|
378 |
if (!defined('PHPCAS_VERSION') || version_compare(PHPCAS_VERSION, '1.3', '<')) { |
|
379 |
$element['#access'] = FALSE; |
|
380 |
} |
|
381 |
return $element; |
|
382 |
} |
|
383 |
|
|
384 |
/** |
|
385 |
* Since 1.3, pgt format isn't supported and default to plain. |
|
386 |
*/ |
|
387 |
function cas_pgtformat_version_check($element, &$form_state) { |
|
388 |
if (!defined('PHPCAS_VERSION') || version_compare(PHPCAS_VERSION, '1.3', '>')) { |
|
389 |
$element['#access'] = FALSE; |
|
390 |
} |
|
391 |
return $element; |
|
392 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules