Subversion Repositories oidplus

Rev

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

Rev 1033 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 OIDplusPagePublicObjects extends OIDplusPagePluginPublic {
22
class OIDplusPagePublicObjects extends OIDplusPagePluginPublic {
23
 
23
 
24
        private function get_treeicon_root($ot) {
24
        private function get_treeicon_root($ot) {
25
                $dirs = glob(OIDplus::localpath().'plugins/'.'*'.'/objectTypes/'.$ot::ns());
25
                $dirs = glob(OIDplus::localpath().'plugins/'.'*'.'/objectTypes/'.$ot::ns());
Line 337... Line 337...
337
 
337
 
338
                        // For the root objects, let the user also enter a WEID
338
                        // For the root objects, let the user also enter a WEID
339
                        if ($objParent::ns() == 'oid') {
339
                        if ($objParent::ns() == 'oid') {
340
                                if (strtolower(substr(trim($params['id']),0,5)) === 'weid:') {
340
                                if (strtolower(substr(trim($params['id']),0,5)) === 'weid:') {
341
                                        if ($objParent->isRoot()) {
341
                                        if ($objParent->isRoot()) {
342
                                                $params['id'] = WeidOidConverter::weid2oid($params['id']);
342
                                                $params['id'] = \Frdl\Weid\WeidOidConverter::weid2oid($params['id']);
343
                                                if ($params['id'] === false) {
343
                                                if ($params['id'] === false) {
344
                                                        throw new OIDplusException(_L('Invalid WEID'));
344
                                                        throw new OIDplusException(_L('Invalid WEID'));
345
                                                }
345
                                                }
346
                                        } else {
346
                                        } else {
347
                                                throw new OIDplusException(_L('You can use the WEID syntax only at your object tree root.'));
347
                                                throw new OIDplusException(_L('You can use the WEID syntax only at your object tree root.'));
Line 1193... Line 1193...
1193
                $msg = '';
1193
                $msg = '';
1194
                if ($do_edits) {
1194
                if ($do_edits) {
1195
                        try {
1195
                        try {
1196
                                OIDplus::config()->setValue('objecttypes_enabled', implode(';', $enabled_ary));
1196
                                OIDplus::config()->setValue('objecttypes_enabled', implode(';', $enabled_ary));
1197
                                OIDplus::config()->setValue('oobe_objects_done', '1');
1197
                                OIDplus::config()->setValue('oobe_objects_done', '1');
1198
                        } catch (Exception $e) {
1198
                        } catch (\Exception $e) {
1199
                                $msg = $e->getMessage();
1199
                                $msg = $e->getMessage();
1200
                                $errors_happened = true;
1200
                                $errors_happened = true;
1201
                        }
1201
                        }
1202
                }
1202
                }
1203
 
1203