Skip to content

Commit

Permalink
merge commit
Browse files Browse the repository at this point in the history
  • Loading branch information
thyseus committed Mar 18, 2014
2 parents e09d9bd + 4eae326 commit 6596b53
Show file tree
Hide file tree
Showing 48 changed files with 371 additions and 371 deletions.
6 changes: 3 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
'import'=>array(
'application.models.*',
'application.components.*',
'application.modules.user.components.*',
'application.modules.user.models.*',
'user.user.components.*',
'user.user.models.*',
),
'modules'=>array(
'user' => array(
Expand All @@ -32,7 +32,7 @@
'components'=>array(
'cache' => array('class' => 'system.caching.CFileCache'),
'user'=>array(
'class' => 'application.modules.user.components.YumWebUser',
'class' => 'user.user.components.YumWebUser',
'allowAutoLogin'=>true,
),
'urlManager'=>array(
Expand Down
12 changes: 6 additions & 6 deletions modules/avatar/AvatarModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class AvatarModule extends CWebModule {
public $enableGravatarDefault = true;

// override this with your custom layout, if available
public $adminLayout = 'application.modules.user.views.layouts.yum';
public $layout = 'application.modules.user.views.layouts.yum';
public $adminLayout = 'user.user.views.layouts.yum';
public $layout = 'user.user.views.layouts.yum';

public $avatarPath = 'images';

Expand All @@ -28,10 +28,10 @@ class AvatarModule extends CWebModule {

public function init() {
$this->setImport(array(
'application.modules.user.controllers.*',
'application.modules.user.models.*',
'application.modules.avatar.controllers.*',
'application.modules.avatar.models.*',
'user.user.controllers.*',
'user.user.models.*',
'user.avatar.controllers.*',
'user.avatar.models.*',
));
}
}
2 changes: 1 addition & 1 deletion modules/avatar/controllers/YumAvatarController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This controller handles the administration, upload and the deletion
// of an Avatar image for the user profile.

Yii::import('application.modules.user.controllers.YumController');
Yii::import('user.user.controllers.YumController');

class YumAvatarController extends YumController {
public function beforeAction($action) {
Expand Down
8 changes: 4 additions & 4 deletions modules/friendship/controllers/YumFriendshipController.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
Yii::import('application.modules.user.controllers.YumController');
Yii::import('application.modules.user.components.*');
Yii::import('application.modules.user.models.*');
Yii::import('application.modules.friendship.models.*');
Yii::import('user.user.controllers.YumController');
Yii::import('user.user.components.*');
Yii::import('user.user.models.*');
Yii::import('user.friendship.models.*');

class YumFriendshipController extends YumController {
// make sure that friendship is enabled in the configuration
Expand Down
4 changes: 2 additions & 2 deletions modules/friendship/models/YumFriendship.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function acceptFriendship() {
if(Yum::hasModule('message')
&& isset($this->inviter->privacy)
&& $this->inviter->privacy->message_new_friendship) {
Yii::import('application.modules.message.models.YumMessage');
Yii::import('user.message.models.YumMessage');
YumMessage::write($this->inviter, $this->invited,
Yum::t('Your friendship request has been accepted'),
strtr(
Expand Down Expand Up @@ -158,7 +158,7 @@ public function beforeSave() {
if(Yum::hasModule('message')
&& $user->privacy
&& $user->privacy->message_new_friendship) {
Yii::import('application.modules.message.models.YumMessage');
Yii::import('user.message.models.YumMessage');
YumMessage::write($user, $this->inviter,
Yum::t('New friendship request from {username}', array(
'{username}' => $this->inviter->username)),
Expand Down
2 changes: 1 addition & 1 deletion modules/friendship/views/friendship/friends.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
echo '</div><!-- friends -->';

Yii::import(
'application.modules.friendship.controllers.YumFriendshipController');
'user.friendship.controllers.YumFriendshipController');
echo YumFriendshipController::invitationLink(Yii::app()->user->id, $model->id);
?>
2 changes: 1 addition & 1 deletion modules/membership/MembershipModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class MembershipModule extends CWebModule {
public $paymentTable = '{{payment}}';

// override this with your custom layout, if available
public $layout = 'application.modules.user.views.layouts.yum';
public $layout = 'user.user.views.layouts.yum';


public $controllerMap=array(
Expand Down
8 changes: 4 additions & 4 deletions modules/membership/controllers/YumMembershipController.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
Yii::import('application.modules.user.controllers.YumController');
Yii::import('application.modules.user.models.Yum');
Yii::import('application.modules.role.models.*');
Yii::import('application.modules.membership.models.*');
Yii::import('user.user.controllers.YumController');
Yii::import('user.user.models.Yum');
Yii::import('user.role.models.*');
Yii::import('user.membership.models.*');

class YumMembershipController extends YumController {
public $defaultAction = 'index';
Expand Down
6 changes: 3 additions & 3 deletions modules/membership/controllers/YumPaymentController.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

Yii::import('application.modules.user.controllers.YumController');
Yii::import('application.modules.user.models.*');
Yii::import('application.modules.membership.models.*');
Yii::import('user.user.controllers.YumController');
Yii::import('user.user.models.*');
Yii::import('user.membership.models.*');

class YumPaymentController extends YumController {

Expand Down
4 changes: 2 additions & 2 deletions modules/membership/models/YumMembership.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
Yii::import('application.modules.role.models.*');
Yii::import('user.role.models.*');

class YumMembership extends YumActiveRecord{
public static function model($className=__CLASS__) {
Expand Down Expand Up @@ -126,7 +126,7 @@ public function getPossibleExtendOptions($dir = 'downgrade') {

public function sendPaymentConfirmation () {
if(Yum::hasModule('message')) {
Yii::import('application.modules.message.models.*');
Yii::import('user.message.models.*');
return YumMessage::write($this->user, 1,
Yum::t('Payment arrived'),
strtr(
Expand Down
4 changes: 2 additions & 2 deletions modules/message/MessageModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class MessageModule extends CWebModule

public $messageTable = '{{message}}';

public $layout = 'application.modules.user.views.layouts.yum';
public $layout = 'user.user.views.layouts.yum';

public $dateFormat = 'Y-m-d G:i:s';

public $inboxView = 'application.modules.message.views.message.index';
public $inboxView = 'user.message.views.message.index';
public $inboxRoute = array('index');

// Send a message to the user if the email changing has been succeeded
Expand Down
2 changes: 1 addition & 1 deletion modules/message/components/MessageWidget.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
Yii::import('application.modules.user.UserModule');
Yii::import('user.user.UserModule');
Yii::import('zii.widgets.CPortlet');

class MessageWidget extends CPortlet
Expand Down
4 changes: 2 additions & 2 deletions modules/message/controllers/YumMessageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/* This is the controller for the internal messaging System of
* the Yii User Management Module. */

Yii::import('application.modules.user.controllers.YumController');
Yii::import('application.modules.message.models.YumMessage');
Yii::import('user.user.controllers.YumController');
Yii::import('user.message.models.YumMessage');

class YumMessageController extends YumController {
public function accessRules() {
Expand Down
2 changes: 1 addition & 1 deletion modules/message/models/YumMessage.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
Yii::import('application.modules.user.models.*');
Yii::import('user.user.models.*');

/**
* This is the model class for the Message subsystem of the Yii User
Expand Down
4 changes: 2 additions & 2 deletions modules/message/views/message/new_messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
if(count($messages) > 0) {
if(Yum::module('message')->messageSystem == YumMessage::MSG_PLAIN)
$this->renderPartial(
'application.modules.message.views.message.new_messages_plain', array(
'user.message.views.message.new_messages_plain', array(
'message' => $message));
else if(Yum::module('message')->messageSystem == YumMessage::MSG_DIALOG)
$this->renderPartial(
'application.modules.message.views.message.new_messages_dialog', array(
'user.message.views.message.new_messages_dialog', array(
'message' => $message));
}
?>
2 changes: 1 addition & 1 deletion modules/profile/components/ProfileCommentsWidget.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
Yii::import('application.modules.user.UserModule');
Yii::import('user.user.UserModule');
Yii::import('zii.widgets.CPortlet');

class ProfileCommentsWidget extends CPortlet
Expand Down
2 changes: 1 addition & 1 deletion modules/profile/components/ProfileVisitWidget.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
Yii::import('application.modules.user.UserModule');
Yii::import('user.user.UserModule');
Yii::import('zii.widgets.CPortlet');

class ProfileVisitWidget extends CPortlet
Expand Down
6 changes: 3 additions & 3 deletions modules/profile/controllers/YumPrivacysettingController.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

Yii::import('application.modules.user.controllers.YumController');
Yii::import('application.modules.user.models.Yum');
Yii::import('application.modules.profile.models.*');
Yii::import('user.user.controllers.YumController');
Yii::import('user.user.models.Yum');
Yii::import('user.profile.models.*');

class YumPrivacysettingController extends YumController
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
Yii::import('application.modules.user.models.*');
Yii::import('user.user.models.*');

class YumProfileCommentController extends YumController {
public function accessRules() {
Expand Down
2 changes: 1 addition & 1 deletion modules/profile/models/YumProfileComment.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function afterSave() {
if(Yum::hasModule('messages')
&& $user->privacy
&& $user->privacy->message_new_profilecomment) {
Yii::import('application.modules.messages.models.YumMessage');
Yii::import('user.messages.models.YumMessage');
YumMessage::write($user, $this->user_id,
Yum::t('New profile comment from {username}', array(
'{username}' => $this->user->username)),
Expand Down
4 changes: 2 additions & 2 deletions modules/profile/views/layouts/yumprofile.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<?php Yum::renderFlash(); ?>
<?php
if(Yum::hasModule('message')) {
Yii::import('application.modules.message.components.*');
Yii::import('user.message.components.*');
$this->widget('MessageWidget');
}
if(Yum::hasModule('profile') && Yum::module('profile')->enableProfileVisitLogging) {
Yii::import('application.modules.profile.components.*');
Yii::import('user.profile.components.*');
$this->widget('ProfileVisitWidget');
}
$this->renderMenu(); ?>
Expand Down
2 changes: 1 addition & 1 deletion modules/profile/views/profile/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<?php
if(Yum::hasModule('friendship'))
$this->renderPartial(
'application.modules.friendship.views.friendship.friends', array(
'user.friendship.views.friendship.friends', array(
'model' => $model)); ?>
<br />
<?php
Expand Down
82 changes: 41 additions & 41 deletions modules/registration/RegistrationModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,45 @@
Yii::setPathOfAlias('registration' , dirname(__FILE__));

class RegistrationModule extends CWebModule {
// why enableRegistration ? - in case you only want a recovery !
public $layout = 'user.views.layouts.yum';
public $enableRegistration = true;
public $enableRecovery = true;

public $recoveryUrl = array('//registration/registration/recovery');
public $activationUrl = array('//registration/registration/activation');
public $registrationUrl = array('//registration/registration/registration');

public $activationSuccessView = '/registration/activation_success';
public $activationFailureView = '/registration/activation_failure';

// Whether to confirm the activation of an user by email
public $enableActivationConfirmation = true;

public $registrationEmail='[email protected]';
public $recoveryEmail='[email protected]';

// Which roles should be assigned automatically to a fresh registered user?
// Use role id, for example array(1,4,5)
public $defaultRoles = array();
public $defaultHybridAuthRoles = array();

public $registrationView = '/registration/registration';
public $changePasswordView = 'user.views.user.changepassword';
public $recoverPasswordView = 'registration.views.registration.recovery';

/**
* Whether to use captcha in registration process
* @var boolean
*/
public $enableCaptcha = true;

public $loginAfterSuccessfulRecovery = false;
public $loginAfterSuccessfulActivation = false;

public $controllerMap=array(
'registration'=>array(
'class'=>'registration.controllers.YumRegistrationController'),
);

// why enableRegistration ? - in case you only want a recovery !
public $layout = 'user.views.layouts.yum';
public $enableRegistration = true;
public $enableRecovery = true;
public $recoveryUrl = array('//registration/registration/recovery');
public $activationUrl = array('//registration/registration/activation');
public $registrationUrl = array('//registration/registration/registration');
public $activationSuccessView = '/registration/activation_success';
public $activationFailureView = '/registration/activation_failure';
// Whether to confirm the activation of an user by email
public $enableActivationConfirmation = true;
public $registrationEmail='[email protected]';
public $recoveryEmail='[email protected]';
// Which roles should be assigned automatically to a fresh registered user?
// Use role id, for example array(1,4,5)
public $defaultRoles = array();
public $defaultHybridAuthRoles = array();
public $registrationView = '/registration/registration';
public $changePasswordView = 'user.views.user.changepassword';
public $recoverPasswordView = 'registration.views.registration.recovery';
/**
* Whether to use captcha in registration process
* @var boolean
*/
public $enableCaptcha = true;
public $loginAfterSuccessfulRecovery = false;
public $loginAfterSuccessfulActivation = false;
public $controllerMap=array(
'registration'=>array(
'class'=>'registration.controllers.YumRegistrationController'),
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function actionRegistration() {
'//registration/registration/registration'))
throw new CHttpException(403);

Yii::import('application.modules.profile.models.*');
Yii::import('user.profile.models.*');
$form = new YumRegistrationForm;
$profile = new YumProfile;

Expand Down
2 changes: 1 addition & 1 deletion modules/role/RoleModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class RoleModule extends CWebModule {
// SrBAC
public $useYiiCheckAccess = false;

public $layout = 'application.modules.user.views.layouts.yum';
public $layout = 'user.user.views.layouts.yum';

public $roleTable = '{{role}}';
public $permissionTable = '{{permission}}';
Expand Down
6 changes: 3 additions & 3 deletions modules/role/controllers/YumActionController.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

Yii::import('application.modules.user.controllers.YumController');
Yii::import('application.modules.user.models.*');
Yii::import('application.modules.role.models.*');
Yii::import('user.user.controllers.YumController');
Yii::import('user.user.models.*');
Yii::import('user.role.models.*');

class YumActionController extends YumController {

Expand Down
6 changes: 3 additions & 3 deletions modules/role/controllers/YumPermissionController.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

Yii::import('application.modules.user.controllers.YumController');
Yii::import('application.modules.user.models.*');
Yii::import('application.modules.role.models.*');
Yii::import('user.user.controllers.YumController');
Yii::import('user.user.models.*');
Yii::import('user.role.models.*');

class YumPermissionController extends YumController
{
Expand Down
Loading

0 comments on commit 6596b53

Please sign in to comment.