Skip to content

Commit

Permalink
prepare paths for composer
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin committed Mar 18, 2014
1 parent fed3c1e commit 4eae326
Show file tree
Hide file tree
Showing 49 changed files with 338 additions and 338 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
6 changes: 3 additions & 3 deletions modules/registration/RegistrationModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

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

Expand All @@ -27,9 +27,9 @@ class RegistrationModule extends CWebModule {

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

/**
* Whether to use captcha in registration process
Expand Down
10 changes: 5 additions & 5 deletions modules/registration/controllers/YumRegistrationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* Registration process. If this example does exactly what you want in your
* Project, then you can feel lucky already! */

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

class YumRegistrationController extends YumController {
public $defaultAction = 'registration';
Expand Down Expand Up @@ -73,7 +73,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
8 changes: 4 additions & 4 deletions modules/role/controllers/YumRoleController.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 YumRoleController extends YumController {
public function accessRules() {
Expand All @@ -28,7 +28,7 @@ public function actionView() {

$activeMemberships = false;
if(Yum::hasModule('membership')) {
Yii::import('application.modules.membership.models.*');
Yii::import('user.membership.models.*');
$activeMemberships= new CActiveDataProvider('YumMembership', array(
'criteria' => array(
'condition' => "membership_id = {$model->id}")));
Expand Down
2 changes: 1 addition & 1 deletion modules/user/components/EPhotoValidator.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');
/**
* EPhotoValidator class file.
*
Expand Down
4 changes: 2 additions & 2 deletions modules/user/components/YumWebUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function can($action, $subaction = null) {
if(!Yum::hasModule('role'))
throw new CException(Yum::t('Role module is not activated'));

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

if(Yum::module('role')->adminIsGod && Yii::app()->user->isAdmin())
return true;
Expand Down Expand Up @@ -109,7 +109,7 @@ public static function hasUser($username, $uid = 0)
*/
public function hasRole($role, $uid = 0) {
if(Yum::hasModule('role')) {
Yii::import('application.modules.role.models.*');
Yii::import('user.role.models.*');

if($uid == 0)
$uid = Yii::app()->user->id;
Expand Down
Loading

0 comments on commit 4eae326

Please sign in to comment.