Subversion Repositories oidplus

Rev

Rev 1008 | Rev 1052 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1008 Rev 1050
Line 15... Line 15...
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
 * See the License for the specific language governing permissions and
16
 * See the License for the specific language governing permissions and
17
 * limitations under the License.
17
 * limitations under the License.
18
 */
18
 */
19
 
19
 
20
if (!defined('INSIDE_OIDPLUS')) die();
20
namespace ViaThinkSoft\OIDplus;
21
 
21
 
22
class OIDplusPageAdminOIDInfoExport extends OIDplusPagePluginAdmin {
22
class OIDplusPageAdminOIDInfoExport extends OIDplusPagePluginAdmin {
23
 
23
 
24
        /*private*/ const QUERY_LIST_OIDINFO_OIDS_V1 = '1.3.6.1.4.1.37476.2.5.2.1.5.1';
24
        /*private*/ const QUERY_LIST_OIDINFO_OIDS_V1 = '1.3.6.1.4.1.37476.2.5.2.1.5.1';
25
        /*private*/ const QUERY_GET_OIDINFO_DATA_V1  = '1.3.6.1.4.1.37476.2.5.2.1.6.1';
25
        /*private*/ const QUERY_GET_OIDINFO_DATA_V1  = '1.3.6.1.4.1.37476.2.5.2.1.6.1';
Line 658... Line 658...
658
 
658
 
659
        public static function outputXML($only_non_existing) {
659
        public static function outputXML($only_non_existing) {
660
                $out_type = null;
660
                $out_type = null;
661
                $out_content = '';
661
                $out_content = '';
662
 
662
 
663
                // This file contains class OIDInfoAPI.
663
                // This file contains class \OIDInfoAPI.
664
                // We cannot include this in init(), because the init
664
                // We cannot include this in init(), because the init
665
                // of the registration plugin (OIDplusPageAdminRegistration) uses
665
                // of the registration plugin (OIDplusPageAdminRegistration) uses
666
                // OIDplusPageAdminOIDInfoExport::outputXML() before
666
                // OIDplusPageAdminOIDInfoExport::outputXML() before
667
                // OIDplusPageAdminOIDInfoExport::init() ,
667
                // OIDplusPageAdminOIDInfoExport::init() ,
668
                // because OIDplusPageAdminRegistration::init() comes first sometimes.
668
                // because OIDplusPageAdminRegistration::init() comes first sometimes.
669
                require_once __DIR__ . '/oidinfo_api.inc.php';
669
                require_once __DIR__ . '/oidinfo_api.inc.php';
670
 
670
 
671
                $oa = new OIDInfoAPI();
671
                $oa = new \OIDInfoAPI();
672
                if ($only_non_existing) {
672
                if ($only_non_existing) {
673
                        if (!function_exists('socket_create')) {
673
                        if (!function_exists('socket_create')) {
674
                                throw new OIDplusException(_L('You must install the PHP "sockets" in order to check for non-existing OIDs.'));
674
                                throw new OIDplusException(_L('You must install the PHP "sockets" in order to check for non-existing OIDs.'));
675
                        }
675
                        }
676
                        $oa->addSimplePingProvider('viathinksoft.de:49500');
676
                        $oa->addSimplePingProvider('viathinksoft.de:49500');
Line 684... Line 684...
684
                $name2 = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'Export interface';
684
                $name2 = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'Export interface';
685
                $out_content .= $oa->xmlAddHeader($name1, $name2, $email); // do not translate
685
                $out_content .= $oa->xmlAddHeader($name1, $name2, $email); // do not translate
686
 
686
 
687
                $params['allow_html'] = true;
687
                $params['allow_html'] = true;
688
                $params['allow_illegal_email'] = true; // It should be enabled, because the creator could have used some kind of human-readable anti-spam technique
688
                $params['allow_illegal_email'] = true; // It should be enabled, because the creator could have used some kind of human-readable anti-spam technique
689
                $params['soft_correct_behavior'] = OIDInfoAPI::SOFT_CORRECT_BEHAVIOR_NONE;
689
                $params['soft_correct_behavior'] = \OIDInfoAPI::SOFT_CORRECT_BEHAVIOR_NONE;
690
                $params['do_online_check'] = false; // Flag to disable this online check, because it generates a lot of traffic and runtime.
690
                $params['do_online_check'] = false; // Flag to disable this online check, because it generates a lot of traffic and runtime.
691
                $params['do_illegality_check'] = true;
691
                $params['do_illegality_check'] = true;
692
                $params['do_simpleping_check'] = $only_non_existing;
692
                $params['do_simpleping_check'] = $only_non_existing;
693
                $params['auto_extract_name'] = '';
693
                $params['auto_extract_name'] = '';
694
                $params['auto_extract_url'] = '';
694
                $params['auto_extract_url'] = '';