Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 1049 → Rev 1050

/trunk/ajax.php
17,6 → 17,9
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusException;
 
require_once __DIR__ . '/includes/oidplus.inc.php';
 
try {
85,7 → 88,7
$_REQUEST['id'] = OIDplus::prefilterQuery($_REQUEST['id'], false);
try {
$json_out = OIDplus::gui()->generateContentPage($_REQUEST['id']);
} catch (Exception $e) {
} catch (\Exception $e) {
$json_out = array();
$json_out['title'] = _L('Error');
$json_out['icon'] = 'img/error.png';
129,13 → 132,13
@header('Content-Type:application/json; charset=utf-8');
echo json_encode($json_out);
 
} catch (Exception $e) {
} catch (\Exception $e) {
 
try {
if (!OIDplus::baseconfig()->getValue('DISABLE_AJAX_TRANSACTIONS',false) && OIDplus::db()->transaction_supported() && (OIDplus::db()->transaction_level() > 0)) {
OIDplus::db()->transaction_rollback();
}
} catch (Exception $e1) {
} catch (\Exception $e1) {
}
 
$errmsg = $e->getMessage();
/trunk/cron.php
24,6 → 24,7
// If you cannot use cron.sh or cron.bat for cronjobs, then you can use
// a WebCron service (e.g. https://www.easycron.com/ ) instead, using cron.php
 
use ViaThinkSoft\OIDplus\OIDplus;
 
try {
require_once __DIR__ . '/includes/oidplus.inc.php';
32,7 → 33,7
OIDplus::init(false);
OIDplus::invoke_shutdown();
ob_end_clean();
} catch (Exception $e) {
} catch (\Exception $e) {
http_response_code(500); // Internal Server Error
echo $e->getMessage();
}
/trunk/cron.sh
22,6 → 22,7
// Example: The automatic publishing of OIDs will then be done by this script
// and not by a random visitor.
 
use ViaThinkSoft\OIDplus\OIDplus;
 
try {
require_once __DIR__ . '/includes/oidplus.inc.php';
/trunk/dev/test_path_functions.php
17,6 → 17,8
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
 
include __DIR__.'/../includes/oidplus.inc.php';
 
header('Content-Type:text/plain');
/trunk/doc/config_values.txt
109,11 → 109,11
- hCaptcha
- ViaThinkSoft Client Challenge
 
OIDplus::baseConfig()->setValue('RECAPTCHA_VERSION', OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V2_CHECKBOX);
OIDplus::baseConfig()->setValue('RECAPTCHA_VERSION', \ViaThinkSoft\OIDplus\OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V2_CHECKBOX);
Possible values:
OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V2_CHECKBOX
OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V2_INVISIBLE
OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V3
\ViaThinkSoft\OIDplus\OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V2_CHECKBOX
\ViaThinkSoft\OIDplus\OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V2_INVISIBLE
\ViaThinkSoft\OIDplus\OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V3
 
OIDplus::baseConfig()->setValue('RECAPTCHA_ENABLED', true);
Deprecated!
224,9 → 224,10
requiring it to be removed from the file system.
(Removing a plugin from the file system can result in various
problems, e.g. they can be re-added during a SVN/software update.)
Replace "..." with the main PHP class of the plugin you want to disable
Replace "..." with the main PHP class of the plugin you want to disable.
The namespace must be included.
Example:
"DISABLE_PLUGIN_OIDplusLoggerPluginUserdataLogfile"
"DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplusLoggerPluginUserdataLogfile"
disables the plugin "logger/300_userdata_logfile".
 
OIDplus::baseConfig()->setValue('DISABLE_AJAX_TRANSACTIONS', false);
/trunk/includes/classes/OIDplus.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplus extends OIDplusBaseClass {
private static /*OIDplusPagePlugin[]*/ $pagePlugins = array();
53,10 → 53,10
private function __construct() {
}
 
# --- Static classes
// --- Static classes
 
private static $baseConfig = null;
private static $old_config_format = false;
private static $oldConfigFormatLoaded = false;
public static function baseConfig() {
$first_init = false;
 
81,18 → 81,50
}
 
if (file_exists($config_file)) {
if (self::$old_config_format) {
if (self::$oldConfigFormatLoaded) {
// Note: We may only include it once due to backwards compatibility,
// since in version 2.0, the configuration was defined using define() statements
// Attention: This does mean that a full re-init (e.g. for test cases) is not possible
// if a version 2.0 config is used!
include_once $config_file;
 
// We need to do this, because define() cannot be undone
// Note: This can only happen in very special cases (e.g. test cases) where you call init() twice
throw new OIDplusConfigInitializationException(_L('A full re-initialization is not possible if a version 2.0 config file (containing "defines") is used. Please update to a config 2.1 file by running setup again.'));
} else {
$tmp = file_get_contents($config_file);
$ns = "ViaThinkSoft\OIDplus\OIDplus";
$uses = "use $ns;";
if ((strpos($tmp,'OIDplus::') !== false) && (strpos($tmp,$uses) === false)) {
// Migrate config file to namespace class names
// Note: Only config files version 2.1 are affected. Not 2.0 ones
 
$tmp = "<?php\r\n\r\n$uses /* Automatically added by migration procedure */\r\n?>$tmp";
$tmp = str_replace('?><?php', '', $tmp);
 
$tmp = str_replace("\$ns\OIDplusCaptchaPluginRecaptcha::", "OIDplusCaptchaPluginRecaptcha::", $tmp);
$tmp = str_replace("OIDplusCaptchaPluginRecaptcha::", "\$ns\OIDplusCaptchaPluginRecaptcha::", $tmp);
 
$tmp = str_replace('DISABLE_PLUGIN_OIDplusPagePublicRdap',
'DISABLE_PLUGIN_Frdlweb\OIDplus\OIDplusPagePublicRdap', $tmp);
$tmp = str_replace('DISABLE_PLUGIN_OIDplusPagePublicAltIds',
'DISABLE_PLUGIN_Frdlweb\OIDplus\OIDplusPagePublicAltIds', $tmp);
$tmp = str_replace('DISABLE_PLUGIN_OIDplus',
'DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplus', $tmp);
$tmp = str_replace('DISABLE_PLUGIN_OIDplusPagePublicUITweaks',
'DISABLE_PLUGIN_TushevOrg\OIDplus\OIDplusPagePublicUITweaks', $tmp);
 
if (@file_put_contents($config_file, $tmp) === false) {
eval('?>'.$tmp);
} else {
include $config_file;
}
} else {
include $config_file;
}
}
 
if (defined('OIDPLUS_CONFIG_VERSION') && (OIDPLUS_CONFIG_VERSION == 2.0)) {
self::$old_config_format = true;
self::$oldConfigFormatLoaded = true;
 
// Backwards compatibility 2.0 => 2.1
foreach (get_defined_constants(true)['user'] as $name => $value) {
99,6 → 131,14
$name = str_replace('OIDPLUS_', '', $name);
if ($name == 'SESSION_SECRET') $name = 'SERVER_SECRET';
if ($name == 'MYSQL_QUERYLOG') $name = 'QUERY_LOGFILE';
$name = str_replace('DISABLE_PLUGIN_OIDplusPagePublicRdap',
'DISABLE_PLUGIN_Frdlweb\OIDplus\OIDplusPagePublicRdap', $name);
$name = str_replace('DISABLE_PLUGIN_OIDplusPagePublicAltIds',
'DISABLE_PLUGIN_Frdlweb\OIDplus\OIDplusPagePublicAltIds', $name);
$name = str_replace('DISABLE_PLUGIN_OIDplus',
'DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplus', $name);
$name = str_replace('DISABLE_PLUGIN_OIDplusPagePublicUITweaks',
'DISABLE_PLUGIN_TushevOrg\OIDplus\OIDplusPagePublicUITweaks', $name);
if (($name == 'MYSQL_PASSWORD') || ($name == 'ODBC_PASSWORD') || ($name == 'PDO_PASSWORD') || ($name == 'PGSQL_PASSWORD')) {
self::$baseConfig->setValue($name, base64_decode($value));
} else {
109,7 → 149,7
}
} else {
if (!is_dir(OIDplus::localpath().'setup')) {
throw new OIDplusConfigInitializationException(_L('File %1 is missing, but setup can\'t be started because its directory missing.','userdata/baseconfig/config.inc.php'));
throw new OIDplusConfigInitializationException(_L('File %1 is missing, but setup can\'t be started because its directory missing.',$config_file));
} else {
if (self::$html) {
if (strpos($_SERVER['REQUEST_URI'], OIDplus::webpath(null,OIDplus::PATH_RELATIVE_TO_ROOT).'setup/') !== 0) {
120,7 → 160,7
}
} else {
// This can be displayed in e.g. ajax.php
throw new OIDplusConfigInitializationException(_L('File %1 is missing. Please run setup again.','userdata/baseconfig/config.inc.php'));
throw new OIDplusConfigInitializationException(_L('File %1 is missing. Please run setup again.',$config_file));
}
}
}
187,7 → 227,7
// Nothing here yet
});
self::$config->prepareConfigKey('objecttypes_enabled', 'Enabled object types and their order, separated with a semicolon (please reload the page so that the change is applied)', '', OIDplusConfig::PROTECTION_EDITABLE, function($value) {
# TODO: when objecttypes_enabled is changed at the admin control panel, we need to do a reload of the page, so that jsTree will be updated. Is there anything we can do?
// TODO: when objecttypes_enabled is changed at the admin control panel, we need to do a reload of the page, so that jsTree will be updated. Is there anything we can do?
 
$ary = explode(';',$value);
$uniq_ary = array_unique($ary);
293,7 → 333,7
return self::$logger;
}
 
# --- SQL slang plugin
// --- SQL slang plugin
 
private static function registerSqlSlangPlugin(OIDplusSqlSlangPlugin $plugin) {
$name = $plugin::id();
321,7 → 361,7
}
}
 
# --- Database plugin
// --- Database plugin
 
private static function registerDatabasePlugin(OIDplusDatabasePlugin $plugin) {
$name = $plugin::id();
372,7 → 412,7
return self::$dbIsolatedSession;
}
 
# --- CAPTCHA plugin
// --- CAPTCHA plugin
 
private static function registerCaptchaPlugin(OIDplusCaptchaPlugin $plugin) {
$name = $plugin::id();
415,7 → 455,7
throw new OIDplusConfigInitializationException(_L('CAPTCHA plugin "%1" not found',$captcha_plugin_name));
}
 
# --- Page plugin
// --- Page plugin
 
private static function registerPagePlugin(OIDplusPagePlugin $plugin) {
self::$pagePlugins[] = $plugin;
427,7 → 467,7
return self::$pagePlugins;
}
 
# --- Auth plugin
// --- Auth plugin
 
private static function registerAuthPlugin(OIDplusAuthPlugin $plugin) {
if (OIDplus::baseConfig()->getValue('DEBUG')) {
464,7 → 504,7
return self::$authPlugins;
}
 
# --- Language plugin
// --- Language plugin
 
private static function registerLanguagePlugin(OIDplusLanguagePlugin $plugin) {
self::$languagePlugins[] = $plugin;
475,7 → 515,7
return self::$languagePlugins;
}
 
# --- Design plugin
// --- Design plugin
 
private static function registerDesignPlugin(OIDplusDesignPlugin $plugin) {
self::$designPlugins[] = $plugin;
496,7 → 536,7
return null;
}
 
# --- Logger plugin
// --- Logger plugin
 
private static function registerLoggerPlugin(OIDplusLoggerPlugin $plugin) {
self::$loggerPlugins[] = $plugin;
507,7 → 547,7
return self::$loggerPlugins;
}
 
# --- Object type plugin
// --- Object type plugin
 
private static function registerObjectTypePlugin(OIDplusObjectTypePlugin $plugin) {
self::$objectTypePlugins[] = $plugin;
625,7 → 665,7
return self::$disabledObjectTypes;
}
 
# --- Plugin handling functions
// --- Plugin handling functions
 
public static function getAllPlugins()/*: array*/ {
$res = array();
662,6 → 702,30
}
 
/**
* Checks if the plugin is disabled
* @return boolean true if plugin is enabled, false if plugin is disabled
* @throws OIDplusException if the class name or config file (disabled setting) does not contain a namespace
*/
private static function pluginCheckDisabled($class_name): bool {
$path = explode('\\', $class_name);
 
if (count($path) == 1) {
throw new OIDplusException(_L('Plugin "%1" is erroneous',$class_name).': '._L('The plugin uses no namespaces. The new version of OIDplus requires plugin class files to be in a namespace. Please notify your plugin author and ask for an update.'));
}
 
$class_end = end($path);
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_'.$class_end, false)) {
throw new OIDplusConfigInitializationException(_L('Your base configuration file is outdated. Please change "%1" to "%2".','DISABLE_PLUGIN_'.$class_end,'DISABLE_PLUGIN_'.$class_name));
}
 
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_'.$class_name, false)) {
return false;
}
 
return true;
}
 
/**
* @return array<OIDplusPluginManifest>|array<string,array<string,OIDplusPluginManifest>>
*/
public static function getAllPluginManifests($pluginFolderMasks='*', $flat=true): array {
707,9 → 771,7
$manifest->loadManifest($ini);
 
$class_name = $manifest->getPhpMainClass();
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_'.$class_name, false)) {
continue;
}
if ($class_name) if (!self::pluginCheckDisabled($class_name)) continue;
 
if ($flat) {
$out[] = $manifest;
752,33 → 814,33
// that the plugin is working correctly.
 
if (!$class_name) {
throw new OIDplusException(_L('Plugin "%1/%2" is erroneous',$plugintype_folder,$pluginname_folder).': '._L('Manifest does not declare a PHP main class'));
throw new OIDplusException(_L('Plugin "%1" is erroneous',$plugintype_folder.'/'.$pluginname_folder).': '._L('Manifest does not declare a PHP main class'));
}
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_'.$class_name, false)) {
continue;
if (!self::pluginCheckDisabled($class_name)) {
continue; // Plugin is disabled
}
if (!class_exists($class_name)) {
throw new OIDplusException(_L('Plugin "%1/%2" is erroneous',$plugintype_folder,$pluginname_folder).': '._L('Manifest declares PHP main class as "%1", but it could not be found',$class_name));
throw new OIDplusException(_L('Plugin "%1" is erroneous',$plugintype_folder.'/'.$pluginname_folder).': '._L('Manifest declares PHP main class as "%1", but it could not be found',$class_name));
}
if (!is_subclass_of($class_name, $expectedPluginClass)) {
throw new OIDplusException(_L('Plugin "%1/%2" is erroneous',$plugintype_folder,$pluginname_folder).': '._L('Plugin main class "%1" is expected to be a subclass of "%2"',$class_name,$expectedPluginClass));
throw new OIDplusException(_L('Plugin "%1" is erroneous',$plugintype_folder.'/'.$pluginname_folder).': '._L('Plugin main class "%1" is expected to be a subclass of "%2"',$class_name,$expectedPluginClass));
}
if (($class_name!=$manifest->getTypeClass()) && (!is_subclass_of($class_name,$manifest->getTypeClass()))) {
throw new OIDplusException(_L('Plugin "%1/%2" is erroneous',$plugintype_folder,$pluginname_folder).': '._L('Plugin main class "%1" is expected to be a subclass of "%2", according to type declared in manifest',$class_name,$manifest->getTypeClass()));
throw new OIDplusException(_L('Plugin "%1" is erroneous',$plugintype_folder.'/'.$pluginname_folder).': '._L('Plugin main class "%1" is expected to be a subclass of "%2", according to type declared in manifest',$class_name,$manifest->getTypeClass()));
}
if (($manifest->getTypeClass()!=$expectedPluginClass) && (!is_subclass_of($manifest->getTypeClass(),$expectedPluginClass))) {
throw new OIDplusException(_L('Plugin "%1/%2" is erroneous',$plugintype_folder,$pluginname_folder).': '._L('Class declared in manifest is "%1" does not fit expected class for this plugin type "%2"',$manifest->getTypeClass(),$expectedPluginClass));
throw new OIDplusException(_L('Plugin "%1" is erroneous',$plugintype_folder.'/'.$pluginname_folder).': '._L('Class declared in manifest is "%1" does not fit expected class for this plugin type "%2"',$manifest->getTypeClass(),$expectedPluginClass));
}
 
$plugin_oid = $manifest->getOid();
if (!$plugin_oid) {
throw new OIDplusException(_L('Plugin "%1/%2" is erroneous',$plugintype_folder,$pluginname_folder).': '._L('Does not have an OID'));
throw new OIDplusException(_L('Plugin "%1" is erroneous',$plugintype_folder.'/'.$pluginname_folder).': '._L('Does not have an OID'));
}
if (!oid_valid_dotnotation($plugin_oid, false, false, 2)) {
throw new OIDplusException(_L('Plugin "%1/%2" is erroneous',$plugintype_folder,$pluginname_folder).': '._L('Plugin OID "%1" is invalid (needs to be valid dot-notation)',$plugin_oid));
throw new OIDplusException(_L('Plugin "%1" is erroneous',$plugintype_folder.'/'.$pluginname_folder).': '._L('Plugin OID "%1" is invalid (needs to be valid dot-notation)',$plugin_oid));
}
if (isset($known_plugin_oids[$plugin_oid])) {
throw new OIDplusException(_L('Plugin "%1/%2" is erroneous',$plugintype_folder,$pluginname_folder).': '._L('The OID "%1" is already used by the plugin "%2"',$plugin_oid,$known_plugin_oids[$plugin_oid]));
throw new OIDplusException(_L('Plugin "%1" is erroneous',$plugintype_folder.'/'.$pluginname_folder).': '._L('The OID "%1" is already used by the plugin "%2"',$plugin_oid,$known_plugin_oids[$plugin_oid]));
}
 
$full_plugin_dir = dirname($manifest->getManifestFile());
786,9 → 848,13
 
$dir_is_viathinksoft = str_starts_with($full_plugin_dir, 'plugins/viathinksoft/') || str_starts_with($full_plugin_dir, 'plugins\\viathinksoft\\');
$oid_is_viathinksoft = str_starts_with($plugin_oid, '1.3.6.1.4.1.37476.2.5.2.4.'); // { iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) 37476 products(2) oidplus(5) v2(2) plugins(4) }
$class_is_viathinksoft = str_starts_with($class_name, 'ViaThinkSoft\\');
if ($dir_is_viathinksoft != $oid_is_viathinksoft) {
throw new OIDplusException(_L('Plugin "%1/%2" is misplaced',$plugintype_folder,$pluginname_folder).': '._L('The plugin is in the wrong folder. The folder %1 can only be used by official ViaThinkSoft plugins','plugins/viathinksoft/'));
throw new OIDplusException(_L('Plugin "%1" is misplaced',$plugintype_folder.'/'.$pluginname_folder).': '._L('The plugin is in the wrong folder. The folder %1 can only be used by official ViaThinkSoft plugins','plugins/viathinksoft/'));
}
if ($dir_is_viathinksoft != $class_is_viathinksoft) {
throw new OIDplusException(_L('Plugin "%1" is erroneous',$plugintype_folder.'/'.$pluginname_folder).': '._L('Third-party plugins must not use the ViaThinkSoft PHP namespace. Please use your own vendor namespace.'));
}
 
$known_plugin_oids[$plugin_oid] = $plugintype_folder.'/'.$pluginname_folder;
 
797,7 → 863,7
if (OIDplus::baseConfig()->getValue('DEBUG')) {
if ($obj->implementsFeature($fake_feature)) {
// see https://devblogs.microsoft.com/oldnewthing/20040211-00/?p=40663
throw new OIDplusException(_L('Plugin "%1/%2" is erroneous',$plugintype_folder,$pluginname_folder).': '._L('implementsFeature() always returns true'));
throw new OIDplusException(_L('Plugin "%1" is erroneous',$plugintype_folder.'/'.$pluginname_folder).': '._L('implementsFeature() always returns true'));
}
}
 
805,7 → 871,7
$tmp = $manifest->getManifestLinkedFiles();
foreach ($tmp as $file) {
if (!file_exists($file)) {
throw new OIDplusException(_L('Plugin "%1/%2" is erroneous',$plugintype_folder,$pluginname_folder).': '._L('File %1 was defined in manifest, but it is not existing',$file));
throw new OIDplusException(_L('Plugin "%1" is erroneous',$plugintype_folder.'/'.$pluginname_folder).': '._L('File %1 was defined in manifest, but it is not existing',$file));
}
}
 
826,7 → 892,7
return $out;
}
 
# --- Initialization of OIDplus
// --- Initialization of OIDplus
 
public static function init($html=true, $keepBaseConfig=true) {
self::$html = $html;
833,12 → 899,6
 
// Reset internal state, so we can re-init verything if required
 
if (self::$old_config_format) {
// We need to do this, because define() cannot be undone
// Note: This can only happen in very special cases (e.g. test cases) where you call init() twice
throw new OIDplusConfigInitializationException(_L('A full re-initialization is not possible if a version 2.0 config file (containing "defines") is used. Please update to a config 2.1 file by running setup again.'));
}
 
self::$config = null;
if (!$keepBaseConfig) self::$baseConfig = null; // for test cases we need to be able to control base config and setting values manually, so $keepBaseConfig needs to be true
self::$gui = null;
872,7 → 932,7
 
// SQL slangs
 
self::registerAllPlugins('sqlSlang', 'OIDplusSqlSlangPlugin', array('OIDplus','registerSqlSlangPlugin'));
self::registerAllPlugins('sqlSlang', OIDplusSqlSlangPlugin::class, array(OIDplus::class,'registerSqlSlangPlugin'));
foreach (OIDplus::getSqlSlangPlugins() as $plugin) {
$plugin->init($html);
}
879,7 → 939,7
 
// Database providers
 
self::registerAllPlugins('database', 'OIDplusDatabasePlugin', array('OIDplus','registerDatabasePlugin'));
self::registerAllPlugins('database', OIDplusDatabasePlugin::class, array(OIDplus::class,'registerDatabasePlugin'));
foreach (OIDplus::getDatabasePlugins() as $plugin) {
$plugin->init($html);
}
898,14 → 958,14
 
// Register non-DB plugins
 
self::registerAllPlugins(array('publicPages', 'raPages', 'adminPages'), 'OIDplusPagePlugin', array('OIDplus','registerPagePlugin'));
self::registerAllPlugins('auth', 'OIDplusAuthPlugin', array('OIDplus','registerAuthPlugin'));
self::registerAllPlugins('logger', 'OIDplusLoggerPlugin', array('OIDplus','registerLoggerPlugin'));
self::registerAllPlugins(array('publicPages', 'raPages', 'adminPages'), OIDplusPagePlugin::class, array(OIDplus::class,'registerPagePlugin'));
self::registerAllPlugins('auth', OIDplusAuthPlugin::class, array(OIDplus::class,'registerAuthPlugin'));
self::registerAllPlugins('logger', OIDplusLoggerPlugin::class, array(OIDplus::class,'registerLoggerPlugin'));
OIDplusLogger::reLogMissing(); // Some previous plugins might have tried to log. Repeat that now.
self::registerAllPlugins('objectTypes', 'OIDplusObjectTypePlugin', array('OIDplus','registerObjectTypePlugin'));
self::registerAllPlugins('language', 'OIDplusLanguagePlugin', array('OIDplus','registerLanguagePlugin'));
self::registerAllPlugins('design', 'OIDplusDesignPlugin', array('OIDplus','registerDesignPlugin'));
self::registerAllPlugins('captcha', 'OIDplusCaptchaPlugin', array('OIDplus','registerCaptchaPlugin'));
self::registerAllPlugins('objectTypes', OIDplusObjectTypePlugin::class, array(OIDplus::class,'registerObjectTypePlugin'));
self::registerAllPlugins('language', OIDplusLanguagePlugin::class, array(OIDplus::class,'registerLanguagePlugin'));
self::registerAllPlugins('design', OIDplusDesignPlugin::class, array(OIDplus::class,'registerDesignPlugin'));
self::registerAllPlugins('captcha', OIDplusCaptchaPlugin::class, array(OIDplus::class,'registerCaptchaPlugin'));
 
// Initialize non-DB plugins
 
1102,13 → 1162,13
OIDplus::recognizeVersion(); // Make sure "last_known_version" is set and a log entry is created
}
 
# --- System URL, System ID, PKI, and other functions
// --- System URL, System ID, PKI, and other functions
 
private static function recognizeSystemUrl() {
try {
$url = OIDplus::webpath(null,self::PATH_ABSOLUTE_CANONICAL); // TODO: canonical or not?
OIDplus::config()->setValue('last_known_system_url', $url);
} catch (Exception $e) {
} catch (\Exception $e) {
}
}
 
1161,7 → 1221,7
if (PHP_SAPI == 'cli') {
try {
return OIDplus::config()->getValue('last_known_system_url', false);
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}
} else {
1399,7 → 1459,7
self::recanonizeObjects();
}
OIDplus::config()->setValue("last_known_version", $ver_now);
} catch (Exception $e) {
} catch (\Exception $e) {
}
}
 
1775,7 → 1835,7
$git_dir = OIDplus::findGitFolder();
if ($git_dir === false) return false;
$commit_msg = git_get_latest_commit_message($git_dir);
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}
 
1806,13 → 1866,13
}
 
private static function recanonizeObjects() {
#
# Since OIDplus svn-184, entries in the database need to have a canonical ID
# If the ID is not canonical (e.g. GUIDs missing hyphens), the object cannot be opened in OIDplus
# This script re-canonizes the object IDs if required.
# In SVN Rev 856, the canonization for GUID, IPv4 and IPv6 have changed, requiring another
# re-canonization
#
//
// Since OIDplus svn-184, entries in the database need to have a canonical ID
// If the ID is not canonical (e.g. GUIDs missing hyphens), the object cannot be opened in OIDplus
// This script re-canonizes the object IDs if required.
// In SVN Rev 856, the canonization for GUID, IPv4 and IPv6 have changed, requiring another
// re-canonization
//
$res = OIDplus::db()->query("select id from ###objects");
while ($row = $res->fetch_array()) {
$ida = $row['id'];
/trunk/includes/classes/OIDplusAltId.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusAltId extends OIDplusBaseClass {
 
/trunk/includes/classes/OIDplusAuthContentStore.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusAuthContentStore extends OIDplusBaseClass implements OIDplusGetterSetterInterface {
 
/trunk/includes/classes/OIDplusAuthContentStoreDummy.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
# TODO: Rename class?
abstract class OIDplusAuthContentStoreDummy extends OIDplusAuthContentStore {
/trunk/includes/classes/OIDplusAuthContentStoreJWT.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusAuthContentStoreJWT extends OIDplusAuthContentStoreDummy {
 
190,7 → 190,7
 
// Do various checks if the token is allowed and not blacklisted
self::jwtSecurityCheck($tmp);
} catch (Exception $e) {
} catch (\Exception $e) {
if (isset($_GET[self::COOKIE_NAME]) || isset($_POST[self::COOKIE_NAME])) {
// Most likely an AJAX request. We can throw an Exception
throw new OIDplusException(_L('The JWT token was rejected: %1',$e->getMessage()));
/trunk/includes/classes/OIDplusAuthContentStoreSession.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusAuthContentStoreSession extends OIDplusAuthContentStore {
 
35,7 → 35,7
public function getValue($name, $default = NULL) {
try {
return self::getSessionHandler()->getValue($name, $default);
} catch (Exception $e) {
} catch (\Exception $e) {
self::getSessionHandler()->destroySession();
// TODO: For some reason If destroySession() is called, we won't get this Exception?!
throw new OIDplusException(_L('Internal error with session. Please reload the page and log-in again. %1', $e->getMessage()));
/trunk/includes/classes/OIDplusAuthPlugin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusAuthPlugin extends OIDplusPlugin {
public abstract function verify(OIDplusRAAuthInfo $authKey, $check_password);
/trunk/includes/classes/OIDplusAuthUtils.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusAuthUtils extends OIDplusBaseClass {
 
/trunk/includes/classes/OIDplusBaseClass.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusBaseClass {
 
/trunk/includes/classes/OIDplusBaseConfig.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
// OIDplusBaseConfig is the basic ("static") configuration stored in userdata/baseconfig/config.inc.php,
// e.g. database access credentials.
/trunk/includes/classes/OIDplusCaptchaPlugin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusCaptchaPlugin extends OIDplusPlugin {
 
/trunk/includes/classes/OIDplusConfig.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
// OIDplusConfig contains settings that are stored in the database.
// Not to be confused with OIDplusBaseConfig which is the basic ("static")
72,7 → 72,7
// Case A: The config setting does not exist in the database. So we create it now.
try {
OIDplus::db()->query("insert into ###config (name, description, value, protected, visible) values (?, ?, ?, ?, ?)", array($name, $description, $init_value, $protected, $visible));
} catch (Exception $e) {
} catch (\Exception $e) {
// After a software update that introduced a new config setting,
// there will be a race-condition at this place, because
// jsTree and content are loading simultaneously!
/trunk/includes/classes/OIDplusConfigInitializationException.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusConfigInitializationException extends OIDplusException {
 
/trunk/includes/classes/OIDplusCookieUtils.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusCookieUtils extends OIDplusBaseClass {
 
/trunk/includes/classes/OIDplusDatabaseConnection.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusDatabaseConnection extends OIDplusBaseClass {
protected /*bool*/ $connected = false;
177,7 → 177,7
// Attention: This query could interrupt transactions if Rollback-On-Error is enabled
$this->query("select 0 from ".$tableName." where 1=0");
return true;
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}
}
/trunk/includes/classes/OIDplusDatabasePlugin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusDatabasePlugin extends OIDplusPlugin {
 
/trunk/includes/classes/OIDplusDesignPlugin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusDesignPlugin extends OIDplusPlugin {
 
/trunk/includes/classes/OIDplusException.class.php
17,8 → 17,8
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusException extends Exception {
class OIDplusException extends \Exception {
 
}
/trunk/includes/classes/OIDplusGetterSetterInterface.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
interface OIDplusGetterSetterInterface {
 
/trunk/includes/classes/OIDplusGui.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusGui extends OIDplusBaseClass {
 
32,7 → 32,7
foreach (OIDplus::getPagePlugins() as $plugin) {
try {
$plugin->gui($id, $out, $handled);
} catch (Exception $e) {
} catch (\Exception $e) {
$out['title'] = _L('Error');
$out['icon'] = 'img/error.png';
$out['text'] = $e->getMessage();
/trunk/includes/classes/OIDplusLanguagePlugin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusLanguagePlugin extends OIDplusPlugin {
 
/trunk/includes/classes/OIDplusLogger.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusLogger extends OIDplusBaseClass {
 
/trunk/includes/classes/OIDplusLoggerPlugin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusLoggerPlugin extends OIDplusPlugin {
 
/trunk/includes/classes/OIDplusMailException.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusMailException extends OIDplusException {
 
/trunk/includes/classes/OIDplusMailUtils.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusMailUtils extends OIDplusBaseClass {
 
134,7 → 134,7
}
 
public static function sendMail($to, $title, $msg, $cc='', $bcc='') {
$h = new SecureMailer();
$h = new \SecureMailer();
 
// DM 14.04.2022: Added Reply-To, because some servers might change the 'From' attribute (Anti-Spoof?)
$h->addHeader('From', OIDplus::config()->getValue('admin_email'));
/trunk/includes/classes/OIDplusMenuUtils.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusMenuUtils extends OIDplusBaseClass {
 
/trunk/includes/classes/OIDplusObject.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusObject extends OIDplusBaseClass {
const UUID_NAMEBASED_NS_OidPlusMisc = 'ad1654e6-7e15-11e4-9ef6-78e3b5fc7f22';
26,7 → 26,7
foreach (OIDplus::getEnabledObjectTypes() as $ot) {
try {
$good = false;
if (get_parent_class($ot) == 'OIDplusObject') {
if (get_parent_class($ot) == OIDplusObject::class) {
$reflector = new \ReflectionMethod($ot, 'parse');
$isImplemented = ($reflector->getDeclaringClass()->getName() === $ot);
if ($isImplemented) { // avoid endless loop if parse is not overriden
36,7 → 36,7
// We need to do the workaround with "$good", otherwise PHPstan shows
// "Call to an undefined static method object::parse()"
if ($good && $obj = $ot::parse($node_id)) return $obj;
} catch (Exception $e) {}
} catch (\Exception $e) {}
}
return null;
}
/trunk/includes/classes/OIDplusObjectTypePlugin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusObjectTypePlugin extends OIDplusPlugin {
 
/trunk/includes/classes/OIDplusPagePlugin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusPagePlugin extends OIDplusPlugin {
public function htmlHeaderUpdate(&$head_elems) {}
/trunk/includes/classes/OIDplusPagePluginAdmin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusPagePluginAdmin extends OIDplusPagePlugin {
 
/trunk/includes/classes/OIDplusPagePluginPublic.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusPagePluginPublic extends OIDplusPagePlugin {
 
/trunk/includes/classes/OIDplusPagePluginRa.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusPagePluginRa extends OIDplusPagePlugin {
 
/trunk/includes/classes/OIDplusPlugin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusPlugin extends OIDplusBaseClass {
 
/trunk/includes/classes/OIDplusPluginManifest.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPluginManifest extends OIDplusBaseClass {
 
125,7 → 125,7
return $this->manifestFile;
}
 
public function getRawXml(): SimpleXMLElement {
public function getRawXml(): \SimpleXMLElement {
return $this->rawXML;
}
 
/trunk/includes/classes/OIDplusQueryResult.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusQueryResult extends OIDplusBaseClass {
abstract public function containsResultSet(): bool;
/trunk/includes/classes/OIDplusRA.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusRA extends OIDplusBaseClass {
private $email = null;
/trunk/includes/classes/OIDplusRAAuthInfo.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusRAAuthInfo extends OIDplusBaseClass {
 
/trunk/includes/classes/OIDplusSQLException.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusSQLException extends OIDplusException {
 
/trunk/includes/classes/OIDplusSessionHandler.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusSessionHandler extends OIDplusBaseClass implements OIDplusGetterSetterInterface {
 
/trunk/includes/classes/OIDplusSqlSlangPlugin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
abstract class OIDplusSqlSlangPlugin extends OIDplusPlugin {
 
/trunk/includes/db_updates/run.inc.php
17,10 → 17,14
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplusDatabaseConnection;
use ViaThinkSoft\OIDplus\OIDplusConfigInitializationException;
use ViaThinkSoft\OIDplus\OIDplusException;
 
/**
* This function will be called by OIDplusDatabaseConnection.class.php at method afterConnect().
* @param OIDplusDatabaseConnection $db is the OIDplusDatabaseConnection class
* @throws OIDplusException
* @throws \ViaThinkSoft\OIDplus\OIDplusException
*/
function oidplus_dbupdate(OIDplusDatabaseConnection $db) {
// Detect database version
72,7 → 76,7
require_once __DIR__.'/update1001.inc.php';
$version = oidplus_dbupdate_1001($db);
}
} catch (Exception $e) {
} catch (\Exception $e) {
throw new OIDplusException(_L('Database update from version %1 failed: %2',$version,$e->getMessage()));
}
 
/trunk/includes/db_updates/update1001.inc.php
17,11 → 17,13
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplusDatabaseConnection;
 
/**
* This function will be called by OIDplusDatabaseConnection.class.php at method afterConnect().
* @param OIDplusDatabaseConnection $db is the OIDplusDatabaseConnection class
* @return int new version set
* @throws OIDplusException
* @throws \ViaThinkSoft\OIDplus\OIDplusException
*/
function oidplus_dbupdate_1001(OIDplusDatabaseConnection $db) {
 
/trunk/includes/db_updates/update200.inc.php
17,11 → 17,13
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplusDatabaseConnection;
 
/**
* This function will be called by OIDplusDatabaseConnection.class.php at method afterConnect().
* @param OIDplusDatabaseConnection $db is the OIDplusDatabaseConnection class
* @return int new version set
* @throws OIDplusException
* @throws \ViaThinkSoft\OIDplus\OIDplusException
*/
function oidplus_dbupdate_200(OIDplusDatabaseConnection $db) {
if ($db->transaction_supported()) $db->transaction_begin();
/trunk/includes/db_updates/update201.inc.php
17,11 → 17,13
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplusDatabaseConnection;
 
/**
* This function will be called by OIDplusDatabaseConnection.class.php at method afterConnect().
* @param OIDplusDatabaseConnection $db is the OIDplusDatabaseConnection class
* @return int new version set
* @throws OIDplusException
* @throws \ViaThinkSoft\OIDplus\OIDplusException
*/
function oidplus_dbupdate_201(OIDplusDatabaseConnection $db) {
if ($db->transaction_supported()) $db->transaction_begin();
/trunk/includes/db_updates/update202.inc.php
17,11 → 17,13
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplusDatabaseConnection;
 
/**
* This function will be called by OIDplusDatabaseConnection.class.php at method afterConnect().
* @param OIDplusDatabaseConnection $db is the OIDplusDatabaseConnection class
* @return int new version set
* @throws OIDplusException
* @throws \ViaThinkSoft\OIDplus\OIDplusException
*/
function oidplus_dbupdate_202(OIDplusDatabaseConnection $db) {
if ($db->transaction_supported()) $db->transaction_begin();
/trunk/includes/db_updates/update203.inc.php
17,11 → 17,13
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplusDatabaseConnection;
 
/**
* This function will be called by OIDplusDatabaseConnection.class.php at method afterConnect().
* @param OIDplusDatabaseConnection $db is the OIDplusDatabaseConnection class
* @return int new version set
* @throws OIDplusException
* @throws \ViaThinkSoft\OIDplus\OIDplusException
*/
function oidplus_dbupdate_203(OIDplusDatabaseConnection $db) {
if ($db->transaction_supported()) $db->transaction_begin();
/trunk/includes/db_updates/update204.inc.php
17,11 → 17,13
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplusDatabaseConnection;
 
/**
* This function will be called by OIDplusDatabaseConnection.class.php at method afterConnect().
* @param OIDplusDatabaseConnection $db is the OIDplusDatabaseConnection class
* @return int new version set
* @throws OIDplusException
* @throws \ViaThinkSoft\OIDplus\OIDplusException
*/
function oidplus_dbupdate_204(OIDplusDatabaseConnection $db) {
if ($db->transaction_supported()) $db->transaction_begin();
/trunk/includes/db_updates/update205.inc.php
17,11 → 17,13
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplusDatabaseConnection;
 
/**
* This function will be called by OIDplusDatabaseConnection.class.php at method afterConnect().
* @param OIDplusDatabaseConnection $db is the OIDplusDatabaseConnection class
* @return int new version set
* @throws OIDplusException
* @throws \ViaThinkSoft\OIDplus\OIDplusException
*/
function oidplus_dbupdate_205(OIDplusDatabaseConnection $db) {
// Note: We update to version 1000, because we want to intentionally break older versions of OIDplus
/trunk/includes/functions.inc.php
17,6 → 17,8
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
 
function is_privatekey_encrypted($privKey) {
return strpos($privKey,'BEGIN ENCRYPTED PRIVATE KEY') !== false;
}
32,7 → 34,7
if (!@openssl_public_encrypt($data, $encrypted, $pubKey)) return false;
if (!@openssl_private_decrypt($encrypted, $decrypted, $privKey)) return false;
return $decrypted == $data;
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}
}
42,7 → 44,7
//"digest_alg" => "sha512",
//"private_key_bits" => 2048,
//"private_key_type" => OPENSSL_KEYTYPE_RSA,
"config" => class_exists("OIDplus") ? OIDplus::getOpenSslCnf() : @getenv('OPENSSL_CONF')
"config" => class_exists("\\ViaThinkSoft\\OIDplus\\OIDplus") ? OIDplus::getOpenSslCnf() : @getenv('OPENSSL_CONF')
);
$privKeyNew = @openssl_pkey_get_private($privKeyOld, $passphrase_old);
if ($privKeyNew === false) return false;
163,7 → 165,7
 
$str = trim($str);
 
if (!class_exists('OIDplus')) {
if (!class_exists(OIDplus::class)) {
return my_vsprintf($str, $sprintfArgs);
}
 
179,7 → 181,7
}
 
function _CheckParamExists($params, $key) {
if (class_exists('OIDplusException')) {
if (class_exists(OIDplusException::class)) {
if (!isset($params[$key])) throw new OIDplusException(_L('Parameter %1 is missing', $key));
} else {
if (!isset($params[$key])) throw new Exception(_L('Parameter %1 is missing', $key));
250,7 → 252,7
function url_get_contents($url, $userAgent='ViaThinkSoft-OIDplus/2.0') {
if (function_exists('curl_init')) {
$ch = curl_init();
if (class_exists('OIDplus')) {
if (class_exists(OIDplus::class)) {
if (ini_get('curl.cainfo') == '') curl_setopt($ch, CURLOPT_CAINFO, OIDplus::localpath() . 'vendor/cacert.pem');
}
curl_setopt($ch, CURLOPT_URL, $url);
/trunk/includes/oidplus.inc.php
19,8 → 19,6
 
// Before we do ANYTHING, check for dependencies! Do not include anything (except the GMP supplement) yet.
 
define('INSIDE_OIDPLUS', true);
 
require_once __DIR__ . '/functions.inc.php'; // Required for _L()
 
if (version_compare(PHP_VERSION, '7.0.0') < 0) {
80,6 → 78,11
spl_autoload_register(function ($class_name) {
static $class_refs = null;
 
// We only load based on the last element of the class name (ignore namespace)
// If there are multiple classes matching that name we just include all class files
$path = explode('\\',$class_name);
$class_name = end($path);
 
if (is_null($class_refs)) {
$valid_plugin_folders = array(
'adminPages',
104,7 → 107,9
$cn = strtolower($namespace) . $cn;
}
if (!isset($class_refs[$cn])) {
$class_refs[$cn] = $filename;
$class_refs[$cn] = array($filename);
} else {
$class_refs[$cn][] = $filename;;
}
}
};
125,7 → 130,9
 
$class_name = strtolower($class_name);
if (isset($class_refs[$class_name])) {
require $class_refs[$class_name];
foreach ($class_refs[$class_name] as $inc) {
require $inc;
}
unset($class_refs[$class_name]); // this emulates a "require_once" and is faster
}
});
/trunk/includes/oidplus_limits.inc.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
use ViaThinkSoft\OIDplus\OIDplus;
 
// Note: You can override these values in your userdata/baseconfig/config.inc.php file
// Do NOT edit this file, because your changes would get overwritten
/trunk/index.php
17,11 → 17,14
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusGui;
 
header('Content-Type:text/html; charset=UTF-8');
 
require_once __DIR__ . '/includes/oidplus.inc.php';
 
set_exception_handler(array('OIDplusGui', 'html_exception_handler'));
set_exception_handler(array(OIDplusGui::class, 'html_exception_handler'));
 
ob_start(); // allow cookie headers to be sent
 
/trunk/oidplus.min.css.php
17,6 → 17,8
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusDesignPlugin;
use MatthiasMullie\Minify;
 
require_once __DIR__ . '/includes/oidplus.inc.php';
101,7 → 103,7
$out .= process_file(__DIR__ . '/userdata/styles/oidplus_base.css');
} else {
// Use CSS of the design plugin
OIDplus::registerAllPlugins('design', 'OIDplusDesignPlugin', array('OIDplus','registerDesignPlugin'));
OIDplus::registerAllPlugins('design', OIDplusDesignPlugin::class, array(OIDplus::class,'registerDesignPlugin'));
$plugins = OIDplus::getDesignPlugins();
foreach ($plugins as $plugin) {
if ((basename($plugin->getPluginDirectory())) == $theme) {
/trunk/oidplus.min.js.php
17,6 → 17,8
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusLanguagePlugin;
use MatthiasMullie\Minify;
 
require_once __DIR__ . '/includes/oidplus.inc.php';
59,7 → 61,7
 
$files[] = 'var DEFAULT_LANGUAGE = '.json_encode(OIDplus::getDefaultLang()).';';
 
OIDplus::registerAllPlugins('language', 'OIDplusLanguagePlugin', null);
OIDplus::registerAllPlugins('language', OIDplusLanguagePlugin::class, null);
$translation_array = OIDplus::getTranslationArray();
$files[] = 'var language_messages = '.json_encode($translation_array).';';
 
/trunk/plugins/frdl/publicPages/1276945_rdap/OIDplusPagePublicRdap.class.php
17,8 → 17,11
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace Frdlweb\OIDplus;
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusPagePluginPublic;
 
class OIDplusPagePublicRdap extends OIDplusPagePluginPublic {
public function implementsFeature($id) {
/trunk/plugins/frdl/publicPages/1276945_rdap/OIDplusRDAP.class.php
19,8 → 19,13
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace Frdlweb\OIDplus;
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusObject;
use ViaThinkSoft\OIDplus\OIDplusOIDIP;
use ViaThinkSoft\OIDplus\OIDplusPagePublicObjects;
 
class OIDplusRDAP {
 
protected $rdapBaseUri;
/trunk/plugins/frdl/publicPages/1276945_rdap/manifest.xml
4,13 → 4,13
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>RDAP</name>
<author>Frdlweb</author>
<license>MIT</license>
<version>0.3.1</version>
<version>0.3.2</version>
<descriptionHTML>
<![CDATA[
<a href="https://github.com/frdl/oidplus-frdlweb-rdap" target="_blank">RDAP plugin for OIDplus 2.0</a>
19,7 → 19,7
<oid>1.3.6.1.4.1.37476.9000.108.1276945</oid>
</info>
<php>
<mainclass>OIDplusPagePublicRdap</mainclass>
<mainclass>Frdlweb\OIDplus\OIDplusPagePublicRdap</mainclass>
</php>
/trunk/plugins/frdl/publicPages/1276945_rdap/rdap/rdap.php
19,14 → 19,17
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusGui;
use ViaThinkSoft\OIDplus\OIDplusException;
use Frdlweb\OIDplus\OIDplusRDAP;
 
require_once __DIR__ . '/../../../../../includes/oidplus.inc.php';
 
 
 
OIDplus::init(true);
set_exception_handler(array('OIDplusGui', 'html_exception_handler'));
set_exception_handler(array(OIDplusGui::class, 'html_exception_handler'));
 
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusPagePublicRdap', false)) {
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_Frdlweb\OIDplus\OIDplusPagePublicRdap', false)) {
throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
}
 
/trunk/plugins/frdl/publicPages/altids/OIDplusPagePublicAltIds.class.php
7,8 → 7,12
* Licensed under the MIT License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace Frdlweb\OIDplus;
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusObject;
use ViaThinkSoft\OIDplus\OIDplusPagePluginPublic;
 
class OIDplusPagePublicAltIds extends OIDplusPagePluginPublic {
 
public function action($actionID, $params) {
103,7 → 107,7
if (strpos($id,':') !== false) {
list($ns, $altIdRaw) = explode(':', $id, 2);
if($ns === 'weid'){
$id='oid:'.\WeidOidConverter::weid2oid($id);
$id='oid:'.\Frdl\Weid\WeidOidConverter::weid2oid($id);
}
}
 
127,7 → 131,7
if (strpos($alt,':') !== false) {
list($ns, $altIdRaw) = explode(':', $alt, 2);
if($ns === 'oid'){
$weid=\WeidOidConverter::oid2weid($altIdRaw);
$weid=\Frdl\Weid\WeidOidConverter::oid2weid($altIdRaw);
break;
}
}
/trunk/plugins/frdl/publicPages/altids/manifest.xml
4,13 → 4,13
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>AltIds Tracking and Reverse Lookup</name>
<author>Frdlweb</author>
<license>MIT</license>
<version>1.0.2</version>
<version>1.0.3</version>
<descriptionHTML>
<![CDATA[
<a href="https://github.com/frdl/oidplus-plugin-alternate-id-tracking" target="_blank">AltIds Tracking and Reverse Lookup</a><br/>
21,7 → 21,7
</info>
 
<php>
<mainclass>OIDplusPagePublicAltIds</mainclass>
<mainclass>Frdlweb\OIDplus\OIDplusPagePublicAltIds</mainclass>
</php>
 
<css>
/trunk/plugins/tushevorg/publicPages/2000_uitweaks/OIDplusPagePublicUITweaks.class.php
24,8 → 24,13
* SOFTWARE.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace TushevOrg\OIDplus;
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusConfig;
use ViaThinkSoft\OIDplus\OIDplusException;
use ViaThinkSoft\OIDplus\OIDplusPagePluginPublic;
 
class OIDplusPagePublicUITweaks extends OIDplusPagePluginPublic {
 
public function init($html=true) {
/trunk/plugins/tushevorg/publicPages/2000_uitweaks/manifest.xml
4,13 → 4,13
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>UITweaks</name>
<author>tushev.org</author>
<license>MIT</license>
<version>1.1</version>
<version>1.1.1</version>
<descriptionHTML>
<![CDATA[
<a href="https://github.com/tushev/uitweaks-oidplus-plugin" target="_blank">UITweaks plugin for OIDplus 2.0</a>:
28,7 → 28,7
</info>
 
<php>
<mainclass>OIDplusPagePublicUITweaks</mainclass>
<mainclass>TushevOrg\OIDplus\OIDplusPagePublicUITweaks</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/010_notifications/OIDplusPageAdminNotifications.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminNotifications extends OIDplusPagePluginAdmin {
 
/trunk/plugins/viathinksoft/adminPages/010_notifications/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>Notifications</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminNotifications</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminNotifications</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/050_oobe/OIDplusPageAdminOOBE.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminOOBE extends OIDplusPagePluginAdmin {
 
/trunk/plugins/viathinksoft/adminPages/050_oobe/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>Out Of Box Experience (OOBE)</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminOOBE</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminOOBE</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/050_oobe/oobe.php
17,6 → 17,10
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusGui;
use ViaThinkSoft\OIDplus\OIDplusException;
 
require_once __DIR__ . '/../../../../includes/oidplus.inc.php';
 
ob_start(); // allow cookie headers to be sent
24,9 → 28,9
header('Content-Type:text/html; charset=UTF-8');
 
OIDplus::init(true);
set_exception_handler(array('OIDplusGui', 'html_exception_handler'));
set_exception_handler(array(OIDplusGui::class, 'html_exception_handler'));
 
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusPageAdminOOBE', false)) {
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplusPageAdminOOBE', false)) {
throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
}
 
67,7 → 71,7
if (isset($_POST['sent'])) {
try {
OIDplus::getActiveCaptchaPlugin()->captchaVerify($_POST);
} catch (Exception $e) {
} catch (\Exception $e) {
echo '<p><font color="red"><b>'.htmlentities($e->getMessage()).'</b></font></p>';
$errors_happened = true;
$edits_possible = false;
114,7 → 118,7
if ($do_edits) {
try {
OIDplus::config()->setValue('admin_email', isset($_POST['admin_email']) ? $_POST['admin_email'] : '');
} catch (Exception $e) {
} catch (\Exception $e) {
$msg = $e->getMessage();
$errors_happened = true;
}
139,7 → 143,7
if ($do_edits) {
try {
OIDplus::config()->setValue('system_title', isset($_POST['system_title']) ? $_POST['system_title'] : '');
} catch (Exception $e) {
} catch (\Exception $e) {
$msg = $e->getMessage();
$errors_happened = true;
}
/trunk/plugins/viathinksoft/adminPages/100_wellknown_oids/OIDplusPageAdminWellKnownOIDs.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminWellKnownOIDs extends OIDplusPagePluginAdmin {
 
/trunk/plugins/viathinksoft/adminPages/100_wellknown_oids/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>Well known OIDs</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminWellKnownOIDs</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminWellKnownOIDs</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/110_system_config/OIDplusPageAdminSystemConfig.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminSystemConfig extends OIDplusPagePluginAdmin {
 
/trunk/plugins/viathinksoft/adminPages/110_system_config/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>System configuration</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminSystemConfig</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminSystemConfig</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/111_systeminfo/OIDplusPageAdminSysteminfo.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminSysteminfo extends OIDplusPagePluginAdmin {
 
/trunk/plugins/viathinksoft/adminPages/111_systeminfo/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>Colors</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminSysteminfo</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminSysteminfo</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/120_registration/OIDplusPageAdminRegistration.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminRegistration extends OIDplusPagePluginAdmin {
 
604,7 → 604,7
try {
OIDplus::config()->setValue('reg_privacy', isset($_POST['reg_privacy']) ? $_POST['reg_privacy'] : 1);
OIDplus::config()->setValue('oobe_registration_done', '1');
} catch (Exception $e) {
} catch (\Exception $e) {
$msg = $e->getMessage();
$errors_happened = true;
}
/trunk/plugins/viathinksoft/adminPages/120_registration/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>System registration</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminRegistration</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminRegistration</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/125_forgot_password_admin/OIDplusPageAdminForgotPasswordAdmin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminForgotPasswordAdmin extends OIDplusPagePluginAdmin {
 
/trunk/plugins/viathinksoft/adminPages/125_forgot_password_admin/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>Forgot admin password (admin area)</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminForgotPasswordAdmin</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminForgotPasswordAdmin</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/130_create_ra/OIDplusPageAdminCreateRa.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminCreateRa extends OIDplusPagePluginAdmin {
 
/trunk/plugins/viathinksoft/adminPages/130_create_ra/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>Create RA</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminCreateRa</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminCreateRa</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/400_oidinfo_export/OIDplusPageAdminOIDInfoExport.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminOIDInfoExport extends OIDplusPagePluginAdmin {
 
660,7 → 660,7
$out_type = null;
$out_content = '';
 
// This file contains class OIDInfoAPI.
// This file contains class \OIDInfoAPI.
// We cannot include this in init(), because the init
// of the registration plugin (OIDplusPageAdminRegistration) uses
// OIDplusPageAdminOIDInfoExport::outputXML() before
668,7 → 668,7
// because OIDplusPageAdminRegistration::init() comes first sometimes.
require_once __DIR__ . '/oidinfo_api.inc.php';
 
$oa = new OIDInfoAPI();
$oa = new \OIDInfoAPI();
if ($only_non_existing) {
if (!function_exists('socket_create')) {
throw new OIDplusException(_L('You must install the PHP "sockets" in order to check for non-existing OIDs.'));
686,7 → 686,7
 
$params['allow_html'] = true;
$params['allow_illegal_email'] = true; // It should be enabled, because the creator could have used some kind of human-readable anti-spam technique
$params['soft_correct_behavior'] = OIDInfoAPI::SOFT_CORRECT_BEHAVIOR_NONE;
$params['soft_correct_behavior'] = \OIDInfoAPI::SOFT_CORRECT_BEHAVIOR_NONE;
$params['do_online_check'] = false; // Flag to disable this online check, because it generates a lot of traffic and runtime.
$params['do_illegality_check'] = true;
$params['do_simpleping_check'] = $only_non_existing;
/trunk/plugins/viathinksoft/adminPages/400_oidinfo_export/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>OID-Info.com import/export</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminOIDInfoExport</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminOIDInfoExport</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/400_oidinfo_export/oidinfo_export.php
17,6 → 17,10
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusException;
use ViaThinkSoft\OIDplus\OIDplusPageAdminOIDInfoExport;
 
require_once __DIR__ . '/../../../../includes/oidplus.inc.php';
 
header('Content-Type:text/html; charset=UTF-8');
23,7 → 27,7
 
OIDplus::init(true);
 
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusPageAdminOIDInfoExport', false)) {
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplusPageAdminOIDInfoExport', false)) {
throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
}
 
/trunk/plugins/viathinksoft/adminPages/500_list_ras/OIDplusPageAdminListRAs.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminListRAs extends OIDplusPagePluginAdmin {
 
/trunk/plugins/viathinksoft/adminPages/500_list_ras/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>List RAs</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminListRAs</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminListRAs</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/600_log/OIDplusPageAdminLogEvents.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminLogEvents extends OIDplusPagePluginAdmin {
 
/trunk/plugins/viathinksoft/adminPages/600_log/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>Log messages</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminLogEvents</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminLogEvents</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/700_colors/OIDplusPageAdminColors.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminColors extends OIDplusPagePluginAdmin {
 
231,7 → 231,7
try {
OIDplus::config()->setValue('color_invert', $set_value ? 1 : 0);
OIDplus::config()->setValue('oobe_colors_done', '1');
} catch (Exception $e) {
} catch (\Exception $e) {
$msg = $e->getMessage();
$errors_happened = true;
}
/trunk/plugins/viathinksoft/adminPages/700_colors/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>Design</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminColors</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminColors</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/800_plugins/OIDplusPageAdminPlugins.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminPlugins extends OIDplusPagePluginAdmin {
 
82,17 → 82,17
$out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png' : '';
 
$back_link = 'oidplus:system_plugins';
if (get_parent_class($classname) == 'OIDplusPagePluginPublic') $back_link = 'oidplus:system_plugins.pages.public';
if (get_parent_class($classname) == 'OIDplusPagePluginRa') $back_link = 'oidplus:system_plugins.pages.ra';
if (get_parent_class($classname) == 'OIDplusPagePluginAdmin') $back_link = 'oidplus:system_plugins.pages.admin';
if (get_parent_class($classname) == 'OIDplusObjectTypePlugin') $back_link = 'oidplus:system_plugins.objects';
if (get_parent_class($classname) == 'OIDplusDatabasePlugin') $back_link = 'oidplus:system_plugins.database';
if (get_parent_class($classname) == 'OIDplusSqlSlangPlugin') $back_link = 'oidplus:system_plugins.sql';
if (get_parent_class($classname) == 'OIDplusAuthPlugin') $back_link = 'oidplus:system_plugins.auth';
if (get_parent_class($classname) == 'OIDplusLoggerPlugin') $back_link = 'oidplus:system_plugins.logger';
if (get_parent_class($classname) == 'OIDplusLanguagePlugin') $back_link = 'oidplus:system_plugins.language';
if (get_parent_class($classname) == 'OIDplusDesignPlugin') $back_link = 'oidplus:system_plugins.design';
if (get_parent_class($classname) == 'OIDplusCaptchaPlugin') $back_link = 'oidplus:system_plugins.captcha';
if (get_parent_class($classname) == OIDplusPagePluginPublic::class) $back_link = 'oidplus:system_plugins.pages.public';
if (get_parent_class($classname) == OIDplusPagePluginRa::class) $back_link = 'oidplus:system_plugins.pages.ra';
if (get_parent_class($classname) == OIDplusPagePluginAdmin::class) $back_link = 'oidplus:system_plugins.pages.admin';
if (get_parent_class($classname) == OIDplusObjectTypePlugin::class) $back_link = 'oidplus:system_plugins.objects';
if (get_parent_class($classname) == OIDplusDatabasePlugin::class) $back_link = 'oidplus:system_plugins.database';
if (get_parent_class($classname) == OIDplusSqlSlangPlugin::class) $back_link = 'oidplus:system_plugins.sql';
if (get_parent_class($classname) == OIDplusAuthPlugin::class) $back_link = 'oidplus:system_plugins.auth';
if (get_parent_class($classname) == OIDplusLoggerPlugin::class) $back_link = 'oidplus:system_plugins.logger';
if (get_parent_class($classname) == OIDplusLanguagePlugin::class) $back_link = 'oidplus:system_plugins.language';
if (get_parent_class($classname) == OIDplusDesignPlugin::class) $back_link = 'oidplus:system_plugins.design';
if (get_parent_class($classname) == OIDplusCaptchaPlugin::class) $back_link = 'oidplus:system_plugins.captcha';
$out['text'] = '<p><a '.OIDplus::gui()->link($back_link).'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>';
 
$out['text'] .= '<div><label class="padding_label">'._L('Class name').'</label><b>'.htmlentities($classname).'</b></div>'.
/trunk/plugins/viathinksoft/adminPages/800_plugins/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>Plugins</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminPlugins</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminPlugins</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/900_software_update/OIDplusPageAdminSoftwareUpdate.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminSoftwareUpdate extends OIDplusPagePluginAdmin {
 
318,7 → 318,7
$content .= "\n";
}
return $content;
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}
 
346,7 → 346,7
$max_rev = array_keys($ary)[0];
$newest_version = 'svn-' . $max_rev;
return $newest_version;
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}
}
357,7 → 357,7
ob_start();
try {
$cont = $this->showChangelog($local_installation);
} catch (Exception $e) {
} catch (\Exception $e) {
$cont = _L('Error: %1',$e->getMessage());
}
ob_end_clean();
/trunk/plugins/viathinksoft/adminPages/900_software_update/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>Software update</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminSoftwareUpdate</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminSoftwareUpdate</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/901_vnag_version_check/OIDplusPageAdminVNagVersionCheck.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminVNagVersionCheck extends OIDplusPagePluginAdmin {
 
/trunk/plugins/viathinksoft/adminPages/901_vnag_version_check/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>VNag version check</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminVNagVersionCheck</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminVNagVersionCheck</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/901_vnag_version_check/vnag.php
17,6 → 17,10
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusException;
use ViaThinkSoft\OIDplus\OIDplusPageAdminVNagVersionCheck;
 
include __DIR__ . '/../../../../vendor/danielmarschall/vnag/framework/vnag_framework.inc.php';
include __DIR__ . '/../../../../includes/oidplus.inc.php';
 
24,7 → 28,7
 
OIDplus::init(false);
 
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusPageAdminVNagVersionCheck', false)) {
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplusPageAdminVNagVersionCheck', false)) {
throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
}
 
142,7 → 146,7
krsort($ary);
$max_rev = array_keys($ary)[0];
return 'svn-' . $max_rev;
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}
}
/trunk/plugins/viathinksoft/adminPages/902_systemfile_check/OIDplusPageAdminSystemFileCheck.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminSystemFileCheck extends OIDplusPagePluginAdmin {
 
120,7 → 120,7
if ($num == 0) {
$out['text'] .= _L('Everything OK!');
}
} catch (Exception $e) {
} catch (\Exception $e) {
$out['text'] .= mb_strtoupper(_L('Error')).': '.htmlentities($e->getMessage());
}
 
/trunk/plugins/viathinksoft/adminPages/902_systemfile_check/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>System file check</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminSystemFileCheck</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminSystemFileCheck</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/910_automated_ajax_calls/OIDplusPageAdminAutomatedAJAXCalls.class.php
20,7 → 20,7
// ATTENTION: If you change something, please make sure that the changes
// are synchronous with OIDplusPageRaAutomatedAJAXCalls
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminAutomatedAJAXCalls extends OIDplusPagePluginAdmin {
 
/trunk/plugins/viathinksoft/adminPages/910_automated_ajax_calls/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>Automated AJAX calls</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminAutomatedAJAXCalls</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminAutomatedAJAXCalls</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/adminPages/920_nostalgia/OIDplusPageAdminNostalgia.class.php
20,7 → 20,7
// ATTENTION: If you change something, please make sure that the changes
// are synchronous with OIDplusPageRaAutomatedAJAXCalls
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageAdminNostalgia extends OIDplusPagePluginAdmin {
 
/trunk/plugins/viathinksoft/adminPages/920_nostalgia/export_dos.php
17,17 → 17,21
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusGui;
use ViaThinkSoft\OIDplus\OIDplusException;
 
header('Content-Type:text/html; charset=UTF-8');
 
require_once __DIR__ . '/../../../../includes/oidplus.inc.php';
 
set_exception_handler(array('OIDplusGui', 'html_exception_handler'));
set_exception_handler(array(OIDplusGui::class, 'html_exception_handler'));
 
@set_time_limit(0);
 
OIDplus::init(true);
 
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusPageAdminNostalgia', false)) {
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplusPageAdminNostalgia', false)) {
throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
}
 
/trunk/plugins/viathinksoft/adminPages/920_nostalgia/export_win.php
17,17 → 17,21
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusGui;
use ViaThinkSoft\OIDplus\OIDplusException;
 
header('Content-Type:text/html; charset=UTF-8');
 
require_once __DIR__ . '/../../../../includes/oidplus.inc.php';
 
set_exception_handler(array('OIDplusGui', 'html_exception_handler'));
set_exception_handler(array(OIDplusGui::class, 'html_exception_handler'));
 
@set_time_limit(0);
 
OIDplus::init(true);
 
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusPageAdminNostalgia', false)) {
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplusPageAdminNostalgia', false)) {
throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
}
 
/trunk/plugins/viathinksoft/adminPages/920_nostalgia/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginAdmin</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginAdmin</type>
 
<info>
<name>Nostalgia</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageAdminNostalgia</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageAdminNostalgia</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/auth/A1_phpgeneric_salted_hex/OIDplusAuthPluginPhpGenericSaltedHex.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusAuthPluginPhpGenericSaltedHex extends OIDplusAuthPlugin {
 
/trunk/plugins/viathinksoft/auth/A1_phpgeneric_salted_hex/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.8.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_auth.xsd">
 
<type>OIDplusAuthPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusAuthPlugin</type>
 
<info>
<name>PHP generic salted hash (hex notation)</name>
22,7 → 22,7
</info>
 
<php>
<mainclass>OIDplusAuthPluginPhpGenericSaltedHex</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusAuthPluginPhpGenericSaltedHex</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/auth/A2_sha3_salted_base64/OIDplusAuthPluginSha3SaltedBase64.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusAuthPluginSha3SaltedBase64 extends OIDplusAuthPlugin {
 
/trunk/plugins/viathinksoft/auth/A2_sha3_salted_base64/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.8.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_auth.xsd">
 
<type>OIDplusAuthPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusAuthPlugin</type>
 
<info>
<name>SHA3 salted hash (base64 notation)</name>
19,7 → 19,7
</info>
 
<php>
<mainclass>OIDplusAuthPluginSha3SaltedBase64</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusAuthPluginSha3SaltedBase64</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/auth/A3_bcrypt/OIDplusAuthPluginBCrypt.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusAuthPluginBCrypt extends OIDplusAuthPlugin {
 
/trunk/plugins/viathinksoft/auth/A3_bcrypt/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.8.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_auth.xsd">
 
<type>OIDplusAuthPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusAuthPlugin</type>
 
<info>
<name>BCrypt hash</name>
18,7 → 18,7
</info>
 
<php>
<mainclass>OIDplusAuthPluginBCrypt</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusAuthPluginBCrypt</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/captcha/hcaptcha/OIDplusCaptchaPluginHCaptcha.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusCaptchaPluginHCaptcha extends OIDplusCaptchaPlugin {
 
/trunk/plugins/viathinksoft/captcha/hcaptcha/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.12.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_captcha.xsd">
 
<type>OIDplusCaptchaPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusCaptchaPlugin</type>
 
<info>
<name>hCaptcha</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusCaptchaPluginHCaptcha</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusCaptchaPluginHCaptcha</mainclass>
</php>
<css>
/trunk/plugins/viathinksoft/captcha/none/OIDplusCaptchaPluginNone.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusCaptchaPluginNone extends OIDplusCaptchaPlugin {
 
/trunk/plugins/viathinksoft/captcha/none/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.12.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_captcha.xsd">
 
<type>OIDplusCaptchaPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusCaptchaPlugin</type>
 
<info>
<name>No Captcha</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusCaptchaPluginNone</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusCaptchaPluginNone</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/captcha/recaptcha/OIDplusCaptchaPluginRecaptcha.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusCaptchaPluginRecaptcha extends OIDplusCaptchaPlugin {
 
100,9 → 100,10
return '<div id="CAPTCHAPLUGIN_PARAMS_RECAPTCHA">'.
'<p>(<a href="https://developers.google.com/recaptcha/intro" target="_blank">'._L('more information and obtain key').'</a>)</p>'.
'<p>'._L('reCAPTCHA Version').'<br><select id="recaptcha_version">'.
' <option name="OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V2_CHECKBOX">reCAPTCHA V2 Checkbox</option>'.
' <option name="OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V2_INVISIBLE">reCAPTCHA V2 Invisible</option>'.
' <option name="OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V3">reCAPTCHA V3</option>'.
// Note: JavaScript will add "\ViaThinkSoft\OIDplus\OIDplusCaptchaPluginRecaptcha::" in front of the name
' <option name="RECAPTCHA_V2_CHECKBOX">reCAPTCHA V2 Checkbox</option>'.
' <option name="RECAPTCHA_V2_INVISIBLE">reCAPTCHA V2 Invisible</option>'.
' <option name="RECAPTCHA_V3">reCAPTCHA V3</option>'.
'</select></p>'.
'<p>'._L('reCAPTCHA Public key').'<br><input id="recaptcha_public" type="text" onkeypress="rebuild()" onkeyup="rebuild()"> <span id="recaptcha_public_warn"></span></p>'.
'<p>'._L('reCAPTCHA Private key').'<br><input id="recaptcha_private" type="text" onkeypress="rebuild()" onkeyup="rebuild()"> <span id="recaptcha_private_warn"></span></p>'.
/trunk/plugins/viathinksoft/captcha/recaptcha/OIDplusCaptchaPluginRecaptchaSetup.js
56,7 → 56,7
var e = $("#captcha_plugin")[0];
var strPlugin = e.options[e.selectedIndex].value;
if (strPlugin.toLowerCase() != 'reCAPTCHA'.toLowerCase()) return '';
return 'OIDplus::baseConfig()->setValue(\'RECAPTCHA_VERSION\', '+$("#recaptcha_version").find('option:selected').attr("name")+');<br>' +
return 'OIDplus::baseConfig()->setValue(\'RECAPTCHA_VERSION\', \\ViaThinkSoft\\OIDplus\\OIDplusCaptchaPluginRecaptcha::'+$("#recaptcha_version").find('option:selected').attr("name")+');<br>' +
'OIDplus::baseConfig()->setValue(\'RECAPTCHA_PUBLIC\', \''+$("#recaptcha_public")[0].value+'\');<br>' +
'OIDplus::baseConfig()->setValue(\'RECAPTCHA_PRIVATE\', \''+$("#recaptcha_private")[0].value+'\');<br>';
});
/trunk/plugins/viathinksoft/captcha/recaptcha/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.12.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_captcha.xsd">
 
<type>OIDplusCaptchaPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusCaptchaPlugin</type>
 
<info>
<name>Google Recaptcha</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusCaptchaPluginRecaptcha</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusCaptchaPluginRecaptcha</mainclass>
</php>
<css>
/trunk/plugins/viathinksoft/captcha/vts_challenge/OIDplusCaptchaPluginVtsClientChallenge.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusCaptchaPluginVtsClientChallenge extends OIDplusCaptchaPlugin {
 
/trunk/plugins/viathinksoft/captcha/vts_challenge/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.12.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_captcha.xsd">
 
<type>OIDplusCaptchaPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusCaptchaPlugin</type>
 
<info>
<name>ViaThinkSoft Client Challenge</name>
20,7 → 20,7
</info>
 
<php>
<mainclass>OIDplusCaptchaPluginVtsClientChallenge</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusCaptchaPluginVtsClientChallenge</mainclass>
</php>
<css>
/trunk/plugins/viathinksoft/database/mysqli/OIDplusDatabaseConnectionMySQLi.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDatabaseConnectionMySQLi extends OIDplusDatabaseConnection {
private $conn = null; // only with MySQLnd
104,7 → 104,7
$socket = OIDplus::baseConfig()->getValue('MYSQL_SOCKET', '');
list($hostname,$port) = explode(':', $host.':'.ini_get("mysqli.default_port"));
$port = intval($port);
$this->conn = @new mysqli($hostname, $username, $password, $database, $port, $socket);
$this->conn = @new \mysqli($hostname, $username, $password, $database, $port, $socket);
if (!empty($this->conn->connect_error) || ($this->conn->connect_errno != 0)) {
$message = $this->conn->connect_error;
throw new OIDplusConfigInitializationException(trim(_L('Connection to the database failed!').' '.$message));
/trunk/plugins/viathinksoft/database/mysqli/OIDplusDatabasePluginMySQLi.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDatabasePluginMySQLi extends OIDplusDatabasePlugin {
 
/trunk/plugins/viathinksoft/database/mysqli/OIDplusQueryResultMySQL.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusQueryResultMySQL extends OIDplusQueryResult {
protected $no_resultset;
/trunk/plugins/viathinksoft/database/mysqli/OIDplusQueryResultMySQLNoNativeDriver.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusQueryResultMySQLNoNativeDriver extends OIDplusQueryResult {
// Based on https://www.php.net/manual/de/mysqli-stmt.get-result.php#113398
98,10 → 98,10
$ary = $this->fetch_array();
if (!$ary) return null;
 
$obj = new stdClass;
$obj = new \stdClass;
foreach ($ary as $name => $val) {
$obj->$name = $val;
}
return $obj;
}
}
}
/trunk/plugins/viathinksoft/database/mysqli/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.6.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_database.xsd">
 
<type>OIDplusDatabasePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusDatabasePlugin</type>
 
<info>
<name>MySQLi</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusDatabasePluginMySQLi</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusDatabasePluginMySQLi</mainclass>
</php>
 
<cssSetup>
/trunk/plugins/viathinksoft/database/oci/OIDplusDatabaseConnectionOci.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDatabaseConnectionOci extends OIDplusDatabaseConnection {
private $conn = null;
/trunk/plugins/viathinksoft/database/oci/OIDplusDatabasePluginOci.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDatabasePluginOci extends OIDplusDatabasePlugin {
 
/trunk/plugins/viathinksoft/database/oci/OIDplusQueryResultOci.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusQueryResultOci extends OIDplusQueryResult {
protected $no_resultset;
83,7 → 83,7
}
 
private static function array_to_stdobj($ary) {
$obj = new stdClass;
$obj = new \stdClass;
foreach ($ary as $name => $val) {
$obj->$name = $val;
 
/trunk/plugins/viathinksoft/database/oci/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.6.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_database.xsd">
 
<type>OIDplusDatabasePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusDatabasePlugin</type>
 
<info>
<name>Oracle (OCI8)</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusDatabasePluginOci</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusDatabasePluginOci</mainclass>
</php>
<cssSetup>
/trunk/plugins/viathinksoft/database/odbc/OIDplusDatabaseConnectionODBC.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDatabaseConnectionODBC extends OIDplusDatabaseConnection {
private $conn;
154,7 → 154,7
 
try {
@odbc_exec($this->conn, "SET NAMES 'utf8'"); // Does most likely NOT work with ODBC. Try adding ";CHARSET=UTF8" (or similar) to the DSN
} catch (Exception $e) {
} catch (\Exception $e) {
}
 
// We check if the DBMS supports autocommit.
/trunk/plugins/viathinksoft/database/odbc/OIDplusDatabasePluginODBC.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDatabasePluginODBC extends OIDplusDatabasePlugin {
 
/trunk/plugins/viathinksoft/database/odbc/OIDplusQueryResultODBC.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusQueryResultODBC extends OIDplusQueryResult {
protected $no_resultset;
/trunk/plugins/viathinksoft/database/odbc/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.6.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_database.xsd">
 
<type>OIDplusDatabasePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusDatabasePlugin</type>
 
<info>
<name>ODBC</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusDatabasePluginODBC</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusDatabasePluginODBC</mainclass>
</php>
<cssSetup>
/trunk/plugins/viathinksoft/database/pdo/OIDplusDatabaseConnectionPDO.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDatabaseConnectionPDO extends OIDplusDatabaseConnection {
private $conn = null;
74,7 → 74,7
$out = @($this->conn->lastInsertId());
if ($out === false) return parent::insert_id(); // fallback method that uses the SQL slang
return $out;
} catch (Exception $e) {
} catch (\Exception $e) {
return parent::insert_id(); // fallback method that uses the SQL slang
}
}
90,9 → 90,9
 
try {
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_SILENT,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => true,
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_SILENT,
\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
\PDO::ATTR_EMULATE_PREPARES => true,
];
 
// Try connecting to the database
102,8 → 102,8
 
if (stripos($dsn,"charset=") === false) $dsn = "$dsn;charset=UTF8";
 
$this->conn = new PDO($dsn, $username, $password, $options);
} catch (PDOException $e) {
$this->conn = new \PDO($dsn, $username, $password, $options);
} catch (\PDOException $e) {
$message = $e->getMessage();
throw new OIDplusConfigInitializationException(trim(_L('Connection to the database failed!').' '.$message));
}
112,7 → 112,7
 
try {
@$this->conn->exec("SET NAMES 'utf8'");
} catch (Exception $e) {
} catch (\Exception $e) {
}
 
// We check if the DBMS supports autocommit.
126,7 → 126,7
$this->conn->beginTransaction();
$this->conn->rollBack();
$this->transactions_supported = true;
} catch (Exception $e) {
} catch (\Exception $e) {
$this->transactions_supported = false;
}
}
/trunk/plugins/viathinksoft/database/pdo/OIDplusDatabasePluginPDO.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDatabasePluginPDO extends OIDplusDatabasePlugin {
 
/trunk/plugins/viathinksoft/database/pdo/OIDplusQueryResultPDO.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusQueryResultPDO extends OIDplusQueryResult {
protected $no_resultset;
68,7 → 68,7
$ret = array_shift($this->prefetchedArray);
} else {
if ($this->no_resultset) throw new OIDplusException(_L('The query has returned no result set (i.e. it was not a SELECT query)'));
$ret = $this->res->fetch(PDO::FETCH_ASSOC);
$ret = $this->res->fetch(\PDO::FETCH_ASSOC);
if ($ret === false) $ret = null;
}
if ($ret) $this->countAlreadyFetched++;
87,7 → 87,7
}
 
private static function array_to_stdobj($ary) {
$obj = new stdClass;
$obj = new \stdClass;
foreach ($ary as $name => $val) {
$obj->$name = $val;
}
100,7 → 100,7
$ret = is_null($ary) ? null : self::array_to_stdobj($ary);
} else {
if ($this->no_resultset) throw new OIDplusException(_L('The query has returned no result set (i.e. it was not a SELECT query)'));
$ret = $this->res->fetch(PDO::FETCH_OBJ);
$ret = $this->res->fetch(\PDO::FETCH_OBJ);
if ($ret === false) $ret = null;
}
if ($ret) $this->countAlreadyFetched++;
/trunk/plugins/viathinksoft/database/pdo/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.6.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_database.xsd">
 
<type>OIDplusDatabasePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusDatabasePlugin</type>
 
<info>
<name>PDO</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusDatabasePluginPDO</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusDatabasePluginPDO</mainclass>
</php>
<cssSetup>
/trunk/plugins/viathinksoft/database/pgsql/OIDplusDatabaseConnectionPgSql.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDatabaseConnectionPgSql extends OIDplusDatabaseConnection {
private $conn = null;
73,7 → 73,7
public function insert_id(): int {
try {
return (int)$this->query('select lastval() as id')->fetch_object()->id;
} catch (Exception $e) {
} catch (\Exception $e) {
return 0;
}
}
127,7 → 127,7
 
try {
$this->query("SET NAMES 'utf8'");
} catch (Exception $e) {
} catch (\Exception $e) {
}
}
 
/trunk/plugins/viathinksoft/database/pgsql/OIDplusDatabasePluginPgSql.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDatabasePluginPgSql extends OIDplusDatabasePlugin {
 
/trunk/plugins/viathinksoft/database/pgsql/OIDplusQueryResultPgSql.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusQueryResultPgSql extends OIDplusQueryResult {
protected $no_resultset;
/trunk/plugins/viathinksoft/database/pgsql/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.6.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_database.xsd">
 
<type>OIDplusDatabasePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusDatabasePlugin</type>
 
<info>
<name>PostgreSQL</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusDatabasePluginPgSql</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusDatabasePluginPgSql</mainclass>
</php>
<cssSetup>
/trunk/plugins/viathinksoft/database/sqlite3/OIDplusDatabaseConnectionSQLite3.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDatabaseConnectionSQLite3 extends OIDplusDatabaseConnection {
private $conn = null;
29,7 → 29,7
if (is_null($prepared_args)) {
try {
$res = $this->conn->query($sql);
} catch (Exception $e) {
} catch (\Exception $e) {
$res = false;
}
if ($res === false) {
55,7 → 55,7
} else {
try {
$stmt = $this->conn->prepare($sql);
} catch (Exception $e) {
} catch (\Exception $e) {
$stmt = false;
}
if ($stmt === false) {
75,7 → 75,7
 
try {
$ps = $stmt->execute();
} catch (Exception $e) {
} catch (\Exception $e) {
$ps = false;
}
if ($ps === false) {
93,7 → 93,7
// e.g. the config table. Therefore, our testcase will fail.
return (int)$this->conn->lastInsertRowID();
//return (int)$this->query('select last_insert_rowid() as id')->fetch_object()->id;
} catch (Exception $e) {
} catch (\Exception $e) {
return 0;
}
}
119,8 → 119,8
$filename = OIDplus::localpath().$filename;
}
 
$this->conn = new SQLite3($filename, $flags, $encryption);
} catch (Exception $e) {
$this->conn = new \SQLite3($filename, $flags, $encryption);
} catch (\Exception $e) {
throw new OIDplusConfigInitializationException(trim(_L('Connection to the database failed!').' ' . $e->getMessage()));
}
 
/trunk/plugins/viathinksoft/database/sqlite3/OIDplusDatabasePluginSQLite3.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDatabasePluginSQLite3 extends OIDplusDatabasePlugin {
 
/trunk/plugins/viathinksoft/database/sqlite3/OIDplusQueryResultSQLite3.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusQueryResultSQLite3 extends OIDplusQueryResult {
protected $no_resultset;
82,10 → 82,10
$ary = $this->fetch_array();
if (!$ary) return null;
 
$obj = new stdClass;
$obj = new \stdClass;
foreach ($ary as $name => $val) {
$obj->$name = $val;
}
return $obj;
}
}
}
/trunk/plugins/viathinksoft/database/sqlite3/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.6.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_database.xsd">
 
<type>OIDplusDatabasePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusDatabasePlugin</type>
 
<info>
<name>SQLite3</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusDatabasePluginSQLite3</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusDatabasePluginSQLite3</mainclass>
</php>
<cssSetup>
/trunk/plugins/viathinksoft/design/default/OIDplusDesignPluginDefault.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDesignPluginDefault extends OIDplusDesignPlugin {
 
/trunk/plugins/viathinksoft/design/default/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.7.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_design.xsd">
 
<type>OIDplusDesignPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusDesignPlugin</type>
 
<info>
<name>OIDplus Default Design</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusDesignPluginDefault</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusDesignPluginDefault</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/design/ironbase/OIDplusDesignPluginIronBase.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDesignPluginIronBase extends OIDplusDesignPlugin {
 
/trunk/plugins/viathinksoft/design/ironbase/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.7.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_design.xsd">
 
<type>OIDplusDesignPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusDesignPlugin</type>
 
<info>
<name>IronBASE-Like Design</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusDesignPluginIronBase</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusDesignPluginIronBase</mainclass>
</php>
<css>
/trunk/plugins/viathinksoft/language/dede/OIDplusLanguagePluginGerman.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusLanguagePluginGerman extends OIDplusLanguagePlugin {
 
/trunk/plugins/viathinksoft/language/dede/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.3.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_language.xsd">
 
<type>OIDplusLanguagePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusLanguagePlugin</type>
 
<info>
<name>Deutsch</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusLanguagePluginGerman</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusLanguagePluginGerman</mainclass>
</php>
 
<language>
/trunk/plugins/viathinksoft/language/dede/messages.xml
5270,18 → 5270,18
</message>
<message>
<source><![CDATA[
Plugin "%1/%2" is erroneous
Plugin "%1" is erroneous
]]></source>
<target><![CDATA[
Plugin "%1/%2" ist fehlerhaft
Plugin "%1" ist fehlerhaft
]]></target>
</message>
<message>
<source><![CDATA[
Plugin "%1/%2" is misplaced
Plugin "%1" is misplaced
]]></source>
<target><![CDATA[
Plugin "%1/%2" ist am falschen Ort
Plugin "%1" ist am falschen Ort
]]></target>
</message>
<message>
6806,6 → 6806,14
</message>
<message>
<source><![CDATA[
The plugin uses no namespaces. The new version of OIDplus requires plugin class files to be in a namespace. Please notify your plugin author and ask for an update.
]]></source>
<target><![CDATA[
Das Plugin verwendet keinen PHP-Namensraum. Die neue Version von OIDplus erfordert dass alle Plugins Klassen-Namensräume verwenden. Bitte kontaktieren Sie den Author des Plugins, um ein Update zu erhalten.
]]></target>
</message>
<message>
<source><![CDATA[
The query according to OID Information Protocol is:
]]></source>
<target><![CDATA[
6942,6 → 6950,14
</message>
<message>
<source><![CDATA[
Third-party plugins must not use the ViaThinkSoft PHP namespace. Please use your own vendor namespace.
]]></source>
<target><![CDATA[
Drittanbieter-Plugins dürfen nicht den ViaThinkSoft PHP-Namensraum verwenden. Bitte verwenden Sie einen eigenen Namespace.
]]></target>
</message>
<message>
<source><![CDATA[
This RA does not exist.
]]></source>
<target><![CDATA[
7982,6 → 7998,14
</message>
<message>
<source><![CDATA[
Your base configuration file is outdated. Please change "%1" to "%2".
]]></source>
<target><![CDATA[
Die Basiskonfigurations-Datei ist veraltet. Bitte ändern Sie "%1" zu "%2".
]]></target>
</message>
<message>
<source><![CDATA[
Your email address: %1
]]></source>
<target><![CDATA[
/trunk/plugins/viathinksoft/language/enus/OIDplusLanguagePluginEnglishUSA.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusLanguagePluginEnglishUSA extends OIDplusLanguagePlugin {
 
/trunk/plugins/viathinksoft/language/enus/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.3.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_language.xsd">
 
<type>OIDplusLanguagePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusLanguagePlugin</type>
 
<info>
<name>English (USA)</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusLanguagePluginEnglishUSA</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusLanguagePluginEnglishUSA</mainclass>
</php>
 
<language>
/trunk/plugins/viathinksoft/logger/000_database/OIDplusLoggerPluginDatabase.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusLoggerPluginDatabase extends OIDplusLoggerPlugin {
 
/trunk/plugins/viathinksoft/logger/000_database/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.9.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_logger.xsd">
 
<type>OIDplusLoggerPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusLoggerPlugin</type>
 
<info>
<name>OIDplus Database</name>
18,7 → 18,7
</info>
 
<php>
<mainclass>OIDplusLoggerPluginDatabase</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusLoggerPluginDatabase</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/logger/100_linux_syslog/OIDplusLoggerPluginLinuxSyslog.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusLoggerPluginLinuxSyslog extends OIDplusLoggerPlugin {
 
/trunk/plugins/viathinksoft/logger/100_linux_syslog/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.9.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_logger.xsd">
 
<type>OIDplusLoggerPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusLoggerPlugin</type>
 
<info>
<name>Syslog (Linux)</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusLoggerPluginLinuxSyslog</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusLoggerPluginLinuxSyslog</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/logger/200_windows_eventlog/OIDplusLoggerPluginWindowsEventLog.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusLoggerPluginWindowsEventLog extends OIDplusLoggerPlugin {
 
42,11 → 42,11
}
 
try {
$x = new COM(self::CLASS_ViaThinkSoftSimpleEventLog);
$x = new \COM(self::CLASS_ViaThinkSoftSimpleEventLog);
$reason = '?'; // LogSimulate() must actively clear it if everything is OK
$x->LogSimulate(self::LOGPROVIDER, self::LOGEVENT_MSG_SUCCESS, 'TEST', $reason);/** @phpstan-ignore-line */
return $reason != '';
} catch (Exception $e) {
} catch (\Exception $e) {
$reason = $e->getMessage();
return false;
}
81,7 → 81,7
}
 
try {
$x = new COM(self::CLASS_ViaThinkSoftSimpleEventLog);
$x = new \COM(self::CLASS_ViaThinkSoftSimpleEventLog);
 
$admin_severity = 0;
foreach ($users as list($severity, $username)) {
92,7 → 92,7
$x->LogEvent(self::LOGPROVIDER, self::convertOIDplusToWindowsSeverity($admin_severity), $event);/** @phpstan-ignore-line */
 
return true;
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}
 
/trunk/plugins/viathinksoft/logger/200_windows_eventlog/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.9.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_logger.xsd">
 
<type>OIDplusLoggerPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusLoggerPlugin</type>
 
<info>
<name>Windows Event Log</name>
18,7 → 18,7
</info>
 
<php>
<mainclass>OIDplusLoggerPluginWindowsEventLog</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusLoggerPluginWindowsEventLog</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/logger/300_userdata_logfile/OIDplusLoggerPluginUserdataLogfile.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusLoggerPluginUserdataLogfile extends OIDplusLoggerPlugin {
 
/trunk/plugins/viathinksoft/logger/300_userdata_logfile/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.9.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_logger.xsd">
 
<type>OIDplusLoggerPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusLoggerPlugin</type>
 
<info>
<name>Simple Log File</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusLoggerPluginUserdataLogfile</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusLoggerPluginUserdataLogfile</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/objectTypes/aid/OIDplusAid.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusAid extends OIDplusObject {
private $aid;
332,7 → 332,7
$len = str_pad("$len", 2, '0', STR_PAD_LEFT);
$type = '06'; // absolute OID
$der = "$type $len $der";
$oid = OidDerConverter::derToOID(OidDerConverter::hexStrToArray($der));
$oid = \OidDerConverter::derToOID(\OidDerConverter::hexStrToArray($der));
if ($oid) {
$oid = ltrim($oid,'.');
$ids[] = new OIDplusAltId('oid', $oid, _L('Object Identifier (OID)'));
/trunk/plugins/viathinksoft/objectTypes/aid/OIDplusObjectTypePluginAid.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusObjectTypePluginAid extends OIDplusObjectTypePlugin {
 
/trunk/plugins/viathinksoft/objectTypes/aid/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.10.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_objectTypes.xsd">
 
<type>OIDplusObjectTypePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusObjectTypePlugin</type>
 
<info>
<name>Application Identifier (ISO/IEC 7816)</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusObjectTypePluginAid</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusObjectTypePluginAid</mainclass>
</php>
 
<js>
/trunk/plugins/viathinksoft/objectTypes/doi/OIDplusDoi.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDoi extends OIDplusObject {
private $doi;
/trunk/plugins/viathinksoft/objectTypes/doi/OIDplusObjectTypePluginDoi.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusObjectTypePluginDoi extends OIDplusObjectTypePlugin {
 
/trunk/plugins/viathinksoft/objectTypes/doi/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.10.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_objectTypes.xsd">
 
<type>OIDplusObjectTypePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusObjectTypePlugin</type>
 
<info>
<name>Digital Object Identifier (DOI)</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusObjectTypePluginDoi</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusObjectTypePluginDoi</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/objectTypes/domain/OIDplusDomain.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusDomain extends OIDplusObject {
private $domain;
/trunk/plugins/viathinksoft/objectTypes/domain/OIDplusObjectTypePluginDomain.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusObjectTypePluginDomain extends OIDplusObjectTypePlugin {
 
/trunk/plugins/viathinksoft/objectTypes/domain/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.10.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_objectTypes.xsd">
 
<type>OIDplusObjectTypePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusObjectTypePlugin</type>
 
<info>
<name>Domain Names</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusObjectTypePluginDomain</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusObjectTypePluginDomain</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/objectTypes/fourcc/OIDplusFourCC.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusFourCC extends OIDplusObject {
private $fourcc;
204,7 → 204,7
foreach (debug_backtrace() as $trace) {
// If we are inside the "Login" area (i.e. "Root object links"), we want the
// correct icon, not a folder icon!
if ($trace['class'] === 'OIDplusPagePublicLogin') $in_login_treenode = true;
if ($trace['class'] === OIDplusPagePublicLogin::class) $in_login_treenode = true;
}
 
if (!$in_login_treenode && !$this->isLeafNode()) return null; // foldericon
/trunk/plugins/viathinksoft/objectTypes/fourcc/OIDplusObjectTypePluginFourCC.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusObjectTypePluginFourCC extends OIDplusObjectTypePlugin {
 
/trunk/plugins/viathinksoft/objectTypes/fourcc/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.10.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_objectTypes.xsd">
 
<type>OIDplusObjectTypePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusObjectTypePlugin</type>
 
<info>
<name>FourCC</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusObjectTypePluginFourCC</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusObjectTypePluginFourCC</mainclass>
</php>
 
</manifest>
/trunk/plugins/viathinksoft/objectTypes/gs1/OIDplusGs1.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusGs1 extends OIDplusObject {
private $number;
/trunk/plugins/viathinksoft/objectTypes/gs1/OIDplusObjectTypePluginGs1.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusObjectTypePluginGs1 extends OIDplusObjectTypePlugin {
 
/trunk/plugins/viathinksoft/objectTypes/gs1/barcode.php
26,7 → 26,7
 
_CheckParamExists($_GET, 'number');
 
//if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusObjectTypePluginGs1', false)) {
//if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplusObjectTypePluginGs1', false)) {
// throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
//}
 
/trunk/plugins/viathinksoft/objectTypes/gs1/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.10.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_objectTypes.xsd">
 
<type>OIDplusObjectTypePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusObjectTypePlugin</type>
 
<info>
<name>GS1 Based IDs</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusObjectTypePluginGs1</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusObjectTypePluginGs1</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/objectTypes/guid/OIDplusGuid.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusGuid extends OIDplusObject {
private $guid;
180,7 → 180,7
foreach (debug_backtrace() as $trace) {
// If we are inside the "Login" area (i.e. "Root object links"), we want the
// correct icon, not a folder icon!
if ($trace['class'] === 'OIDplusPagePublicLogin') $in_login_treenode = true;
if ($trace['class'] === OIDplusPagePublicLogin::class) $in_login_treenode = true;
}
 
if (!$in_login_treenode && !$this->isLeafNode()) return null; // foldericon
/trunk/plugins/viathinksoft/objectTypes/guid/OIDplusObjectTypePluginGuid.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusObjectTypePluginGuid extends OIDplusObjectTypePlugin {
 
/trunk/plugins/viathinksoft/objectTypes/guid/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.10.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_objectTypes.xsd">
 
<type>OIDplusObjectTypePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusObjectTypePlugin</type>
 
<info>
<name>Globally Unique Identifier (GUID)</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusObjectTypePluginGuid</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusObjectTypePluginGuid</mainclass>
</php>
 
<js>
/trunk/plugins/viathinksoft/objectTypes/ipv4/OIDplusIpv4.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusIpv4 extends OIDplusObject {
private $ipv4;
/trunk/plugins/viathinksoft/objectTypes/ipv4/OIDplusObjectTypePluginIpv4.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusObjectTypePluginIpv4 extends OIDplusObjectTypePlugin {
 
/trunk/plugins/viathinksoft/objectTypes/ipv4/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.10.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_objectTypes.xsd">
 
<type>OIDplusObjectTypePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusObjectTypePlugin</type>
 
<info>
<name>IPv4</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusObjectTypePluginIpv4</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusObjectTypePluginIpv4</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/objectTypes/ipv6/OIDplusIpv6.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusIpv6 extends OIDplusObject {
private $ipv6;
/trunk/plugins/viathinksoft/objectTypes/ipv6/OIDplusObjectTypePluginIpv6.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusObjectTypePluginIpv6 extends OIDplusObjectTypePlugin {
 
/trunk/plugins/viathinksoft/objectTypes/ipv6/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.10.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_objectTypes.xsd">
 
<type>OIDplusObjectTypePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusObjectTypePlugin</type>
 
<info>
<name>IPv6</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusObjectTypePluginIpv6</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusObjectTypePluginIpv6</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/objectTypes/java/OIDplusJava.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusJava extends OIDplusObject {
private $java;
/trunk/plugins/viathinksoft/objectTypes/java/OIDplusObjectTypePluginJava.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusObjectTypePluginJava extends OIDplusObjectTypePlugin {
 
/trunk/plugins/viathinksoft/objectTypes/java/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.10.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_objectTypes.xsd">
 
<type>OIDplusObjectTypePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusObjectTypePlugin</type>
 
<info>
<name>Java Package Names</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusObjectTypePluginJava</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusObjectTypePluginJava</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/objectTypes/oid/OIDplusObjectTypePluginOid.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusObjectTypePluginOid extends OIDplusObjectTypePlugin {
 
48,10 → 48,10
// Convert WEID to OID
// A WEID is just a different notation of an OID.
// To allow that people use OID-IP or the GoTo-box with a "weid:" identifier, rewrite it to "oid:", so that the plugin OIDplusObjectTypePluginOid can handle it.
if (str_starts_with($static_node_id,'weid:') && class_exists('WeidOidConverter')) {
if (str_starts_with($static_node_id,'weid:') && class_exists('\Frdl\Weid\WeidOidConverter')) {
$ary = explode('$', $static_node_id, 2);
$weid = $ary[0];
$oid = WeidOidConverter::weid2oid($weid);
$oid = \Frdl\Weid\WeidOidConverter::weid2oid($weid);
if ($oid === false) {
if ($throw_exception) throw new OIDplusException('This is not a valid WEID');
} else {
/trunk/plugins/viathinksoft/objectTypes/oid/OIDplusOid.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusOid extends OIDplusObject {
private $oid;
120,7 → 120,7
 
$tmp = _L('DER encoding');
$tmp = str_replace(explode(' ', $tmp, 2)[0], '<a href="https://misc.daniel-marschall.de/asn.1/oid-converter/online.php" target="_blank">'.explode(' ', $tmp, 2)[0].'</a>', $tmp);
$tech_info[$tmp] = str_replace(' ', ':', OidDerConverter::hexarrayToStr(OidDerConverter::oidToDER($this->nodeId(false))));
$tech_info[$tmp] = str_replace(' ', ':', \OidDerConverter::hexarrayToStr(\OidDerConverter::oidToDER($this->nodeId(false))));
 
return $tech_info;
}
194,7 → 194,7
// Dirty hack: We prepend '0.' in front of the OID to enforce the
// creation of a Class A weid (weid:root:) . Otherwise we could not
// get the hidden arc value "8" from "weid:4" (which is actually "weid:pen:SZ5-8-?"
$weid = WeidOidConverter::oid2weid('0.'.$this->getDotNotation());
$weid = \Frdl\Weid\WeidOidConverter::oid2weid('0.'.$this->getDotNotation());
if ($weid === false) return false;
$ary = explode(':', $weid);
$weid = array_pop($ary); // remove namespace and sub-namespace if existing
204,7 → 204,7
}
 
public function getWeidNotation($withAbbr=true) {
$weid = WeidOidConverter::oid2weid($this->getDotNotation());
$weid = \Frdl\Weid\WeidOidConverter::oid2weid($this->getDotNotation());
if ($withAbbr) {
$ary = explode(':', $weid);
$weid = array_pop($ary); // remove namespace and sub-namespace if existing
531,8 → 531,8
 
// (VTS F6) Mapping OID-to-AID if possible
try {
$test_der = OidDerConverter::hexarrayToStr(OidDerConverter::oidToDER($this->nodeId(false)));
} catch (Exception $e) {
$test_der = \OidDerConverter::hexarrayToStr(\OidDerConverter::oidToDER($this->nodeId(false)));
} catch (\Exception $e) {
$test_der = '00'; // error, should not happen
}
if (substr($test_der,0,3) == '06 ') { // 06 = ASN.1 type of Absolute ID
/trunk/plugins/viathinksoft/objectTypes/oid/OIDplusOidAsn1Id.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusOidAsn1Id {
private $name = '';
/trunk/plugins/viathinksoft/objectTypes/oid/OIDplusOidIri.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusOidIri {
private $name = '';
/trunk/plugins/viathinksoft/objectTypes/oid/WeidOidConverter.class.php
24,6 → 24,8
// - Padding with '0' characters is valid (e.g. weid:000EXAMPLE-3)
// The paddings do not count into the WeLuhn check-digit.
 
namespace Frdl\Weid; // TODO: Namespace mit Till abklären
 
class WeidOidConverter {
 
protected static function weLuhnGetCheckDigit($str) {
238,19 → 240,19
echo "Class C tests:\n\n";
 
var_dump($oid = '1.3.6.1.4.1.37553.8')."\n";
var_dump(WeidOidConverter::oid2weid($oid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::oid2weid($oid))."\n";
$weid = 'weid:?';
var_dump(WeidOidConverter::weid2oid($weid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::weid2oid($weid))."\n";
var_dump($weid)."\n";
echo "\n";
 
var_dump($oid = '1.3.6.1.4.1.37553.8.32488192274')."\n";
var_dump(WeidOidConverter::oid2weid($oid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::oid2weid($oid))."\n";
$weid = 'weid:EXAMPLE-?';
var_dump(WeidOidConverter::weid2oid($weid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::weid2oid($weid))."\n";
var_dump($weid)."\n";
$weid = 'weid:00000example-?';
var_dump(WeidOidConverter::weid2oid($weid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::weid2oid($weid))."\n";
var_dump($weid)."\n";
echo "\n";
 
257,26 → 259,26
echo "Class B tests:\n\n";
 
var_dump($oid = '1.3.6.1.4.1')."\n";
var_dump(WeidOidConverter::oid2weid($oid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::oid2weid($oid))."\n";
$weid = 'weid:pen:?';
var_dump(WeidOidConverter::weid2oid($weid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::weid2oid($weid))."\n";
var_dump($weid)."\n";
echo "\n";
 
var_dump($oid = '1.3.6.1.4.1.37553.7.99.99.99')."\n";
var_dump(WeidOidConverter::oid2weid($oid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::oid2weid($oid))."\n";
$weid = 'weid:pen:SZ5-7-2R-2R-2R-?';
var_dump(WeidOidConverter::weid2oid($weid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::weid2oid($weid))."\n";
var_dump($weid)."\n";
$weid = 'weid:pen:000SZ5-7-02R-00002R-002r-?';
var_dump(WeidOidConverter::weid2oid($weid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::weid2oid($weid))."\n";
var_dump($weid)."\n";
echo "\n";
 
var_dump($oid = '1.3.6.1.4.1.37476.9999')."\n";
var_dump(WeidOidConverter::oid2weid($oid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::oid2weid($oid))."\n";
$weid = 'weid:pen:SX0-7PR-?';
var_dump(WeidOidConverter::weid2oid($weid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::weid2oid($weid))."\n";
var_dump($weid)."\n";
echo "\n";
 
283,23 → 285,23
echo "Class A tests:\n\n";
 
var_dump($oid = '')."\n";
var_dump(WeidOidConverter::oid2weid($oid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::oid2weid($oid))."\n";
$weid = 'weid:root:?';
var_dump(WeidOidConverter::weid2oid($weid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::weid2oid($weid))."\n";
var_dump($weid)."\n";
echo "\n";
 
var_dump($oid = '.2.999')."\n";
var_dump(WeidOidConverter::oid2weid($oid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::oid2weid($oid))."\n";
$weid = 'weid:root:2-RR-?';
var_dump(WeidOidConverter::weid2oid($weid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::weid2oid($weid))."\n";
var_dump($weid)."\n";
echo "\n";
 
var_dump($oid = '2.999')."\n";
var_dump(WeidOidConverter::oid2weid($oid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::oid2weid($oid))."\n";
$weid = 'weid:root:2-RR-?';
var_dump(WeidOidConverter::weid2oid($weid))."\n";
var_dump(\Frdl\Weid\WeidOidConverter::weid2oid($weid))."\n";
var_dump($weid)."\n";
echo "\n";
*/
/trunk/plugins/viathinksoft/objectTypes/oid/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.10.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_objectTypes.xsd">
 
<type>OIDplusObjectTypePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusObjectTypePlugin</type>
 
<info>
<name>Object Identifier (OID)</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusObjectTypePluginOid</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusObjectTypePluginOid</mainclass>
</php>
 
<js>
/trunk/plugins/viathinksoft/objectTypes/other/OIDplusObjectTypePluginOther.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusObjectTypePluginOther extends OIDplusObjectTypePlugin {
 
/trunk/plugins/viathinksoft/objectTypes/other/OIDplusOther.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusOther extends OIDplusObject {
private $other;
/trunk/plugins/viathinksoft/objectTypes/other/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.10.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_objectTypes.xsd">
 
<type>OIDplusObjectTypePlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusObjectTypePlugin</type>
 
<info>
<name>Other</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusObjectTypePluginOther</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusObjectTypePluginOther</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/publicPages/000_objects/OIDplusPagePublicObjects.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicObjects extends OIDplusPagePluginPublic {
 
339,7 → 339,7
if ($objParent::ns() == 'oid') {
if (strtolower(substr(trim($params['id']),0,5)) === 'weid:') {
if ($objParent->isRoot()) {
$params['id'] = WeidOidConverter::weid2oid($params['id']);
$params['id'] = \Frdl\Weid\WeidOidConverter::weid2oid($params['id']);
if ($params['id'] === false) {
throw new OIDplusException(_L('Invalid WEID'));
}
1195,7 → 1195,7
try {
OIDplus::config()->setValue('objecttypes_enabled', implode(';', $enabled_ary));
OIDplus::config()->setValue('oobe_objects_done', '1');
} catch (Exception $e) {
} catch (\Exception $e) {
$msg = $e->getMessage();
$errors_happened = true;
}
/trunk/plugins/viathinksoft/publicPages/000_objects/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>Objects</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicObjects</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicObjects</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/001_ra_base/OIDplusPagePublicRaBaseUtils.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
// TODO: should this be a different plugin type? A page without gui is weird!
class OIDplusPagePublicRaBaseUtils extends OIDplusPagePluginPublic {
/trunk/plugins/viathinksoft/publicPages/001_ra_base/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>RA base functionality</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicRaBaseUtils</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicRaBaseUtils</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/090_login/OIDplusPagePublicLogin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicLogin extends OIDplusPagePluginPublic {
 
/trunk/plugins/viathinksoft/publicPages/090_login/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>Login</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicLogin</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicLogin</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/091_forgot_password/OIDplusPagePublicForgotPassword.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicForgotPassword extends OIDplusPagePluginPublic {
 
110,7 → 110,7
<input type="submit" value="'._L('Send recovery information').'">
</form>';
 
} catch (Exception $e) {
} catch (\Exception $e) {
 
$out['icon'] = 'img/error.png';
$out['text'] = '<p>'._L('Error: %1',htmlentities($e->getMessage())).'</p>';
/trunk/plugins/viathinksoft/publicPages/091_forgot_password/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>Forgot password</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicForgotPassword</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicForgotPassword</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/092_forgot_password_admin/OIDplusPagePublicForgotPasswordAdmin.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicForgotPasswordAdmin extends OIDplusPagePluginPublic {
 
/trunk/plugins/viathinksoft/publicPages/092_forgot_password_admin/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>Forgot admin password (public area)</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicForgotPasswordAdmin</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicForgotPasswordAdmin</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/093_rainfo/OIDplusPagePublicRaInfo.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicRaInfo extends OIDplusPagePluginPublic {
 
/trunk/plugins/viathinksoft/publicPages/093_rainfo/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>RA-Info</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicRaInfo</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicRaInfo</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/095_attachments/OIDplusPagePublicAttachments.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicAttachments extends OIDplusPagePluginPublic {
 
131,7 → 131,7
 
try {
self::checkUploadDir($basepath);
} catch (Exception $e) {
} catch (\Exception $e) {
$error = _L('This functionality is not available due to a misconfiguration');
if (OIDplus::authUtils()->isAdminLoggedIn()) {
$error .= ': '.$e->getMessage();
405,7 → 405,7
OIDplus::localpath().'vendor/danielmarschall/fileformats/filetypes$'.OIDplus::getCurrentLang().'.conf',
OIDplus::localpath().'vendor/danielmarschall/fileformats/filetypes.conf'
);
$output .= '<td>'.htmlentities(VtsFileTypeDetect::getDescription($file, $lookup_files)).'</td>';
$output .= '<td>'.htmlentities(\VtsFileTypeDetect::getDescription($file, $lookup_files)).'</td>';
 
$output .= ' <td><button type="button" name="download_'.md5($file).'" id="download_'.md5($file).'" class="btn btn-success btn-xs download" onclick="OIDplusPagePublicAttachments.downloadAttachment('.js_escape(OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE)).', current_node,'.js_escape(basename($file)).')">'._L('Download').'</button></td>';
if ($can_delete) {
429,7 → 429,7
$output .= '</form>';
$doshow = true;
}
} catch (Exception $e) {
} catch (\Exception $e) {
$doshow = true;
$output = '<p>'.$e->getMessage().'</p>';
}
/trunk/plugins/viathinksoft/publicPages/095_attachments/download.php
17,12 → 17,16
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusException;
use ViaThinkSoft\OIDplus\OIDplusPagePublicAttachments;
 
require_once __DIR__ . '/../../../../includes/oidplus.inc.php';
 
try {
OIDplus::init(true);
 
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusPagePublicAttachments', false)) {
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplusPagePublicAttachments', false)) {
throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
}
 
55,6 → 59,6
OIDplus::invoke_shutdown();
 
VtsBrowserDownload::output_file($local_file);
} catch (Exception $e) {
} catch (\Exception $e) {
echo '<h1>'._L('Error').'</h1><p>'.htmlentities($e->getMessage()).'<p>';
}
/trunk/plugins/viathinksoft/publicPages/095_attachments/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>File Attachments</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicAttachments</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicAttachments</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/100_whois/OIDplusOIDIP.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusOIDIP {
 
526,7 → 526,7
try {
require_once __DIR__.'/whois/json/security.inc.php';
$json = oidplus_json_sign($json, OIDplus::getSystemPrivateKey(), OIDplus::getSystemPublicKey());
} catch (Exception $e) {
} catch (\Exception $e) {
// die($e->getMessage());
}
}
609,7 → 609,7
try {
require_once __DIR__.'/whois/xml/security.inc.php';
$xml = oidplus_xml_sign($xml, OIDplus::getSystemPrivateKey(), OIDplus::getSystemPublicKey());
} catch (Exception $e) {
} catch (\Exception $e) {
$xml .= '<!-- Cannot add signature: '.$e.' -->';
}
}
/trunk/plugins/viathinksoft/publicPages/100_whois/OIDplusPagePublicWhois.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicWhois extends OIDplusPagePluginPublic {
 
/trunk/plugins/viathinksoft/publicPages/100_whois/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>WhoIs</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicWhois</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicWhois</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/100_whois/whois/webwhois.php
17,12 → 17,17
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusGui;
use ViaThinkSoft\OIDplus\OIDplusException;
use ViaThinkSoft\OIDplus\OIDplusOIDIP;
 
require_once __DIR__ . '/../../../../../includes/oidplus.inc.php';
 
OIDplus::init(true);
set_exception_handler(array('OIDplusGui', 'html_exception_handler'));
set_exception_handler(array(OIDplusGui::class, 'html_exception_handler'));
 
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusPagePublicWhois', false)) {
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplusPagePublicWhois', false)) {
throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
}
 
/trunk/plugins/viathinksoft/publicPages/100_whois/whois/xml/vendor/robrichards/xmlseclibs/src/XMLSecEnc.php
202,7 → 202,7
try {
$encNode = $this->encryptNode($objKey);
$this->references[$name]["encnode"] = $encNode;
} catch (Exception $e) {
} catch (\Exception $e) {
$this->rawNode = $curRawNode;
$this->type = $curType;
throw $e;
393,7 → 393,7
$attrAlgorithm = $encmeth->getAttribute("Algorithm");
try {
$objKey = new XMLSecurityKey($attrAlgorithm, array('type' => 'private'));
} catch (Exception $e) {
} catch (\Exception $e) {
return null;
}
return $objKey;
/trunk/plugins/viathinksoft/publicPages/100_whois/whois/xml/vendor/robrichards/xmlseclibs/src/XMLSecurityDSig.php
784,7 → 784,7
if ($algorithm) {
try {
$objKey = new XMLSecurityKey($algorithm, array('type' => 'public'));
} catch (Exception $e) {
} catch (\Exception $e) {
return null;
}
return $objKey;
/trunk/plugins/viathinksoft/publicPages/200_viathinksoft_freeoid/OIDplusPagePublicFreeOID.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicFreeOID extends OIDplusPagePluginPublic {
 
143,7 → 143,7
 
OIDplus::db()->query("insert into ###objects (id, ra_email, parent, title, description, confidential, created) values (?, ?, ?, ?, ?, ?, ".OIDplus::db()->sqlDate().")", array('oid:'.$new_oid, $email, self::getFreeRootOid(true), $title, $description, false));
OIDplusObject::resetObjectInformationCache();
} catch (Exception $e) {
} catch (\Exception $e) {
$ra->delete();
throw $e;
}
238,7 → 238,7
$out['text'] .= '<p>'._L('<b>Note:</b> Since September 2022, owners of FreeOID automatically receive a free ISO-7816 compliant <b>Application Identifier</b> (AID) with the format <code>D2:76:00:01:86:F0:(FreeOID):FF:(PIX)</code> (up to 64 bits application specific PIX, depending on the length of the FreeOID number).');
$out['text'] .= ' - <a '.OIDplus::gui()->link('aid:D276000186F1').'>'._L('More information').'</a></p>';
}
} catch (Exception $e) {
} catch (\Exception $e) {
$out['text'] = _L('Error: %1',$e->getMessage());
}
} else if (explode('$',$id)[0] == 'oidplus:com.viathinksoft.freeoid.activate_freeoid') {
/trunk/plugins/viathinksoft/publicPages/200_viathinksoft_freeoid/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>ViaThinkSoft FreeOID</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicFreeOID</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicFreeOID</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/300_search/OIDplusPagePublicSearch.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicSearch extends OIDplusPagePluginPublic {
 
205,7 → 205,7
$out['text'] .= $this->doSearch($params);
}
$out['text'] .= '</div>';
} catch (Exception $e) {
} catch (\Exception $e) {
$out['text'] = _L('Error: %1',$e->getMessage());
}
}
/trunk/plugins/viathinksoft/publicPages/300_search/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>Search</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicSearch</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicSearch</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/500_resources/OIDplusPagePublicResources.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicResources extends OIDplusPagePluginPublic {
 
/trunk/plugins/viathinksoft/publicPages/500_resources/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>Resources</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicResources</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicResources</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/500_resources/show_icon.php
23,7 → 23,7
 
require_once __DIR__ . '/../../../../includes/functions.inc.php';
 
//if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusPagePublicResources', false)) {
//if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplusPagePublicResources', false)) {
// throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
//}
 
/trunk/plugins/viathinksoft/publicPages/800_login_ldap/OIDplusPagePublicLoginLDAP.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicLoginLdap extends OIDplusPagePluginPublic {
 
43,24 → 43,24
*/
 
$opuserdata = array();
$opuserdata['ra_name'] = VtsLDAPUtils::getString($ldap_userinfo,'cn');
if (!empty(VtsLDAPUtils::getString($ldap_userinfo,'displayname'))) {
$opuserdata['personal_name'] = VtsLDAPUtils::getString($ldap_userinfo,'displayname');
$opuserdata['ra_name'] = \VtsLDAPUtils::getString($ldap_userinfo,'cn');
if (!empty(\VtsLDAPUtils::getString($ldap_userinfo,'displayname'))) {
$opuserdata['personal_name'] = \VtsLDAPUtils::getString($ldap_userinfo,'displayname');
} else {
$opuserdata['personal_name'] = trim(VtsLDAPUtils::getString($ldap_userinfo,'givenname').' '.VtsLDAPUtils::getString($ldap_userinfo,'sn'));
$opuserdata['personal_name'] = trim(\VtsLDAPUtils::getString($ldap_userinfo,'givenname').' '.\VtsLDAPUtils::getString($ldap_userinfo,'sn'));
}
$opuserdata['organization'] = VtsLDAPUtils::getString($ldap_userinfo,'company');
if (!empty(VtsLDAPUtils::getString($ldap_userinfo,'physicaldeliveryofficename'))) {
$opuserdata['office'] = VtsLDAPUtils::getString($ldap_userinfo,'physicaldeliveryofficename');
$opuserdata['organization'] = \VtsLDAPUtils::getString($ldap_userinfo,'company');
if (!empty(\VtsLDAPUtils::getString($ldap_userinfo,'physicaldeliveryofficename'))) {
$opuserdata['office'] = \VtsLDAPUtils::getString($ldap_userinfo,'physicaldeliveryofficename');
} else {
$opuserdata['office'] = VtsLDAPUtils::getString($ldap_userinfo,'department');
$opuserdata['office'] = \VtsLDAPUtils::getString($ldap_userinfo,'department');
}
$opuserdata['street'] = VtsLDAPUtils::getString($ldap_userinfo,'streetaddress');
$opuserdata['zip_town'] = trim(VtsLDAPUtils::getString($ldap_userinfo,'postalcode').' '.VtsLDAPUtils::getString($ldap_userinfo,'l'));
$opuserdata['country'] = VtsLDAPUtils::getString($ldap_userinfo,'co'); // ISO country code: VtsLDAPUtils::getString($ldap_userinfo,'c')
$opuserdata['phone'] = VtsLDAPUtils::getString($ldap_userinfo,'telephonenumber'); // homephone for private phone number
$opuserdata['mobile'] = VtsLDAPUtils::getString($ldap_userinfo,'mobile');
$opuserdata['fax'] = VtsLDAPUtils::getString($ldap_userinfo,'facsimiletelephonenumber');
$opuserdata['street'] = \VtsLDAPUtils::getString($ldap_userinfo,'streetaddress');
$opuserdata['zip_town'] = trim(\VtsLDAPUtils::getString($ldap_userinfo,'postalcode').' '.\VtsLDAPUtils::getString($ldap_userinfo,'l'));
$opuserdata['country'] = \VtsLDAPUtils::getString($ldap_userinfo,'co'); // ISO country code: \VtsLDAPUtils::getString($ldap_userinfo,'c')
$opuserdata['phone'] = \VtsLDAPUtils::getString($ldap_userinfo,'telephonenumber'); // homephone for private phone number
$opuserdata['mobile'] = \VtsLDAPUtils::getString($ldap_userinfo,'mobile');
$opuserdata['fax'] = \VtsLDAPUtils::getString($ldap_userinfo,'facsimiletelephonenumber');
 
foreach ($opuserdata as $dbfield => $val) {
if (!empty($val)) {
117,7 → 117,7
throw new OIDplusException(_L('Please enter a valid username'));
}
 
$ldap = new VtsLDAPUtils();
$ldap = new \VtsLDAPUtils();
 
try {
 
167,13 → 167,13
}
if ($isRA) {
if (OIDplus::baseConfig()->getValue('LDAP_AUTHENTICATE_UPN'.$cfgSuffix,true)) {
$mail = VtsLDAPUtils::getString($ldap_userinfo, 'userprincipalname');
$mail = \VtsLDAPUtils::getString($ldap_userinfo, 'userprincipalname');
$foundSomething = true;
$remember_me = isset($params['remember_me']) && ($params['remember_me']);
$this->doLoginRA($remember_me, $mail, $ldap_userinfo);
}
if (OIDplus::baseConfig()->getValue('LDAP_AUTHENTICATE_EMAIL'.$cfgSuffix,false)) {
$mails = VtsLDAPUtils::getArray($ldap_userinfo, 'mail');
$mails = \VtsLDAPUtils::getArray($ldap_userinfo, 'mail');
foreach ($mails as $mail) {
$foundSomething = true;
$remember_me = isset($params['remember_me']) && ($params['remember_me']);
/trunk/plugins/viathinksoft/publicPages/800_login_ldap/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>Login using LDAP / ActiveDirectory</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicLoginLDAP</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicLoginLDAP</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/810_login_google/OIDplusPagePublicLoginGoogle.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicLoginGoogle extends OIDplusPagePluginPublic {
 
/trunk/plugins/viathinksoft/publicPages/810_login_google/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>Login using Google</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicLoginGoogle</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicLoginGoogle</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/810_login_google/oauth.php
17,6 → 17,11
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusGui;
use ViaThinkSoft\OIDplus\OIDplusException;
use ViaThinkSoft\OIDplus\OIDplusRA;
 
# More information about the OAuth2 implementation:
# - https://developers.google.com/identity/protocols/oauth2/openid-connect
 
23,9 → 28,9
require_once __DIR__ . '/../../../../includes/oidplus.inc.php';
 
OIDplus::init(true);
set_exception_handler(array('OIDplusGui', 'html_exception_handler'));
set_exception_handler(array(OIDplusGui::class, 'html_exception_handler'));
 
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusPagePublicLoginGoogle', false)) {
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplusPagePublicLoginGoogle', false)) {
throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
}
 
/trunk/plugins/viathinksoft/publicPages/820_login_facebook/OIDplusPagePublicLoginFacebook.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicLoginFacebook extends OIDplusPagePluginPublic {
 
/trunk/plugins/viathinksoft/publicPages/820_login_facebook/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>Login using Facebook</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicLoginFacebook</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicLoginFacebook</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/820_login_facebook/oauth.php
17,6 → 17,11
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusGui;
use ViaThinkSoft\OIDplus\OIDplusException;
use ViaThinkSoft\OIDplus\OIDplusRA;
 
# More information about the OAuth2 implementation:
# - https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow
# - https://developers.facebook.com/tools/explorer/
24,9 → 29,9
require_once __DIR__ . '/../../../../includes/oidplus.inc.php';
 
OIDplus::init(true);
set_exception_handler(array('OIDplusGui', 'html_exception_handler'));
set_exception_handler(array(OIDplusGui::class, 'html_exception_handler'));
 
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusPagePublicLoginFacebook', false)) {
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplusPagePublicLoginFacebook', false)) {
throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
}
 
/trunk/plugins/viathinksoft/publicPages/900_contact_admin/OIDplusPagePublicContactEMail.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicContactEMail extends OIDplusPagePluginPublic {
 
/trunk/plugins/viathinksoft/publicPages/900_contact_admin/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>Contact admin</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicContactEMail</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicContactEMail</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/publicPages/999_antispam_filter/OIDplusPagePublicAntiSpamFilter.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPagePublicAntiSpamFilter extends OIDplusPagePluginPublic {
 
/trunk/plugins/viathinksoft/publicPages/999_antispam_filter/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginPublic</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginPublic</type>
 
<info>
<name>AntiSpam filter</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPagePublicAntiSpamFilter</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPagePublicAntiSpamFilter</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/raPages/010_notifications/OIDplusPageRaNotifications.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageRaNotifications extends OIDplusPagePluginRa {
 
/trunk/plugins/viathinksoft/raPages/010_notifications/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginRa</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginRa</type>
 
<info>
<name>Notifications</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageRaNotifications</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageRaNotifications</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/raPages/092_invite/OIDplusPageRaInvite.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageRaInvite extends OIDplusPagePluginRa {
 
130,7 → 130,7
<input type="submit" value="'._L('Send invitation').'">
</form>';
 
} catch (Exception $e) {
} catch (\Exception $e) {
 
$out['icon'] = 'img/error.png';
$out['text'] = _L('Error: %1',$e->getMessage());
/trunk/plugins/viathinksoft/raPages/092_invite/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginRa</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginRa</type>
 
<info>
<name>Invite RA</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageRaInvite</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageRaInvite</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/raPages/099_object_log/OIDplusPageRaObjectLog.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageRaObjectLog extends OIDplusPagePluginRa {
 
/trunk/plugins/viathinksoft/raPages/099_object_log/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginRa</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginRa</type>
 
<info>
<name>Object Log</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageRaObjectLog</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageRaObjectLog</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/raPages/100_edit_contact_data/OIDplusPageRaEditContactData.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageRaEditContactData extends OIDplusPagePluginRa {
 
/trunk/plugins/viathinksoft/raPages/100_edit_contact_data/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginRa</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginRa</type>
 
<info>
<name>Edit contact data</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageRaEditContactData</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageRaEditContactData</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/raPages/101_change_password/OIDplusPageRaChangePassword.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageRaChangePassword extends OIDplusPagePluginRa {
 
/trunk/plugins/viathinksoft/raPages/101_change_password/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginRa</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginRa</type>
 
<info>
<name>Change password</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageRaChangePassword</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageRaChangePassword</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/raPages/102_change_email/OIDplusPageRaChangeEMail.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageRaChangeEMail extends OIDplusPagePluginRa {
 
/trunk/plugins/viathinksoft/raPages/102_change_email/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginRa</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginRa</type>
 
<info>
<name>Change E-Mail</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageRaChangeEMail</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageRaChangeEMail</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/raPages/200_log/OIDplusPageRaLogEvents.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageRaLogEvents extends OIDplusPagePluginRa {
 
/trunk/plugins/viathinksoft/raPages/200_log/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginRa</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginRa</type>
 
<info>
<name>Log</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageRaLogEvents</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageRaLogEvents</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/raPages/910_automated_ajax_calls/OIDplusPageRaAutomatedAJAXCalls.class.php
20,7 → 20,7
// ATTENTION: If you change something, please make sure that the changes
// are synchronous with OIDplusPageAdminAutomatedAJAXCalls
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusPageRaAutomatedAJAXCalls extends OIDplusPagePluginRa {
 
/trunk/plugins/viathinksoft/raPages/910_automated_ajax_calls/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.2.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_page.xsd">
 
<type>OIDplusPagePluginRa</type>
<type>ViaThinkSoft\OIDplus\OIDplusPagePluginRa</type>
 
<info>
<name>Automated AJAX calls</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusPageRaAutomatedAJAXCalls</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusPageRaAutomatedAJAXCalls</mainclass>
</php>
 
<css>
/trunk/plugins/viathinksoft/sqlSlang/access/OIDplusSqlSlangPluginAccess.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusSqlSlangPluginAccess extends OIDplusSqlSlangPlugin {
 
56,7 → 56,7
try {
// On this table, there are often no read permissions, so we need to find out if the error message is different
$db->query("select * from MSysObjects");
} catch (Exception $e) {
} catch (\Exception $e) {
$err_a = $db->error();
}
$err_a = str_replace('MSysObjects', '', $err_a);
64,7 → 64,7
$err_b = '';
try {
$db->query("select * from XYZObjects");
} catch (Exception $e) {
} catch (\Exception $e) {
$err_b = $db->error();
}
$err_b = str_replace('XYZObjects', '', $err_b);
/trunk/plugins/viathinksoft/sqlSlang/access/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.11.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_sqlSlang.xsd">
 
<type>OIDplusSqlSlangPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusSqlSlangPlugin</type>
 
<info>
<name>Microsoft Access SQL dialect</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusSqlSlangPluginAccess</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusSqlSlangPluginAccess</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/sqlSlang/mssql/OIDplusSqlSlangPluginMsSQL.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusSqlSlangPluginMsSQL extends OIDplusSqlSlangPlugin {
 
60,7 → 60,7
$vers = $db->query("select @@version as dbms_version")->fetch_object()->dbms_version;
$vers = strtolower($vers);
return strpos($vers, 'microsoft sql server') !== false;
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}
}
/trunk/plugins/viathinksoft/sqlSlang/mssql/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.11.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_sqlSlang.xsd">
 
<type>OIDplusSqlSlangPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusSqlSlangPlugin</type>
 
<info>
<name>Microsoft SQL Server (T-SQL) SQL dialect</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusSqlSlangPluginMsSQL</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusSqlSlangPluginMsSQL</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/sqlSlang/mysql/OIDplusSqlSlangPluginMySQL.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusSqlSlangPluginMySQL extends OIDplusSqlSlangPlugin {
 
63,7 → 63,7
$vers = $db->query("select version() as dbms_version")->fetch_object()->dbms_version;
$vers = strtolower($vers);
return (strpos($vers, 'mysql') !== false) || (strpos($vers, 'mariadb') !== false);
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}
}
/trunk/plugins/viathinksoft/sqlSlang/mysql/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.11.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_sqlSlang.xsd">
 
<type>OIDplusSqlSlangPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusSqlSlangPlugin</type>
 
<info>
<name>MySQL / MariaDB SQL dialect</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusSqlSlangPluginMySQL</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusSqlSlangPluginMySQL</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/sqlSlang/oracle/OIDplusSqlSlangPluginOracle.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusSqlSlangPluginOracle extends OIDplusSqlSlangPlugin {
 
65,7 → 65,7
$vers = $db->query("SELECT banner FROM v\$version WHERE banner LIKE 'Oracle%'")->fetch_object()->banner;
$vers = strtolower($vers);
return (strpos($vers, 'oracle') !== false);
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}
}
/trunk/plugins/viathinksoft/sqlSlang/oracle/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.11.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_sqlSlang.xsd">
 
<type>OIDplusSqlSlangPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusSqlSlangPlugin</type>
 
<info>
<name>Oracle DB SQL dialect</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusSqlSlangPluginOracle</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusSqlSlangPluginOracle</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/sqlSlang/pgsql/OIDplusSqlSlangPluginPgSQL.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusSqlSlangPluginPgSQL extends OIDplusSqlSlangPlugin {
 
58,7 → 58,7
$vers = $db->query("select version() as dbms_version")->fetch_object()->dbms_version;
$vers = strtolower($vers);
return strpos($vers, 'postgresql') !== false;
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}
}
/trunk/plugins/viathinksoft/sqlSlang/pgsql/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.11.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_sqlSlang.xsd">
 
<type>OIDplusSqlSlangPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusSqlSlangPlugin</type>
 
<info>
<name>PostgreSQL SQL dialect</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusSqlSlangPluginPgSQL</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusSqlSlangPluginPgSQL</mainclass>
</php>
</manifest>
/trunk/plugins/viathinksoft/sqlSlang/sqlite/OIDplusSqlSlangPluginSQLite.class.php
17,7 → 17,7
* limitations under the License.
*/
 
if (!defined('INSIDE_OIDPLUS')) die();
namespace ViaThinkSoft\OIDplus;
 
class OIDplusSqlSlangPluginSQLite extends OIDplusSqlSlangPlugin {
 
77,7 → 77,7
try {
$db->query("select sqlite_version as dbms_version");
return true;
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}
}
/trunk/plugins/viathinksoft/sqlSlang/sqlite/manifest.xml
4,7 → 4,7
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.3.6.1.4.1.37476.2.5.2.5.11.1 https://oidplus.viathinksoft.com/oidplus/plugins/manifest_plugin_sqlSlang.xsd">
 
<type>OIDplusSqlSlangPlugin</type>
<type>ViaThinkSoft\OIDplus\OIDplusSqlSlangPlugin</type>
 
<info>
<name>SQLite SQL dialect</name>
16,7 → 16,7
</info>
 
<php>
<mainclass>OIDplusSqlSlangPluginSQLite</mainclass>
<mainclass>ViaThinkSoft\OIDplus\OIDplusSqlSlangPluginSQLite</mainclass>
</php>
</manifest>
/trunk/setup/includes/setup_base.js
108,6 → 108,8
'<i>// If you don\'t want to run setup again, you can also change most of the settings directly in this file.</i><br>' + // do not translate
'<i>// List of possible values: doc/config_values.txt</i><br>' + // do not translate
'<br>' +
'use ViaThinkSoft\\OIDplus\\OIDplus;<br>' +
'<br>' +
'OIDplus::baseConfig()->setValue(\'CONFIG_VERSION\', 2.1);<br>' +
'<br>' +
// Passwords are Base64 encoded to avoid that passwords can be read upon first sight,
123,7 → 125,7
}
}
$("#config")[0].innerHTML = $("#config")[0].innerHTML +
'<br>' +
//'<br>' +
'OIDplus::baseConfig()->setValue(\'TABLENAME_PREFIX\', \''+$("#tablename_prefix")[0].value+'\');<br>' +
'<br>' +
'OIDplus::baseConfig()->setValue(\'SERVER_SECRET\', \''+generateRandomString(32)+'\');<br>' +
/trunk/setup/index.php
17,6 → 17,11
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusDatabasePlugin;
use ViaThinkSoft\OIDplus\OIDplusSqlSlangPlugin;
use ViaThinkSoft\OIDplus\OIDplusCaptchaPlugin;
 
require_once __DIR__ . '/../includes/oidplus.inc.php';
 
define('BASECONFIG_FILE', 'userdata/baseconfig/config.inc.php');
90,7 → 95,7
 
echo _L('Database plugin').': <select name="db_plugin" onChange="dbplugin_changed()" id="db_plugin">';
 
OIDplus::registerAllPlugins('database', 'OIDplusDatabasePlugin', array('OIDplus','registerDatabasePlugin'));
OIDplus::registerAllPlugins('database', OIDplusDatabasePlugin::class, array(OIDplus::class,'registerDatabasePlugin'));
foreach (OIDplus::getDatabasePlugins() as $plugin) {
$selected = $plugin::id() == 'MySQL' ? ' selected="true"' : '';
echo '<option value="'.htmlentities($plugin::id()).'"'.$selected.'>'.htmlentities($plugin::id()).'</option>';
100,7 → 105,7
 
echo '<div style="margin-left:50px">';
 
OIDplus::registerAllPlugins('sqlSlang', 'OIDplusSqlSlangPlugin', array('OIDplus','registerSqlSlangPlugin'));
OIDplus::registerAllPlugins('sqlSlang', OIDplusSqlSlangPlugin::class, array(OIDplus::class,'registerSqlSlangPlugin'));
$sql_slang_selection = array();
foreach (OIDplus::getSqlSlangPlugins() as $plugin) {
$slang_id = $plugin::id();
111,7 → 116,7
$sql_slang_selection = implode("\n", $sql_slang_selection);
 
$found_db_plugins = 0;
//OIDplus::registerAllPlugins('database', 'OIDplusDatabasePlugin', array('OIDplus','registerDatabasePlugin'));
//OIDplus::registerAllPlugins('database', OIDplusDatabasePlugin::class, array(OIDplus::class,'registerDatabasePlugin'));
foreach (OIDplus::getDatabasePlugins() as $plugin) {
$found_db_plugins++;
$cont = $plugin->setupHTML();
135,7 → 140,7
 
echo _L('CAPTCHA plugin').': <select name="captcha_plugin" onChange="captchaplugin_changed()" id="captcha_plugin">';
 
OIDplus::registerAllPlugins('captcha', 'OIDplusCaptchaPlugin', array('OIDplus','registerCaptchaPlugin'));
OIDplus::registerAllPlugins('captcha', OIDplusCaptchaPlugin::class, array(OIDplus::class,'registerCaptchaPlugin'));
foreach (OIDplus::getCaptchaPlugins() as $plugin) {
$selected = strtolower($plugin::id()) === strtolower('None') ? ' selected="true"' : ''; // select "None" by default
echo '<option value="'.htmlentities($plugin::id()).'"'.$selected.'>'.htmlentities($plugin::id()).'</option>';
/trunk/setup/setup.min.css.php
18,6 → 18,7
*/
 
use MatthiasMullie\Minify;
use ViaThinkSoft\OIDplus\OIDplus;
 
require_once __DIR__ . '/../includes/oidplus.inc.php';
 
/trunk/setup/setup.min.js.php
17,6 → 17,8
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusLanguagePlugin;
use MatthiasMullie\Minify;
 
require_once __DIR__ . '/../includes/oidplus.inc.php';
33,7 → 35,7
 
$files[] = 'var DEFAULT_LANGUAGE = '.json_encode(OIDplus::getDefaultLang()).';';
 
OIDplus::registerAllPlugins('language', 'OIDplusLanguagePlugin', null);
OIDplus::registerAllPlugins('language', OIDplusLanguagePlugin::class, null);
$translation_array = OIDplus::getTranslationArray();
$files[] = 'var language_messages = '.json_encode($translation_array).';';
 
/trunk/setup/struct_empty.sql.php
17,6 → 17,9
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusSqlSlangPlugin;
 
include_once __DIR__ . '/../includes/oidplus.inc.php';
 
$prefix = isset($_REQUEST['prefix']) ? $_REQUEST['prefix'] : '';
23,7 → 26,7
$database = isset($_REQUEST['database']) ? $_REQUEST['database'] : '';
$slang = isset($_REQUEST['slang']) ? $_REQUEST['slang'] : 'mysql';
 
OIDplus::registerAllPlugins('sqlSlang', 'OIDplusSqlSlangPlugin', array('OIDplus','registerSqlSlangPlugin'));
OIDplus::registerAllPlugins('sqlSlang', OIDplusSqlSlangPlugin::class, array(OIDplus::class,'registerSqlSlangPlugin'));
$slang_plugin = null;
foreach (OIDplus::getSqlSlangPlugins() as $plugin) {
if ($plugin::id() === $slang) {
/trunk/setup/struct_with_examples.sql.php
17,6 → 17,9
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusSqlSlangPlugin;
 
include_once __DIR__ . '/../includes/oidplus.inc.php';
 
$prefix = isset($_REQUEST['prefix']) ? $_REQUEST['prefix'] : '';
23,7 → 26,7
$database = isset($_REQUEST['database']) ? $_REQUEST['database'] : '';
$slang = isset($_REQUEST['slang']) ? $_REQUEST['slang'] : 'mysql';
 
OIDplus::registerAllPlugins('sqlSlang', 'OIDplusSqlSlangPlugin', array('OIDplus','registerSqlSlangPlugin'));
OIDplus::registerAllPlugins('sqlSlang', OIDplusSqlSlangPlugin::class, array(OIDplus::class,'registerSqlSlangPlugin'));
$slang_plugin = null;
foreach (OIDplus::getSqlSlangPlugins() as $plugin) {
if ($plugin::id() === $slang) {
/trunk/sitemap.php
17,6 → 17,9
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
use ViaThinkSoft\OIDplus\OIDplusPagePluginPublic;
 
require_once __DIR__ . '/includes/oidplus.inc.php';
 
header('Content-Type:text/text; charset=UTF-8');
/trunk/systeminfo.php
17,6 → 17,8
* limitations under the License.
*/
 
use ViaThinkSoft\OIDplus\OIDplus;
 
require_once __DIR__ . '/includes/oidplus.inc.php';
 
header('Content-Type:application/json; charset=UTF-8');