Commit 431a6613 authored by Robert Lyon's avatar Robert Lyon
Browse files

Tidying up the initial code to mahara standards (Bug #1393530)



Change-Id: I398479c34771df1978a98ac42b1b866afe4e7917
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent e099440c
......@@ -19,7 +19,7 @@
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="name" UNIQUE="true" FIELDS="name"/>
<INDEX NAME="nameuk" UNIQUE="true" FIELDS="name"/>
</INDEXES>
</TABLE>
<TABLE NAME="external_functions" COMMENT="list of all external functions">
......@@ -35,7 +35,7 @@
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="name" UNIQUE="true" FIELDS="name" COMMENT="the external function names must be globally unique"/>
<INDEX NAME="nameuk" UNIQUE="true" FIELDS="name" COMMENT="the external function names must be globally unique"/>
</INDEXES>
</TABLE>
<TABLE NAME="external_services_functions" COMMENT="lists functions available in each service group">
......@@ -45,8 +45,8 @@
<FIELD NAME="functionname" TYPE="char" LENGTH="200" NOTNULL="true" SEQUENCE="false" PREVIOUS="externalserviceid"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="externalserviceid"/>
<KEY NAME="externalserviceid" TYPE="foreign" FIELDS="externalserviceid" REFTABLE="external_services" REFFIELDS="id" PREVIOUS="primary"/>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="externalserviceidfk"/>
<KEY NAME="externalserviceidfk" TYPE="foreign" FIELDS="externalserviceid" REFTABLE="external_services" REFFIELDS="id" PREVIOUS="primary"/>
</KEYS>
</TABLE>
<TABLE NAME="external_tokens" COMMENT="Security tokens for accessing of external services">
......@@ -64,18 +64,18 @@
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="created timestamp" PREVIOUS="validuntil" NEXT="lastaccess"/>
<FIELD NAME="lastaccess" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="last access timestamp" PREVIOUS="timecreated" NEXT="publickey"/>
<FIELD NAME="publickey" TYPE="text" NOTNULL="true" DEFAULT="" SEQUENCE="false" COMMENT="created timestamp" PREVIOUS="privatekey" NEXT="publickeyexpires"/>
<FIELD NAME="publickeyexpires" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="created timestamp" PREVIOUS="publickey" NEXT="wssigenc"/>
<FIELD NAME="publickeyexpires" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="created timestamp" PREVIOUS="publickey" NEXT="wssigenc"/>
<FIELD NAME="wssigenc" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" PREVIOUS="publickeyexpires"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="userid"/>
<KEY NAME="userid" TYPE="foreign" FIELDS="userid" REFTABLE="usr" REFFIELDS="id" PREVIOUS="primary" NEXT="institutionfk"/>
<KEY NAME="institutionfk" TYPE="foreign" FIELDS="institution" REFTABLE="institution" REFFIELDS="name" PREVIOUS="userid" NEXT="externalserviceid"/>
<KEY NAME="externalserviceid" TYPE="foreign" FIELDS="externalserviceid" REFTABLE="external_services" REFFIELDS="id" PREVIOUS="institutionfk" NEXT="creatorid"/>
<KEY NAME="creatorid" TYPE="foreign" FIELDS="creatorid" REFTABLE="usr" REFFIELDS="id" PREVIOUS="externalserviceid"/>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="useridfk"/>
<KEY NAME="useridfk" TYPE="foreign" FIELDS="userid" REFTABLE="usr" REFFIELDS="id" PREVIOUS="primary" NEXT="institutionfk"/>
<KEY NAME="institutionfk" TYPE="foreign" FIELDS="institution" REFTABLE="institution" REFFIELDS="name" PREVIOUS="useridfk" NEXT="externalserviceidfk"/>
<KEY NAME="externalserviceidfk" TYPE="foreign" FIELDS="externalserviceid" REFTABLE="external_services" REFFIELDS="id" PREVIOUS="institutionfk" NEXT="creatoridfk"/>
<KEY NAME="creatoridfk" TYPE="foreign" FIELDS="creatorid" REFTABLE="usr" REFFIELDS="id" PREVIOUS="externalserviceidfk"/>
</KEYS>
<INDEXES>
<INDEX NAME="token" UNIQUE="true" FIELDS="token"/>
<INDEX NAME="tokenuk" UNIQUE="true" FIELDS="token"/>
</INDEXES>
</TABLE>
<TABLE NAME="external_services_users" COMMENT="users allowed to use services with restricted users flag">
......@@ -89,14 +89,14 @@
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="created timestamp" PREVIOUS="validuntil" NEXT="lastaccess"/>
<FIELD NAME="lastaccess" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="last access timestamp" PREVIOUS="timecreated" NEXT="publickey"/>
<FIELD NAME="publickey" TYPE="text" NOTNULL="true" DEFAULT="" SEQUENCE="false" COMMENT="created timestamp" PREVIOUS="privatekey" NEXT="publickeyexpires"/>
<FIELD NAME="publickeyexpires" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="created timestamp" PREVIOUS="publickey" NEXT="wssigenc"/>
<FIELD NAME="publickeyexpires" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="created timestamp" PREVIOUS="publickey" NEXT="wssigenc"/>
<FIELD NAME="wssigenc" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" PREVIOUS="publickeyexpires"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="externalserviceid"/>
<KEY NAME="externalserviceid" TYPE="foreign" FIELDS="externalserviceid" REFTABLE="external_services" REFFIELDS="id" PREVIOUS="primary" NEXT="userid"/>
<KEY NAME="userid" TYPE="foreign" FIELDS="userid" REFTABLE="usr" REFFIELDS="id" PREVIOUS="externalserviceid" NEXT="institutionfk"/>
<KEY NAME="institutionfk" TYPE="foreign" FIELDS="institution" REFTABLE="institution" REFFIELDS="name" PREVIOUS="userid"/>
<KEY NAME="externalserviceidfk" TYPE="foreign" FIELDS="externalserviceid" REFTABLE="external_services" REFFIELDS="id" PREVIOUS="primary" NEXT="useridfk"/>
<KEY NAME="useridfk" TYPE="foreign" FIELDS="userid" REFTABLE="usr" REFFIELDS="id" PREVIOUS="externalserviceiduk" NEXT="institutionfk"/>
<KEY NAME="institutionfk" TYPE="foreign" FIELDS="institution" REFTABLE="institution" REFFIELDS="name" PREVIOUS="useridfk"/>
</KEYS>
</TABLE>
<TABLE NAME="oauth_server_registry" COMMENT="Table holding consumer key/secret combos an user issued to consumers">
......@@ -121,11 +121,11 @@
<FIELD NAME="timestamp" TYPE="datetime" NOTNULL="true" SEQUENCE="false" COMMENT="creation timestamp" PREVIOUS="issue_date"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="uk_consumer_key"/>
<KEY NAME="uk_consumer_key" TYPE="unique" FIELDS="consumer_key" PREVIOUS="primary" NEXT="userid"/>
<KEY NAME="userid" TYPE="foreign" FIELDS="userid" REFTABLE="usr" REFFIELDS="id" PREVIOUS="uk_consumer_key" NEXT="externalserviceid"/>
<KEY NAME="externalserviceid" TYPE="foreign" FIELDS="externalserviceid" REFTABLE="external_services" REFFIELDS="id" PREVIOUS="userid" NEXT="institutionfk"/>
<KEY NAME="institutionfk" TYPE="foreign" FIELDS="institution" REFTABLE="institution" REFFIELDS="name" PREVIOUS="externalserviceid"/>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="consumerkeyuk"/>
<KEY NAME="consumerkeyuk" TYPE="unique" FIELDS="consumer_key" PREVIOUS="primary" NEXT="useridfk"/>
<KEY NAME="useridfk" TYPE="foreign" FIELDS="userid" REFTABLE="usr" REFFIELDS="id" PREVIOUS="consumerkeyuk" NEXT="externalserviceidfk"/>
<KEY NAME="externalserviceidfk" TYPE="foreign" FIELDS="externalserviceid" REFTABLE="external_services" REFFIELDS="id" PREVIOUS="useriduk" NEXT="institutionfk"/>
<KEY NAME="institutionfk" TYPE="foreign" FIELDS="institution" REFTABLE="institution" REFFIELDS="name" PREVIOUS="externalserviceidfk"/>
</KEYS>
</TABLE>
<TABLE NAME="oauth_server_nonce" COMMENT="Nonce used by a certain consumer, every used nonce should be unique, this prevents replaying attacks">
......@@ -137,8 +137,8 @@
<FIELD NAME="timestamp" TYPE="datetime" NOTNULL="true" SEQUENCE="false" COMMENT="creation timestamp" PREVIOUS="nonce"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="uk_keys"/>
<KEY NAME="uk_keys" TYPE="unique" FIELDS="consumer_key,token,timestamp,nonce" PREVIOUS="primary"/>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="keysuk"/>
<KEY NAME="keysuk" TYPE="unique" FIELDS="consumer_key,token,timestamp,nonce" PREVIOUS="primary"/>
</KEYS>
</TABLE>
<TABLE NAME="oauth_server_token" COMMENT="Table used to verify signed requests sent to a server by the consumer">
......@@ -157,10 +157,10 @@
<FIELD NAME="timestamp" TYPE="datetime" NOTNULL="true" SEQUENCE="false" COMMENT="creation timestamp" PREVIOUS="token_ttl"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="uk_token"/>
<KEY NAME="uk_token" TYPE="unique" FIELDS="token" PREVIOUS="primary" NEXT="fk_osr_ref_id"/>
<KEY NAME="fk_ref_id" TYPE="foreign" FIELDS="osr_id_ref" REFTABLE="oauth_server_registry" REFFIELDS="id" PREVIOUS="uk_token" NEXT="userid"/>
<KEY NAME="userid" TYPE="foreign" FIELDS="userid" REFTABLE="usr" REFFIELDS="id" PREVIOUS="fk_osr_ref_id"/>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="tokenuk"/>
<KEY NAME="tokenuk" TYPE="unique" FIELDS="token" PREVIOUS="primary" NEXT="osrrefidfk"/>
<KEY NAME="osrrefidfk" TYPE="foreign" FIELDS="osr_id_ref" REFTABLE="oauth_server_registry" REFFIELDS="id" PREVIOUS="tokenuk" NEXT="useridfk"/>
<KEY NAME="useridfk" TYPE="foreign" FIELDS="userid" REFTABLE="usr" REFFIELDS="id" PREVIOUS="osrrefidfk"/>
</KEYS>
</TABLE>
<TABLE NAME="external_services_logs" COMMENT="external services logs">
......@@ -180,7 +180,7 @@
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
<KEY NAME="userid" TYPE="foreign" FIELDS="userid" REFTABLE="usr" REFFIELDS="id"/>
<KEY NAME="useridfk" TYPE="foreign" FIELDS="userid" REFTABLE="usr" REFFIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="externalserviceid" UNIQUE="false" FIELDS="externalserviceid"/>
......
This diff is collapsed.
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2011 Catalyst IT Ltd and others; see:
* http://wiki.mahara.org/Contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage auth-webservice
* @subpackage core
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006-2011 Catalyst IT Ltd http://catalyst.net.nz
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
*
*/
......
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2011 Catalyst IT Ltd and others; see:
* http://wiki.mahara.org/Contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage auth-webservice
* @subpackage core
* @author Catalyst IT Ltd
* @author Piers Harding
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006-2011 Catalyst IT Ltd http://catalyst.net.nz
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
*
*/
......@@ -110,7 +93,6 @@ class AuthWebservice extends AuthInternal {
}
// The main type - a salted sha1
// $sha1sent = $this->encrypt_password($theysent, $salt);
$sha1sent = $this->encrypt_password($theysent, $salt, '$2a$' . get_config('bcrypt_cost') . '$', get_config('passwordsaltmain'));
return $sha1sent == $wehave;
}
......@@ -146,7 +128,7 @@ class PluginAuthWebservice extends PluginAuth {
'url' => 'webservice/admin/index.php',
'title' => get_string('webservices', 'auth.webservice'),
'weight' => 10,
'selected' => false,
'selected' => false,
'submenu' => array(),
),
'webservice/oauthconfig' => array(
......@@ -154,7 +136,7 @@ class PluginAuthWebservice extends PluginAuth {
'url' => 'webservice/admin/oauthv1sregister.php',
'title' => get_string('oauth', 'auth.webservice'),
'weight' => 10,
'selected' => false,
'selected' => false,
'submenu' => array(),
),
'webservice/logs' => array(
......@@ -162,7 +144,7 @@ class PluginAuthWebservice extends PluginAuth {
'url' => 'webservice/admin/webservicelogs.php',
'title' => get_string('webservicelogs', 'auth.webservice'),
'weight' => 20,
'selected' => false,
'selected' => false,
'submenu' => array(),
),
'webservice/testclient' => array(
......@@ -176,7 +158,6 @@ class PluginAuthWebservice extends PluginAuth {
);
if ($USER->is_logged_in() && $smarty) {
// $main = main_nav();
$SELECTEDSUBNAV = ($SELECTEDSUBNAV ? $SELECTEDSUBNAV : array());
$items = array_merge($SELECTEDSUBNAV, $items);
$apps = false;
......@@ -246,7 +227,7 @@ class PluginAuthWebservice extends PluginAuth {
// activate webservices
foreach (array('soap', 'xmlrpc', 'rest', 'oauth') as $proto) {
set_config('webservice_'.$proto.'_enabled', 1);
set_config('webservice_' . $proto.'_enabled', 1);
}
}
}
......
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2011 Catalyst IT Ltd and others; see:
* http://wiki.mahara.org/Contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage auth-webservice
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006-2011 Catalyst IT Ltd http://catalyst.net.nz
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
*
*/
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2012031600;
$config->release = '1.0.0';
$config->version = 2014112800;
$config->release = '1.0.1';
$config->requires_config = 0;
$config->requires_parent = 0;
/**
* CSS rules for the webservice auth plugin
* Stylesheet for the webservice auth plugin.
*
* Copyright (C) 2011 Catalyst IT
* This file is distributed under the same terms as Mahara itself
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
*
* This file is licensed under the same terms as Mahara itself
*/
.webservicelogs-info {
max-width: 150px;
color: red;
max-width: 150px;
color: red;
}
tr#authorise_instructions_container th {
......@@ -19,7 +22,7 @@ th {
}
#pluginconfig table {
width: 100%;
width: 100%;
}
td.actions {
......@@ -40,13 +43,13 @@ div#verifier {
}
.arguments {
color: #EA33A6;
color: #EA33A6;
}
div.detaildescription {
margin: 0px;
margin: 0px;
border:solid 1px #DEDEDE;
background:#FFF1BC;
background:#FFF1BC;
color:#222222;
padding:4px;
}
......@@ -56,22 +59,21 @@ pre.detaildescription {
}
div.xmlrpcdescription {
margin: 0px;
margin: 0px;
border:solid 1px #DEDEDE;
background:#DFEEE7;
background:#DFEEE7;
color:#222222;
padding:4px;
}
div.restdescription {
margin: 0px;
margin: 0px;
border:solid 1px #DEDEDE;
background:#FEEBE5;
background:#FEEBE5;
color:#222222;
padding:4px;
}
span.response {
color: #EA33A6;
}
\ No newline at end of file
......@@ -11,7 +11,7 @@
<a href="{$WWWROOT}webservice/admin/search.php?f={$a}{if $search->l}&amp;l={$search->l}{/if}">{$a}</a>
</span>
{/foreach}
<br />
<br />
<label>{str tag="lastname"}:</label>
<span class="{if !$search->l} selected{/if} all">
<a href="{$WWWROOT}webservice/admin/search.php{if $search->f}?f={$search->f}{/if}">{str tag="All"}</a>
......
......@@ -4,8 +4,6 @@
<br/>
<br/>
{$form|safe}
{include file='footer.tpl'}
\ No newline at end of file
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2011 Catalyst IT Ltd and others; see:
* http://wiki.mahara.org/Contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage admin
* @subpackage auth-webservice
* @author Catalyst IT Ltd
* @author Piers Harding
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006-2011 Catalyst IT Ltd http://catalyst.net.nz
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
*
*/
define('INTERNAL', 1);
define('ADMIN', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
// define('MENUITEM', 'webservice/config');
define('MENUITEM', 'configextensions/pluginadminwebservices');
// define('SECTION_PLUGINTYPE', 'core');
// define('SECTION_PLUGINNAME', 'admin');
// define('SECTION_PAGE', 'webservice');
$path = get_config('docroot') . 'lib/zend';
set_include_path($path . PATH_SEPARATOR . get_include_path());
......
/**
* 'Speeds up' the user search if the user has javascript enabled in their
* browser
* @source: http://gitorious.org/mahara/mahara
*
* @licstart
* Copyright (C) 2006-2011 Catalyst IT Ltd
* @package mahara
* @subpackage auth-webservice
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
*
* The JavaScript code in this page is free software: you can
* redistribute it and/or modify it under the terms of the GNU
* General Public License (GNU GPL) as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version. The code is distributed WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
*
* As additional permission under GNU GPL version 3 section 7, you
* may distribute non-source (e.g., minimized or compacted) forms of
* that code without the copy of the GNU GPL normally required by
* section 4, provided you include this license notice and a URL
* through which recipients can access the Corresponding Source.
* @licend
*/
function UserSearch() {
......@@ -50,16 +38,19 @@ function UserSearch() {
if (initialtype == 'f') {
if (self.params.l) {
self.params = {'l' : self.params.l};
} else {
}
else {
self.params = {};
}
forEach(getElementsByTagAndClassName('span', 'selected', 'firstnamelist'), function (i) {
removeElementClass(i, 'selected');
});
} else if (initialtype == 'l') {
}
else if (initialtype == 'l') {
if (self.params.f) {
self.params = {'f' : self.params.f};
} else {
}
else {
self.params = {};
}
forEach(getElementsByTagAndClassName('span', 'selected', 'lastnamelist'), function (i) {
......
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2011 Catalyst IT Ltd and others; see:
* http://wiki.mahara.org/Contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage core
* @subpackage auth-webservice
* @author Catalyst IT Ltd
* @author Piers Harding
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006-2011 Catalyst IT Ltd http://catalyst.net.nz
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
*
*/
......@@ -55,7 +38,8 @@ if ($action == 'search') {
json_headers();
if (param_boolean('raw', false)) {
$data = get_log_search_results($params, $offset, $limit, $sortby, $sortdir);
} else {
}
else {
$data['data'] = build_webservice_log_search_results($params, $offset, $limit, $sortby, $sortdir);
}
$data['error'] = false;
......
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2011 Catalyst IT Ltd and others; see:
* http://wiki.mahara.org/Contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage admin
* @subpackage auth-webservice
* @author Catalyst IT Ltd
* @author Piers Harding
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006-2011 Catalyst IT Ltd http://catalyst.net.nz
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
*
*/
define('INTERNAL', 1);
define('ADMIN', 1);
define('MENUITEM', 'adminhome/pluginadminwebservices');
// define('MENUITEM', 'webservice/oauthconfig');
// define('SECTION_PLUGINTYPE', 'core');
// define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'oauth');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('oauthv1sregister', 'auth.webservice'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment