Subversion Repositories oidplus

Rev

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

Rev 978 Rev 1050
Line 15... Line 15...
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
 * See the License for the specific language governing permissions and
16
 * See the License for the specific language governing permissions and
17
 * limitations under the License.
17
 * limitations under the License.
18
 */
18
 */
19
 
19
 
20
if (!defined('INSIDE_OIDPLUS')) die();
20
namespace ViaThinkSoft\OIDplus;
21
 
21
 
22
class OIDplusPagePublicFreeOID extends OIDplusPagePluginPublic {
22
class OIDplusPagePublicFreeOID extends OIDplusPagePluginPublic {
23
 
23
 
24
        private static function getFreeRootOid($with_ns) {
24
        private static function getFreeRootOid($with_ns) {
25
                return ($with_ns ? 'oid:' : '').OIDplus::config()->getValue('freeoid_root_oid');
25
                return ($with_ns ? 'oid:' : '').OIDplus::config()->getValue('freeoid_root_oid');
Line 141... Line 141...
141
                                        throw new OIDplusException(_L('The resulting OID %1 is too long (max allowed length: %2)',$new_oid,$maxlen));
141
                                        throw new OIDplusException(_L('The resulting OID %1 is too long (max allowed length: %2)',$new_oid,$maxlen));
142
                                }
142
                                }
143
 
143
 
144
                                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));
144
                                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));
145
                                OIDplusObject::resetObjectInformationCache();
145
                                OIDplusObject::resetObjectInformationCache();
146
                        } catch (Exception $e) {
146
                        } catch (\Exception $e) {
147
                                $ra->delete();
147
                                $ra->delete();
148
                                throw $e;
148
                                throw $e;
149
                        }
149
                        }
150
 
150
 
151
                        // Send delegation report email to admin
151
                        // Send delegation report email to admin
Line 236... Line 236...
236
 
236
 
237
                                if (OIDplus::config()->getValue('freeoid_root_oid') == '1.3.6.1.4.1.37476.9000') {
237
                                if (OIDplus::config()->getValue('freeoid_root_oid') == '1.3.6.1.4.1.37476.9000') {
238
                                        $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).');
238
                                        $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).');
239
$out['text'] .= ' - <a '.OIDplus::gui()->link('aid:D276000186F1').'>'._L('More information').'</a></p>';
239
$out['text'] .= ' - <a '.OIDplus::gui()->link('aid:D276000186F1').'>'._L('More information').'</a></p>';
240
                                }
240
                                }
241
                        } catch (Exception $e) {
241
                        } catch (\Exception $e) {
242
                                $out['text'] = _L('Error: %1',$e->getMessage());
242
                                $out['text'] = _L('Error: %1',$e->getMessage());
243
                        }
243
                        }
244
                } else if (explode('$',$id)[0] == 'oidplus:com.viathinksoft.freeoid.activate_freeoid') {
244
                } else if (explode('$',$id)[0] == 'oidplus:com.viathinksoft.freeoid.activate_freeoid') {
245
                        $handled = true;
245
                        $handled = true;
246
 
246