equal
deleted
inserted
replaced
846 'success' => false, |
846 'success' => false, |
847 'error' => 'access_denied' |
847 'error' => 'access_denied' |
848 ); |
848 ); |
849 } |
849 } |
850 |
850 |
|
851 // Validate re-auth |
|
852 if ( !$session->sid_super ) |
|
853 { |
|
854 return array( |
|
855 'success' => false, |
|
856 'error' => 'access_denied_need_reauth' |
|
857 ); |
|
858 } |
|
859 |
851 // Validate input |
860 // Validate input |
852 $reason = trim($reason); |
861 $reason = trim($reason); |
853 if ( !in_array($protection_level, array(PROTECT_NONE, PROTECT_FULL, PROTECT_SEMI)) || empty($reason) ) |
862 if ( !in_array($protection_level, array(PROTECT_NONE, PROTECT_FULL, PROTECT_SEMI)) || empty($reason) ) |
854 { |
863 { |
855 return array( |
864 return array( |