Skip to content

Commit

Permalink
MDL-24321 switching to stdClass in /repository/
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Sep 21, 2010
1 parent 7f38934 commit a27ab6f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions repository/alfresco/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ public function __construct($repositoryid, $context = SYSCONTEXTID, $options = a

public function print_login() {
if ($this->options['ajax']) {
$user_field = new object();
$user_field = new stdClass();
$user_field->label = get_string('username', 'repository_alfresco').': ';
$user_field->id = 'alfresco_username';
$user_field->type = 'text';
$user_field->name = 'al_username';

$passwd_field = new object();
$passwd_field = new stdClass();
$passwd_field->label = get_string('password', 'repository_alfresco').': ';
$passwd_field->id = 'alfresco_password';
$passwd_field->type = 'password';
Expand Down
6 changes: 3 additions & 3 deletions repository/draftfiles_ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
//bad luck, we can not rename!
echo json_encode(false);
} else if ($file = $fs->get_file($user_context->id, 'user', 'draft', $draftid, $filepath, $filename)) {
$return = new object();
$return = new stdClass();
$newfile = $fs->create_file_from_storedfile(array('filename'=>$newfilename), $file);
$file->delete();
$return->filepath = $newfile->get_filepath();
Expand Down Expand Up @@ -181,7 +181,7 @@
$file->delete();
}

$return = new object();
$return = new stdClass();
if ($action === 'renamedir') {
$return->filepath = $parent;
} else {
Expand All @@ -200,7 +200,7 @@
//bad luck, we can not rename!
echo json_encode(false);
} else if ($file = $fs->get_file($user_context->id, 'user', 'draft', $draftid, $filepath, $filename)) {
$return = new object();
$return = new stdClass();
$newfile = $fs->create_file_from_storedfile(array('filepath'=>$newfilepath), $file);
$file->delete();
$return->filepath = $newfile->get_filepath();
Expand Down
4 changes: 2 additions & 2 deletions repository/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ public function set_option($options = array()) {
global $DB;

if (!empty($options['name'])) {
$r = new object();
$r = new stdClass();
$r->id = $this->id;
$r->name = $options['name'];
$DB->update_record('repository_instances', $r);
Expand All @@ -1321,7 +1321,7 @@ public function set_option($options = array()) {
if ($id = $DB->get_field('repository_instance_config', 'id', array('name'=>$name, 'instanceid'=>$this->id))) {
$DB->set_field('repository_instance_config', 'value', $value, array('id'=>$id));
} else {
$config = new object();
$config = new stdClass();
$config->instanceid = $this->id;
$config->name = $name;
$config->value = $value;
Expand Down
2 changes: 1 addition & 1 deletion repository/wikimedia/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function check_login() {
// if check_login returns false,
// this function will be called to print a login form.
public function print_login() {
$keyword = new object();
$keyword = new stdClass();
$keyword->label = get_string('keyword', 'repository_wikimedia').': ';
$keyword->id = 'input_text_keyword';
$keyword->type = 'text';
Expand Down

0 comments on commit a27ab6f

Please sign in to comment.