/trunk/TODO |
---|
1,4 → 1,7 |
Type safety: |
- Search for "@param $" and add types |
Admin Auth: |
- implement argon2 as alternative to bcrypt? |
- idea: could RA-auth-plugins also be used to create the admin-hash? problem: setup/ generates hash with javascript, not via PHP!!! |
/trunk/plugins/frdl/publicPages/1276945_rdap/OIDplusRDAP.class.php |
---|
48,11 → 48,11 |
} |
/** |
* @param $query |
* @param string $query |
* @return array |
* @throws \ViaThinkSoft\OIDplus\OIDplusException |
*/ |
public function rdapQuery($query) { |
public function rdapQuery(string $query) { |
$query = str_replace('oid:.', 'oid:', $query); |
$n = explode(':', $query); |
if(2>count($n)){ |
/trunk/plugins/viathinksoft/adminPages/120_registration/OIDplusPageAdminRegistration.class.php |
---|
564,14 → 564,14 |
/** |
* Implements interface 1.3.6.1.4.1.37476.2.5.2.3.1 |
* @param $step |
* @param $do_edits |
* @param $errors_happened |
* @param int $step |
* @param bool $do_edits |
* @param bool $errors_happened |
* @return void |
* @throws OIDplusConfigInitializationException |
* @throws OIDplusException |
*/ |
public function oobeEntry($step, $do_edits, &$errors_happened)/*: void*/ { |
public function oobeEntry(int $step, bool $do_edits, bool &$errors_happened)/*: void*/ { |
echo '<h2>'._L('Step %1: System registration and automatic publishing (optional)',$step).'</h2>'; |
if (file_exists(__DIR__ . '/info$'.OIDplus::getCurrentLang().'.html')) { |
676,11 → 676,11 |
/** |
* Implements interface 1.3.6.1.4.1.37476.2.5.2.3.8 |
* @param $user |
* @param string|null $user |
* @return array |
* @throws OIDplusException |
*/ |
public function getNotifications($user=null): array { |
public function getNotifications(string $user=null): array { |
$notifications = array(); |
if ((!$user || ($user == 'admin')) && OIDplus::authUtils()->isAdminLoggedIn()) { |
if (!function_exists('curl_init')) { |
/trunk/plugins/viathinksoft/adminPages/400_oidinfo_export/OIDplusPageAdminOIDInfoExport.class.php |
---|
898,10 → 898,10 |
} |
/** |
* @param $str |
* @return mixed|string |
* @param string $str |
* @return string |
*/ |
private static function _formatdate($str) { |
private static function _formatdate(string $str): string { |
$str = explode(' ',$str)[0]; |
if ($str == '0000-00-00') $str = ''; |
return $str; |
928,10 → 928,10 |
} |
/** |
* @param $address |
* @return array|string[] |
* @param string $address |
* @return string[] |
*/ |
private static function split_address_country($address) { |
private static function split_address_country(string $address): array { |
global $oidinfo_countries; |
$ary = explode("\n", $address); |
$last_line = array_pop($ary); |
965,10 → 965,10 |
* @param $errors |
* @param $replaceExistingOIDs |
* @param $orphan_mode |
* @return array|int[] |
* @return int[] |
* @throws OIDplusException |
*/ |
protected function oidinfoImportXML($xml_contents, &$errors, $replaceExistingOIDs=false, $orphan_mode=self::ORPHAN_AUTO_DEORPHAN) { |
protected function oidinfoImportXML($xml_contents, &$errors, $replaceExistingOIDs=false, $orphan_mode=self::ORPHAN_AUTO_DEORPHAN): array { |
// TODO: Implement RA import (let the user decide) |
// TODO: Let the user decide about $replaceExistingOIDs |
// TODO: Let the user decide if "created=now" should be set (this is good when the XML files is created by the user itself to do bulk-inserts) |
/trunk/plugins/viathinksoft/adminPages/700_colors/OIDplusPageAdminColors.class.php |
---|
257,13 → 257,13 |
/** |
* Implements interface 1.3.6.1.4.1.37476.2.5.2.3.1 |
* @param $step |
* @param $do_edits |
* @param $errors_happened |
* @param int $step |
* @param bool $do_edits |
* @param bool $errors_happened |
* @return void |
* @throws OIDplusException |
*/ |
public function oobeEntry($step, $do_edits, &$errors_happened)/*: void*/ { |
public function oobeEntry(int $step, bool $do_edits, bool &$errors_happened)/*: void*/ { |
echo '<h2>'._L('Step %1: Color Theme',$step).'</h2>'; |
echo '<input type="checkbox" name="color_invert" id="color_invert"'; |
/trunk/plugins/viathinksoft/publicPages/000_objects/OIDplusPagePublicObjects.class.php |
---|
1266,12 → 1266,12 |
/** |
* Implements interface 1.3.6.1.4.1.37476.2.5.2.3.1 |
* @param $step |
* @param $do_edits |
* @param $errors_happened |
* @param int $step |
* @param bool $do_edits |
* @param bool $errors_happened |
* @return void |
*/ |
public function oobeEntry($step, $do_edits, &$errors_happened)/*: void*/ { |
public function oobeEntry(int $step, bool $do_edits, bool &$errors_happened)/*: void*/ { |
echo '<h2>'._L('Step %1: Enable/Disable object type plugins',$step).'</h2>'; |
echo '<p>'._L('Which object types do you want to manage using OIDplus?').'</p>'; |
/trunk/plugins/viathinksoft/raPages/092_invite/OIDplusPageRaInvite.class.php |
---|
215,11 → 215,11 |
} |
/** |
* @param $email |
* @param string $email |
* @return void |
* @throws OIDplusException |
*/ |
private function inviteSecurityCheck($email) { |
private function inviteSecurityCheck(string $email) { |
$res = OIDplus::db()->query("select * from ###ra where email = ?", array($email)); |
if ($res->any()) { |
throw new OIDplusException(_L('This RA is already registered and does not need to be invited.')); |
244,11 → 244,11 |
} |
/** |
* @param $email |
* @param string $email |
* @return string |
* @throws OIDplusException |
*/ |
private function getInvitationText($email): string { |
private function getInvitationText(string $email): string { |
$list_of_oids = array(); |
$res = OIDplus::db()->query("select id from ###objects where ra_email = ?", array($email)); |
while ($row = $res->fetch_array()) { |