Skip to content

Commit

Permalink
Correct use of classes without a namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
SjefvLoo committed Mar 23, 2015
1 parent ffa1953 commit a9efc6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions application/libraries/PluginManager/LimesurveyApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,13 @@ public function getResponse($surveyId, $responseId)

public function getResponses($surveyId, $attributes = array(), $condition = '', $params = array())
{
return Response::model($surveyId)->findAllByAttributes($attributes, $condition, $params);
return \Response::model($surveyId)->findAllByAttributes($attributes, $condition, $params);
}


public function getToken($surveyId, $token)
{
return Token::model($surveyId)->findByAttributes(array('token' => $token));
return \Token::model($surveyId)->findByAttributes(array('token' => $token));
}
/**
* Gets a key value list using the group name as value and the group id
Expand All @@ -235,7 +235,7 @@ public function getToken($surveyId, $token)
*/
public function getGroupList($surveyId)
{
$result = QuestionGroup::model()->findListByAttributes(array('sid' => $surveyId), 'group_name');
$result = \QuestionGroup::model()->findListByAttributes(array('sid' => $surveyId), 'group_name');
return $result;
}

Expand Down Expand Up @@ -329,7 +329,7 @@ public function getQuestions($surveyId, $language = 'en', $conditions = array())
{
$conditions['sid'] = $surveyId;
$conditions['language'] = $language;
return Question::model()->with('subquestions')->findAllByAttributes($conditions);
return \Question::model()->with('subquestions')->findAllByAttributes($conditions);
}
/**
* Gets the metadata for a table.
Expand Down
4 changes: 2 additions & 2 deletions application/libraries/PluginManager/PluginBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ public function publish($fileName)
// This is a limesurvey relative path.
if (strpos('/', $fileName) === 0)
{
$url = Yii::getPathOfAlias('webroot') . $fileName;
$url = \Yii::getPathOfAlias('webroot') . $fileName;

}
else // This is a plugin relative path.
{
$path = Yii::getPathOfAlias('webroot.plugins.' . get_class($this)) . DIRECTORY_SEPARATOR . $fileName;
$path = \Yii::getPathOfAlias('webroot.plugins.' . get_class($this)) . DIRECTORY_SEPARATOR . $fileName;
/*
* By using the asset manager the assets are moved to a publicly accessible path.
* This approach allows a locked down plugin directory that is not publicly accessible.
Expand Down

0 comments on commit a9efc6d

Please sign in to comment.