diff --git a/foo.htaccess b/foo.htaccess deleted file mode 100644 index af43f0f7ad..0000000000 Binary files a/foo.htaccess and /dev/null differ diff --git a/main/user/user.php b/main/user/user.php index a9cafd5aaf..4f010dc149 100755 --- a/main/user/user.php +++ b/main/user/user.php @@ -448,7 +448,7 @@ if (api_is_allowed_to_edit(null, true)) { $result = Database::query($sql); $row = Database::fetch_array($result, 'ASSOC'); - if ((!empty($row['user_id']) && ($row['user_id'] == $user_id || $row['user_id'] == "")) || empty($row)) { + if (!empty($row) && is_array($row) && isset($row['user_id']) && ($row['user_id'] == $user_id || $row['user_id'] == "")) { CourseManager::unsubscribe_user($_GET['user_id'], $courseCode); Display::addFlash( Display::return_message(get_lang('UserUnsubscribed')) diff --git a/src/Chamilo/CoreBundle/Entity/AgendaEventInvitation.php b/src/Chamilo/CoreBundle/Entity/AgendaEventInvitation.php index c58e004841..4ed488621b 100644 --- a/src/Chamilo/CoreBundle/Entity/AgendaEventInvitation.php +++ b/src/Chamilo/CoreBundle/Entity/AgendaEventInvitation.php @@ -13,7 +13,7 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Table(name="agenda_event_invitation") * Add @ to the next lineactivating the agenda_collective_invitations configuration setting. - * @ORM\Entity() + * ORM\Entity() */ class AgendaEventInvitation { diff --git a/src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php b/src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php index 8bee14e3b3..f417e90fb7 100644 --- a/src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php +++ b/src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php @@ -11,7 +11,7 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Table(name="agenda_event_invitee") * Add @ to the next lineactivating the agenda_collective_invitations configuration setting. - * @ORM\Entity() + * ORM\Entity() */ class AgendaEventInvitee { diff --git a/src/Chamilo/CoreBundle/Entity/AgendaReminder.php b/src/Chamilo/CoreBundle/Entity/AgendaReminder.php index 82e2aebec3..539366f0c4 100644 --- a/src/Chamilo/CoreBundle/Entity/AgendaReminder.php +++ b/src/Chamilo/CoreBundle/Entity/AgendaReminder.php @@ -10,7 +10,7 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Table(name="agenda_reminder") * Add @ to the next line when activatiing the agenda_reminders configuration setting - * @ORM\Entity() + * ORM\Entity() */ class AgendaReminder { diff --git a/src/Chamilo/CoreBundle/Entity/PersonalAgenda.php b/src/Chamilo/CoreBundle/Entity/PersonalAgenda.php index 1cbd8c80b3..101b8cf098 100644 --- a/src/Chamilo/CoreBundle/Entity/PersonalAgenda.php +++ b/src/Chamilo/CoreBundle/Entity/PersonalAgenda.php @@ -16,7 +16,7 @@ use Doctrine\ORM\Mapping as ORM; class PersonalAgenda { // Uncomment next line when activating the agenda_collective_invitations configuration setting. - use EventCollectiveTrait; + //use EventCollectiveTrait; /** * @var int diff --git a/src/Chamilo/CoreBundle/Entity/Portfolio.php b/src/Chamilo/CoreBundle/Entity/Portfolio.php index 1ff7fc5980..bce121320b 100644 --- a/src/Chamilo/CoreBundle/Entity/Portfolio.php +++ b/src/Chamilo/CoreBundle/Entity/Portfolio.php @@ -24,7 +24,7 @@ use Doctrine\ORM\Mapping as ORM; * } * ) * Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true - * @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioRepository") + * ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioRepository") */ class Portfolio { diff --git a/src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php b/src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php index 6c1c4712a3..2e9b630284 100644 --- a/src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php +++ b/src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php @@ -13,7 +13,7 @@ use Doctrine\ORM\Mapping as ORM; * * @ORM\Table(name="portfolio_attachment") * Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true - * @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioAttachmentRepository") + * ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioAttachmentRepository") */ class PortfolioAttachment { diff --git a/src/Chamilo/CoreBundle/Entity/PortfolioCategory.php b/src/Chamilo/CoreBundle/Entity/PortfolioCategory.php index 192d171cab..de629ed891 100644 --- a/src/Chamilo/CoreBundle/Entity/PortfolioCategory.php +++ b/src/Chamilo/CoreBundle/Entity/PortfolioCategory.php @@ -20,7 +20,7 @@ use Doctrine\ORM\Mapping as ORM; * } * ) * Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true - * @ORM\Entity() + * ORM\Entity() */ class PortfolioCategory { diff --git a/src/Chamilo/CoreBundle/Entity/PortfolioComment.php b/src/Chamilo/CoreBundle/Entity/PortfolioComment.php index f07caa8917..8ebdd71309 100644 --- a/src/Chamilo/CoreBundle/Entity/PortfolioComment.php +++ b/src/Chamilo/CoreBundle/Entity/PortfolioComment.php @@ -18,7 +18,7 @@ use Gedmo\Mapping\Annotation as Gedmo; * @Gedmo\Tree(type="nested") * @ORM\Table(name="portfolio_comment") * Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true - * @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioCommentRepository") + * ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioCommentRepository") */ class PortfolioComment { @@ -29,7 +29,7 @@ class PortfolioComment * @var int * * Add @ to the next line if portfolio_advanced_sharing config setting is true - * @ORM\Column(name="visibility", type="smallint", options={"default": 1}) + * ORM\Column(name="visibility", type="smallint", options={"default": 1}) */ protected $visibility = 1; diff --git a/src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php b/src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php index fe90c9f358..0b0d59584b 100644 --- a/src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php +++ b/src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php @@ -8,7 +8,7 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Table(name="portfolio_rel_tag") - * @ORM\Entity() + * ORM\Entity() */ class PortfolioRelTag { diff --git a/src/Chamilo/CourseBundle/Entity/CWiki.php b/src/Chamilo/CourseBundle/Entity/CWiki.php index 86857cc9a1..eb3fc3fef4 100644 --- a/src/Chamilo/CourseBundle/Entity/CWiki.php +++ b/src/Chamilo/CourseBundle/Entity/CWiki.php @@ -225,8 +225,8 @@ class CWiki * @var Collection * * Add @ to the next lines if api_get_configuration_value('wiki_categories_enabled') is true - * @ORM\ManyToMany(targetEntity="Chamilo\CourseBundle\Entity\CWikiCategory", inversedBy="wikiPages") - * @ORM\JoinTable( + * ORM\ManyToMany(targetEntity="Chamilo\CourseBundle\Entity\CWikiCategory", inversedBy="wikiPages") + * ORM\JoinTable( * name="c_wiki_rel_category", * joinColumns={@ORM\JoinColumn(name="wiki_id", referencedColumnName="iid", onDelete="CASCADE")}, * inverseJoinColumns={@ORM\JoinColumn(name="category_id", referencedColumnName="id", onDelete="CASCADE")} diff --git a/src/Chamilo/CourseBundle/Entity/CWikiCategory.php b/src/Chamilo/CourseBundle/Entity/CWikiCategory.php index 3f226ed037..ae640e315a 100644 --- a/src/Chamilo/CourseBundle/Entity/CWikiCategory.php +++ b/src/Chamilo/CourseBundle/Entity/CWikiCategory.php @@ -15,7 +15,7 @@ use Gedmo\Mapping\Annotation as Gedmo; * @Gedmo\Tree(type="nested") * @ORM\Table(name="c_wiki_category") * Add @ to the next line if api_get_configuration_value('wiki_categories_enabled') is true - * @ORM\Entity(repositoryClass="Chamilo\CourseBundle\Entity\Repository\CWikiCategoryRepository") + * ORM\Entity(repositoryClass="Chamilo\CourseBundle\Entity\Repository\CWikiCategoryRepository") */ class CWikiCategory { diff --git a/tests/scripts/update_user_extra_field.php b/tests/scripts/update_user_extra_field.php index c209ea8017..6b3715f485 100644 --- a/tests/scripts/update_user_extra_field.php +++ b/tests/scripts/update_user_extra_field.php @@ -35,10 +35,10 @@ foreach ($users as $user) { UserManager::update_extra_field_value( $userInfo['user_id'], $extraFieldName, - api_replace_dangerous_char($user[$extraFieldName]) + $user[$extraFieldName] ); } - echo 'Updating extrafield "'.$extraFieldName.'" - user:'.$userInfo['username'].' -> value: '.$user[$extraFieldName].'
'; + echo 'Updating extrafield "'.$extraFieldName.'": '.$user[$extraFieldName].'
'; } else { echo 'User does not exists: '.$user['user'].'
'; }