示例#1
0
<?php

$objecttype = $this->request->parameters['yg_type'];
$ygid = $this->request->parameters['yg_id'];
$refresh = $this->request->parameters['refresh'];
$data = explode('-', $ygid);
$object = $data[0];
$siteID = $data[1];
$icons = new Icons();
$siteMgr = new Sites();
$sitename = $siteMgr->getname($siteID);
$sites = $siteMgr->getList();
$user = new User(sUserMgr()->getCurrentUserID());
$tagMgr = new Tags();
$filetypeMgr = new Filetypes();
$userinfo = $user->get();
$userinfo['PROPS'] = $user->properties->getValues(sUserMgr()->getCurrentUserID());
switch ($objecttype) {
    case 'user':
        $no_traceline = true;
        $autosave = true;
        if ($object) {
            $currentUser = new User($object);
            $currentUserInfo = $currentUser->get();
            $password = $currentUserInfo['PASSWORD'];
            $object_properties = sUserMgr()->properties->getList('LISTORDER');
            $object_permissions = array();
            $object_permissions['RWRITE'] = sUsergroups()->permissions->check(sUserMgr()->getCurrentUserID(), 'RUSERS');
            if (sUserMgr()->getAnonymousID() == (int) $object) {
                $object_permissions['RWRITE'] = 0;
            }
示例#2
0
     $outgoing[$oc]["VIANAME"] = $cblockInfo["NAME"];
     $outgoing[$oc]["EMBEDDED"] = $cblockInfo["EMBEDDED"];
     $cop = sCblockMgr()->getParents($oref[$i]["CBID"]);
     array_pop($cop);
     $outgoing[$oc]["PARENTS"] = $cop;
     $viacnt = 0;
     $refcohash[$hash] = $oc;
 } else {
     $viacnt = count($outgoing[$refcohash[$hash]]["VIATARGETS"]);
 }
 if ($oref[$i]["TGTTYPE"] == REFTYPE_PAGE) {
     $lThePageMgr = new PageMgr($oref[$i]["TGTAID"]);
     $siteInfo = $siteMgr->get($oref[$i]["TGTAID"]);
     if ($siteInfo['ID'] == $oref[$i]["TGTAID"]) {
         $pr = $lThePageMgr->getParents($oref[$i]["TGTOID"]);
         $pr[count($pr) - 1][0]['NAME'] = $siteMgr->getname($oref[$i]["TGTAID"]);
         $outgoing[$refcohash[$hash]]["VIATARGETS"][$viacnt]["PARENTS"] = $pr;
         $refPage = $lThePageMgr->getPage($oref[$i]["TGTOID"]);
         if ($refPage) {
             $refPageVersion = $refPage->getPublishedVersion(true);
             //$refPage = $lThePageMgr->getPage($oref[$i]["TGTOID"], $refPageVersion);
             $refPage = $lThePageMgr->getPage($oref[$i]["TGTOID"]);
             $refinfo = $refPage->get();
             $refinfo['RWRITE'] = $refPage->permissions->checkInternal(sUserMgr()->getCurrentUserID(), $oref[$i]["TGTOID"], "RWRITE");
             $refinfo['RDELETE'] = $refPage->permissions->checkInternal(sUserMgr()->getCurrentUserID(), $oref[$i]["TGTOID"], "RWRITE");
             $outgoing[$refcohash[$hash]]["VIATARGETS"][$viacnt]["SITEID"] = $oref[$i]["TGTAID"];
             $iconData = getIconForPage($refinfo);
             $outgoing[$refcohash[$hash]]["VIATARGETS"][$viacnt]["ICON"] = $iconData['iconclass'];
             $outgoing[$refcohash[$hash]]["VIATARGETS"][$viacnt]["STYLE"] = $iconData['style'];
             $outgoing[$refcohash[$hash]]["VIATARGETS"][$viacnt]["HASCHANGED"] = $refinfo['HASCHANGED'];
             if ($refinfo["OBJECTID"] < 1) {