* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
- * See update_profile.php for documentation
*/
namespace Friendica\Module\Update;
throw new HTTPException\UnauthorizedException($this->t('Access denied.'));
}
- $profileUid = $request['p'] ?? 0;
- $force = $request['force'] ?? false;
+ $profileUid = $request['p'] ?? 0;
+ $force = $request['force'] ?? false;
$uriId = $request['uri_id'] ?? 0;
if (empty($uriId)) {
$item = Post::selectFirst(
['uid', 'parent-uri-id', 'uri-id'],
['uri-id' => $uriId, 'uid' => [0, $profileUid]],
- ['order' => ['uid' => true]]
+ ['order' => ['uid' => true]]
);
if (empty($item)) {
throw new HTTPException\NotFoundException($this->t('The requested item doesn\'t exist or has been deleted.'));
}
- $this->app->setProfileOwner($item['uid'] ?? $profileUid);
+ $this->app->setProfileOwner($item['uid'] ?: $profileUid);
$parentUriId = $item['parent-uri-id'];
if (empty($force)) {