mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 20:50:21 +01:00
Merge branch 'master' into install_master
This commit is contained in:
commit
259211556e
admin
backup
blocks/completionstatus
blog
enrol
filter/mediaplugin/tests
grade/edit/tree
lang/en
lib
accesslib.php
adodb
adodb-active-record.inc.phpadodb-csvlib.inc.phpadodb-datadict.inc.phpadodb-error.inc.phpadodb-errorhandler.inc.phpadodb-errorpear.inc.phpadodb-exceptions.inc.phpadodb-iterator.inc.phpadodb-lib.inc.phpadodb-memcache.lib.inc.phpadodb-pager.inc.phpadodb-pear.inc.phpadodb-perf.inc.phpadodb-php4.inc.phpadodb.inc.php
drivers
adodb-access.inc.phpadodb-ado.inc.phpadodb-ado5.inc.phpadodb-ado_access.inc.phpadodb-ado_mssql.inc.phpadodb-borland_ibase.inc.phpadodb-csv.inc.phpadodb-db2.inc.phpadodb-db2oci.inc.phpadodb-db2ora.inc.phpadodb-fbsql.inc.phpadodb-firebird.inc.phpadodb-ibase.inc.phpadodb-informix.inc.phpadodb-informix72.inc.phpadodb-ldap.inc.phpadodb-mssql.inc.phpadodb-mssqlnative.inc.phpadodb-mssqlpo.inc.phpadodb-mysql.inc.phpadodb-mysqli.inc.phpadodb-mysqlpo.inc.phpadodb-mysqlt.inc.phpadodb-netezza.inc.phpadodb-oci8.inc.phpadodb-oci805.inc.phpadodb-oci8po.inc.phpadodb-odbc.inc.phpadodb-odbc_db2.inc.phpadodb-odbc_mssql.inc.phpadodb-odbc_oracle.inc.phpadodb-odbtp.inc.phpadodb-odbtp_unicode.inc.phpadodb-oracle.inc.phpadodb-pdo.inc.phpadodb-pdo_mssql.inc.phpadodb-pdo_mysql.inc.phpadodb-pdo_oci.inc.phpadodb-pdo_pgsql.inc.phpadodb-pdo_sqlite.inc.phpadodb-postgres.inc.phpadodb-postgres64.inc.phpadodb-postgres7.inc.phpadodb-postgres8.inc.phpadodb-proxy.inc.phpadodb-sapdb.inc.phpadodb-sqlanywhere.inc.phpadodb-sqlite.inc.phpadodb-sqlite3.inc.phpadodb-sqlitepo.inc.phpadodb-sybase.inc.phpadodb-sybase_ase.inc.phpadodb-vfp.inc.php
lang
@ -659,5 +659,121 @@
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
</PHP_SETTINGS>
|
||||
</MOODLE>
|
||||
</MOODLE>
|
||||
<MOODLE version="2.4" requires="2.2">
|
||||
<UNICODE level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unicoderequired" />
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mysql" version="5.1.33" />
|
||||
<VENDOR name="postgres" version="8.3" />
|
||||
<VENDOR name="mssql" version="9.0" />
|
||||
<VENDOR name="odbc_mssql" version="9.0" />
|
||||
<VENDOR name="mssql_n" version="9.0" />
|
||||
<VENDOR name="oracle" version="10.2" />
|
||||
<VENDOR name="sqlite" version="2.0" />
|
||||
</DATABASE>
|
||||
<PHP version="5.3.2" level="required">
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="pcreunicodewarning" />
|
||||
</FEEDBACK>
|
||||
</PCREUNICODE>
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="iconv" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="iconvrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="mbstring" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="mbstringrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="curl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="curlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="openssl" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="opensslrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="tokenizer" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="tokenizerrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xmlrpc" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="xmlrpcrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="soap" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="soaprecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="ctype" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ctyperequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="zip" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="ziprequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="gd" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="gdrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="dom" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xml" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="intl" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="intlrecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="json" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="hash" level="required"/>
|
||||
</PHP_EXTENSIONS>
|
||||
<PHP_SETTINGS>
|
||||
<PHP_SETTING name="memory_limit" value="40M" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="settingmemorylimit" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="safe_mode" value="0" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingsafemode" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="file_uploads" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingfileuploads" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
</PHP_SETTINGS>
|
||||
</MOODLE>
|
||||
</COMPATIBILITY_MATRIX>
|
||||
|
@ -96,14 +96,19 @@ class file_nested_element extends backup_nested_element {
|
||||
if (is_null($this->backupid)) {
|
||||
$this->backupid = $processor->get_var(backup::VAR_BACKUPID);
|
||||
}
|
||||
parent::process($processor);
|
||||
return parent::process($processor);
|
||||
}
|
||||
|
||||
public function fill_values($values) {
|
||||
// Fill values
|
||||
parent::fill_values($values);
|
||||
// Do our own tasks (copy file from moodle to backup)
|
||||
backup_file_manager::copy_file_moodle2backup($this->backupid, $values);
|
||||
try {
|
||||
backup_file_manager::copy_file_moodle2backup($this->backupid, $values);
|
||||
} catch (file_exception $e) {
|
||||
$this->add_result(array('missing_files_in_pool' => true));
|
||||
$this->add_log('missing file in pool: ' . $e->debuginfo, backup::LOG_WARNING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
17
backup/upgrade.txt
Normal file
17
backup/upgrade.txt
Normal file
@ -0,0 +1,17 @@
|
||||
This files describes API changes in /backup/*,
|
||||
information provided here is intended especially for developers.
|
||||
|
||||
=== 2.4 ===
|
||||
|
||||
* Since 2.3.1+ the backup file name schema has changed. The ID of the course will always be part of
|
||||
the filename regardless of the setting 'backup_shortname'. See MDL-33812.
|
||||
|
||||
=== 2.3 ===
|
||||
|
||||
* Since 2.3.1+ the backup file name schema has changed. The ID of the course will always be part of
|
||||
the filename regardless of the setting 'backup_shortname'. See MDL-33812.
|
||||
|
||||
=== 2.2 ===
|
||||
|
||||
* Since 2.2.4+ the backup file name schema has changed. The ID of the course will always be part of
|
||||
the filename regardless of the setting 'backup_shortname'. See MDL-33812.
|
@ -197,19 +197,19 @@ abstract class backup_plan_dbops extends backup_dbops {
|
||||
* @param int $courseid/$sectionid/$cmid
|
||||
* @param bool $users Should be true is users were included in the backup
|
||||
* @param bool $anonymised Should be true is user information was anonymized.
|
||||
* @param bool $useidasname true to use id, false to use strings (default)
|
||||
* @param bool $useidonly only use the ID in the file name
|
||||
* @return string The filename to use
|
||||
*/
|
||||
public static function get_default_backup_filename($format, $type, $id, $users, $anonymised, $useidasname = false) {
|
||||
public static function get_default_backup_filename($format, $type, $id, $users, $anonymised, $useidonly = false) {
|
||||
global $DB;
|
||||
|
||||
// Calculate backup word
|
||||
$backupword = str_replace(' ', '_', textlib::strtolower(get_string('backupfilename')));
|
||||
$backupword = trim(clean_filename($backupword), '_');
|
||||
|
||||
// Not $useidonly, lets fetch the name
|
||||
$shortname = '';
|
||||
// Not $useidasname, lets calculate it, else $id will be used
|
||||
if (!$useidasname) {
|
||||
if (!$useidonly) {
|
||||
// Calculate proper name element (based on type)
|
||||
switch ($type) {
|
||||
case backup::TYPE_1COURSE:
|
||||
@ -231,7 +231,11 @@ abstract class backup_plan_dbops extends backup_dbops {
|
||||
$shortname = textlib::strtolower(trim(clean_filename($shortname), '_'));
|
||||
}
|
||||
|
||||
$name = empty($shortname) ? $id : $shortname;
|
||||
// The name will always contain the ID, but we append the course short name if requested.
|
||||
$name = $id;
|
||||
if (!$useidonly && $shortname != '') {
|
||||
$name .= '-' . $shortname;
|
||||
}
|
||||
|
||||
// Calculate date
|
||||
$backupdateformat = str_replace(' ', '_', get_string('backupnameformat', 'langconfig'));
|
||||
|
@ -818,10 +818,13 @@ abstract class restore_dbops {
|
||||
* @param int|null $olditemid
|
||||
* @param int|null $forcenewcontextid explicit value for the new contextid (skip mapping)
|
||||
* @param bool $skipparentitemidctxmatch
|
||||
* @return array of result object
|
||||
*/
|
||||
public static function send_files_to_pool($basepath, $restoreid, $component, $filearea, $oldcontextid, $dfltuserid, $itemname = null, $olditemid = null, $forcenewcontextid = null, $skipparentitemidctxmatch = false) {
|
||||
global $DB;
|
||||
|
||||
$results = array();
|
||||
|
||||
if ($forcenewcontextid) {
|
||||
// Some components can have "forced" new contexts (example: questions can end belonging to non-standard context mappings,
|
||||
// with questions originally at system/coursecat context in source being restored to course context in target). So we need
|
||||
@ -901,8 +904,14 @@ abstract class restore_dbops {
|
||||
// this is a regular file, it must be present in the backup pool
|
||||
$backuppath = $basepath . backup_file_manager::get_backup_content_file_location($file->contenthash);
|
||||
|
||||
// The file is not found in the backup.
|
||||
if (!file_exists($backuppath)) {
|
||||
throw new restore_dbops_exception('file_not_found_in_pool', $file);
|
||||
$result = new stdClass();
|
||||
$result->code = 'file_missing_in_backup';
|
||||
$result->message = sprintf('missing file %s%s in backup', $file->filepath, $file->filename);
|
||||
$result->level = backup::LOG_WARNING;
|
||||
$results[] = $result;
|
||||
continue;
|
||||
}
|
||||
|
||||
// create the file in the filepool if it does not exist yet
|
||||
@ -959,6 +968,7 @@ abstract class restore_dbops {
|
||||
}
|
||||
}
|
||||
$rs->close();
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -46,6 +46,8 @@ abstract class backup_cron_automated_helper {
|
||||
const BACKUP_STATUS_UNFINISHED = 2;
|
||||
/** Course automated backup was skipped */
|
||||
const BACKUP_STATUS_SKIPPED = 3;
|
||||
/** Course automated backup had warnings */
|
||||
const BACKUP_STATUS_WARNING = 4;
|
||||
|
||||
/** Run if required by the schedule set in config. Default. **/
|
||||
const RUN_ON_SCHEDULE = 0;
|
||||
@ -139,7 +141,7 @@ abstract class backup_cron_automated_helper {
|
||||
$params = array('courseid' => $course->id, 'time' => $now-31*24*60*60, 'action' => '%view%');
|
||||
$logexists = $DB->record_exists_select('log', $sqlwhere, $params);
|
||||
if (!$logexists) {
|
||||
$backupcourse->laststatus = backup_cron_automated_helper::BACKUP_STATUS_SKIPPED;
|
||||
$backupcourse->laststatus = self::BACKUP_STATUS_SKIPPED;
|
||||
$backupcourse->nextstarttime = $nextstarttime;
|
||||
$DB->update_record('backup_courses', $backupcourse);
|
||||
mtrace('Skipping unchanged course '.$course->fullname);
|
||||
@ -160,7 +162,7 @@ abstract class backup_cron_automated_helper {
|
||||
$starttime = time();
|
||||
|
||||
$backupcourse->laststarttime = time();
|
||||
$backupcourse->laststatus = backup_cron_automated_helper::BACKUP_STATUS_UNFINISHED;
|
||||
$backupcourse->laststatus = self::BACKUP_STATUS_UNFINISHED;
|
||||
$DB->update_record('backup_courses', $backupcourse);
|
||||
|
||||
$backupcourse->laststatus = backup_cron_automated_helper::launch_automated_backup($course, $backupcourse->laststarttime, $admin->id);
|
||||
@ -169,7 +171,7 @@ abstract class backup_cron_automated_helper {
|
||||
|
||||
$DB->update_record('backup_courses', $backupcourse);
|
||||
|
||||
if ($backupcourse->laststatus) {
|
||||
if ($backupcourse->laststatus === self::BACKUP_STATUS_OK) {
|
||||
// Clean up any excess course backups now that we have
|
||||
// taken a successful backup.
|
||||
$removedcount = backup_cron_automated_helper::remove_excess_backups($course);
|
||||
@ -188,17 +190,18 @@ abstract class backup_cron_automated_helper {
|
||||
$message = "";
|
||||
|
||||
$count = backup_cron_automated_helper::get_backup_status_array();
|
||||
$haserrors = ($count[backup_cron_automated_helper::BACKUP_STATUS_ERROR] != 0 || $count[backup_cron_automated_helper::BACKUP_STATUS_UNFINISHED] != 0);
|
||||
$haserrors = ($count[self::BACKUP_STATUS_ERROR] != 0 || $count[self::BACKUP_STATUS_UNFINISHED] != 0);
|
||||
|
||||
//Build the message text
|
||||
//Summary
|
||||
$message .= get_string('summary')."\n";
|
||||
$message .= "==================================================\n";
|
||||
$message .= " ".get_string('courses').": ".array_sum($count)."\n";
|
||||
$message .= " ".get_string('ok').": ".$count[backup_cron_automated_helper::BACKUP_STATUS_OK]."\n";
|
||||
$message .= " ".get_string('skipped').": ".$count[backup_cron_automated_helper::BACKUP_STATUS_SKIPPED]."\n";
|
||||
$message .= " ".get_string('error').": ".$count[backup_cron_automated_helper::BACKUP_STATUS_ERROR]."\n";
|
||||
$message .= " ".get_string('unfinished').": ".$count[backup_cron_automated_helper::BACKUP_STATUS_UNFINISHED]."\n\n";
|
||||
$message .= " ".get_string('ok').": ".$count[self::BACKUP_STATUS_OK]."\n";
|
||||
$message .= " ".get_string('skipped').": ".$count[self::BACKUP_STATUS_SKIPPED]."\n";
|
||||
$message .= " ".get_string('error').": ".$count[self::BACKUP_STATUS_ERROR]."\n";
|
||||
$message .= " ".get_string('unfinished').": ".$count[self::BACKUP_STATUS_UNFINISHED]."\n";
|
||||
$message .= " ".get_string('warning').": ".$count[self::BACKUP_STATUS_WARNING]."\n\n";
|
||||
|
||||
//Reference
|
||||
if ($haserrors) {
|
||||
@ -261,6 +264,7 @@ abstract class backup_cron_automated_helper {
|
||||
self::BACKUP_STATUS_OK => 0,
|
||||
self::BACKUP_STATUS_UNFINISHED => 0,
|
||||
self::BACKUP_STATUS_SKIPPED => 0,
|
||||
self::BACKUP_STATUS_WARNING => 0
|
||||
);
|
||||
|
||||
$statuses = $DB->get_records_sql('SELECT DISTINCT bc.laststatus, COUNT(bc.courseid) AS statuscount FROM {backup_courses} bc GROUP BY bc.laststatus');
|
||||
@ -334,7 +338,7 @@ abstract class backup_cron_automated_helper {
|
||||
*/
|
||||
public static function launch_automated_backup($course, $starttime, $userid) {
|
||||
|
||||
$outcome = true;
|
||||
$outcome = self::BACKUP_STATUS_OK;
|
||||
$config = get_config('backup');
|
||||
$bc = new backup_controller(backup::TYPE_1COURSE, $course->id, backup::FORMAT_MOODLE, backup::INTERACTIVE_NO, backup::MODE_AUTOMATED, $userid);
|
||||
|
||||
@ -369,6 +373,7 @@ abstract class backup_cron_automated_helper {
|
||||
|
||||
$bc->execute_plan();
|
||||
$results = $bc->get_results();
|
||||
$outcome = self::outcome_from_results($results);
|
||||
$file = $results['backup_destination']; // may be empty if file already moved to target location
|
||||
$dir = $config->backup_auto_destination;
|
||||
$storage = (int)$config->backup_auto_storage;
|
||||
@ -377,8 +382,10 @@ abstract class backup_cron_automated_helper {
|
||||
}
|
||||
if ($file && !empty($dir) && $storage !== 0) {
|
||||
$filename = backup_plan_dbops::get_default_backup_filename($format, $type, $course->id, $users, $anonymised, !$config->backup_shortname);
|
||||
$outcome = $file->copy_content_to($dir.'/'.$filename);
|
||||
if ($outcome && $storage === 1) {
|
||||
if (!$file->copy_content_to($dir.'/'.$filename)) {
|
||||
$outcome = self::BACKUP_STATUS_ERROR;
|
||||
}
|
||||
if ($outcome != self::BACKUP_STATUS_ERROR && $storage === 1) {
|
||||
$file->delete();
|
||||
}
|
||||
}
|
||||
@ -387,7 +394,7 @@ abstract class backup_cron_automated_helper {
|
||||
$bc->log('backup_auto_failed_on_course', backup::LOG_ERROR, $course->shortname); // Log error header.
|
||||
$bc->log('Exception: ' . $e->errorcode, backup::LOG_ERROR, $e->a, 1); // Log original exception problem.
|
||||
$bc->log('Debug: ' . $e->debuginfo, backup::LOG_DEBUG, null, 1); // Log original debug information.
|
||||
$outcome = false;
|
||||
$outcome = self::BACKUP_STATUS_ERROR;
|
||||
}
|
||||
|
||||
$bc->destroy();
|
||||
@ -396,6 +403,30 @@ abstract class backup_cron_automated_helper {
|
||||
return $outcome;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the backup outcome by analysing its results.
|
||||
*
|
||||
* @param array $results returned by a backup
|
||||
* @return int {@link self::BACKUP_STATUS_OK} and other constants
|
||||
*/
|
||||
public static function outcome_from_results($results) {
|
||||
$outcome = self::BACKUP_STATUS_OK;
|
||||
foreach ($results as $code => $value) {
|
||||
// Each possible error and warning code has to be specified in this switch
|
||||
// which basically analyses the results to return the correct backup status.
|
||||
switch ($code) {
|
||||
case 'missing_files_in_pool':
|
||||
$outcome = self::BACKUP_STATUS_WARNING;
|
||||
break;
|
||||
}
|
||||
// If we found the highest error level, we exit the loop.
|
||||
if ($outcome == self::BACKUP_STATUS_ERROR) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $outcome;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes deleted courses fromn the backup_courses table so that we don't
|
||||
* waste time backing them up.
|
||||
@ -530,18 +561,7 @@ abstract class backup_cron_automated_helper {
|
||||
if (!empty($dir) && ($storage == 1 || $storage == 2)) {
|
||||
// Calculate backup filename regex, ignoring the date/time/info parts that can be
|
||||
// variable, depending of languages, formats and automated backup settings
|
||||
|
||||
|
||||
// MDL-33531: use different filenames depending on backup_shortname option
|
||||
if ( !empty($config->backup_shortname) ) {
|
||||
$context = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
$courseref = format_string($course->shortname, true, array('context' => $context));
|
||||
$courseref = str_replace(' ', '_', $courseref);
|
||||
$courseref = textlib::strtolower(trim(clean_filename($courseref), '_'));
|
||||
} else {
|
||||
$courseref = $course->id;
|
||||
}
|
||||
$filename = $backupword . '-' . backup::FORMAT_MOODLE . '-' . backup::TYPE_1COURSE . '-' .$courseref . '-';
|
||||
$filename = $backupword . '-' . backup::FORMAT_MOODLE . '-' . backup::TYPE_1COURSE . '-' .$course->id . '-';
|
||||
$regex = '#^'.preg_quote($filename, '#').'.*\.mbz$#';
|
||||
|
||||
// Store all the matching files into fullpath => timemodified array
|
||||
|
@ -94,11 +94,22 @@ abstract class backup_structure_step extends backup_step {
|
||||
// Process structure definition
|
||||
$structure->process($pr);
|
||||
|
||||
// Get the results from the nested elements
|
||||
$results = $structure->get_results();
|
||||
|
||||
// Get the log messages to append to the log
|
||||
$logs = $structure->get_logs();
|
||||
foreach ($logs as $log) {
|
||||
$this->log($log->message, $log->level, $log->a, $log->depth, $log->display);
|
||||
}
|
||||
|
||||
// Close everything
|
||||
$xw->stop();
|
||||
|
||||
// Destroy the structure. It helps PHP 5.2 memory a lot!
|
||||
$structure->destroy();
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -218,8 +218,14 @@ abstract class restore_structure_step extends restore_step {
|
||||
*/
|
||||
public function add_related_files($component, $filearea, $mappingitemname, $filesctxid = null, $olditemid = null) {
|
||||
$filesctxid = is_null($filesctxid) ? $this->task->get_old_contextid() : $filesctxid;
|
||||
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), $component,
|
||||
$filearea, $filesctxid, $this->task->get_userid(), $mappingitemname, $olditemid);
|
||||
$results = restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), $component,
|
||||
$filearea, $filesctxid, $this->task->get_userid(), $mappingitemname, $olditemid);
|
||||
$resultstoadd = array();
|
||||
foreach ($results as $result) {
|
||||
$this->log($result->message, $result->level);
|
||||
$resultstoadd[$result->code] = true;
|
||||
}
|
||||
$this->task->add_result($resultstoadd);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -37,6 +37,8 @@ class backup_nested_element extends base_nested_element implements processable {
|
||||
protected $aliases; // Define DB->final element aliases
|
||||
protected $fileannotations; // array of file areas to be searched by file annotations
|
||||
protected $counter; // Number of instances of this element that have been processed
|
||||
protected $results; // Logs the results we encounter during the process.
|
||||
protected $logs; // Some log messages that could be retrieved later.
|
||||
|
||||
/**
|
||||
* Constructor - instantiates one backup_nested_element, specifying its basic info.
|
||||
@ -55,8 +57,16 @@ class backup_nested_element extends base_nested_element implements processable {
|
||||
$this->aliases = array();
|
||||
$this->fileannotations = array();
|
||||
$this->counter = 0;
|
||||
$this->results = array();
|
||||
$this->logs = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the nested element
|
||||
*
|
||||
* @param object $processor the processor
|
||||
* @return void
|
||||
*/
|
||||
public function process($processor) {
|
||||
if (!$processor instanceof base_processor) { // No correct processor, throw exception
|
||||
throw new base_element_struct_exception('incorrect_processor');
|
||||
@ -113,6 +123,69 @@ class backup_nested_element extends base_nested_element implements processable {
|
||||
$iterator->close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves a log message to an array
|
||||
*
|
||||
* @see backup_helper::log()
|
||||
* @param string $message to add to the logs
|
||||
* @param int $level level of importance {@link backup::LOG_DEBUG} and other constants
|
||||
* @param mixed $a to be included in $message
|
||||
* @param int $depth of the message
|
||||
* @param display $bool supporting translation via get_string() if true
|
||||
* @return void
|
||||
*/
|
||||
protected function add_log($message, $level, $a = null, $depth = null, $display = false) {
|
||||
// Adding the result to the oldest parent.
|
||||
if ($this->get_parent()) {
|
||||
$parent = $this->get_grandparent();
|
||||
$parent->add_log($message, $level, $a, $depth, $display);
|
||||
} else {
|
||||
$log = new stdClass();
|
||||
$log->message = $message;
|
||||
$log->level = $level;
|
||||
$log->a = $a;
|
||||
$log->depth = $depth;
|
||||
$log->display = $display;
|
||||
$this->logs[] = $log;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the results to an array
|
||||
*
|
||||
* @param array $result associative array
|
||||
* @return void
|
||||
*/
|
||||
protected function add_result($result) {
|
||||
if (is_array($result)) {
|
||||
// Adding the result to the oldest parent.
|
||||
if ($this->get_parent()) {
|
||||
$parent = $this->get_grandparent();
|
||||
$parent->add_result($result);
|
||||
} else {
|
||||
$this->results = array_merge($this->results, $result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the logs
|
||||
*
|
||||
* @return array of log objects
|
||||
*/
|
||||
public function get_logs() {
|
||||
return $this->logs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the results
|
||||
*
|
||||
* @return associative array of results
|
||||
*/
|
||||
public function get_results() {
|
||||
return $this->results;
|
||||
}
|
||||
|
||||
public function set_source_array($arr) {
|
||||
// TODO: Only elements having final elements can set source
|
||||
$this->var_array = $arr;
|
||||
|
@ -487,6 +487,9 @@ class backup_ui_stage_complete extends backup_ui_stage_final {
|
||||
if (!empty($this->results['include_file_references_to_external_content'])) {
|
||||
$output .= $renderer->notification(get_string('filereferencesincluded', 'backup'), 'notifyproblem');
|
||||
}
|
||||
if (!empty($this->results['missing_files_in_pool'])) {
|
||||
$output .= $renderer->notification(get_string('missingfilesinpool', 'backup'), 'notifyproblem');
|
||||
}
|
||||
$output .= $renderer->notification(get_string('executionsuccess', 'backup'), 'notifysuccess');
|
||||
$output .= $renderer->continue_button($restorerul);
|
||||
$output .= $renderer->box_end();
|
||||
|
@ -772,6 +772,9 @@ class restore_ui_stage_complete extends restore_ui_stage_process {
|
||||
$html .= $renderer->box_end();
|
||||
}
|
||||
$html .= $renderer->box_start();
|
||||
if (array_key_exists('file_missing_in_backup', $this->results)) {
|
||||
$html .= $renderer->notification(get_string('restorefileweremissing', 'backup'), 'notifyproblem');
|
||||
}
|
||||
$html .= $renderer->notification(get_string('restoreexecutionsuccess', 'backup'), 'notifysuccess');
|
||||
$html .= $renderer->continue_button(new moodle_url('/course/view.php', array(
|
||||
'id' => $this->get_ui()->get_controller()->get_courseid())), 'get');
|
||||
|
@ -19,15 +19,14 @@
|
||||
*
|
||||
* @package block
|
||||
* @subpackage completion
|
||||
* @copyright 2009 Catalyst IT Ltd
|
||||
* @copyright 2009-2012 Catalyst IT Ltd
|
||||
* @author Aaron Barnes <aaronb@catalyst.net.nz>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
require_once($CFG->libdir.'/completionlib.php');
|
||||
require_once("{$CFG->libdir}/completionlib.php");
|
||||
|
||||
/**
|
||||
* Course completion status
|
||||
@ -36,25 +35,28 @@ require_once($CFG->libdir.'/completionlib.php');
|
||||
class block_completionstatus extends block_base {
|
||||
|
||||
public function init() {
|
||||
$this->title = get_string('pluginname', 'block_completionstatus');
|
||||
$this->title = get_string('pluginname', 'block_completionstatus');
|
||||
}
|
||||
|
||||
public function get_content() {
|
||||
global $USER, $CFG, $DB, $COURSE;
|
||||
global $USER;
|
||||
|
||||
// If content is cached
|
||||
if ($this->content !== NULL) {
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
$course = $this->page->course;
|
||||
$context = context_course::instance($course->id);
|
||||
|
||||
// Create empty content
|
||||
$this->content = new stdClass;
|
||||
$this->content = new stdClass();
|
||||
|
||||
// Can edit settings?
|
||||
$can_edit = has_capability('moodle/course:update', context_course::instance($this->page->course->id));
|
||||
$can_edit = has_capability('moodle/course:update', $context);
|
||||
|
||||
// Get course completion data
|
||||
$info = new completion_info($this->page->course);
|
||||
$info = new completion_info($course);
|
||||
|
||||
// Don't display if completion isn't enabled!
|
||||
if (!completion_info::is_enabled_for_site()) {
|
||||
@ -84,9 +86,9 @@ class block_completionstatus extends block_base {
|
||||
// Check this user is enroled
|
||||
if (!$info->is_tracked_user($USER->id)) {
|
||||
// If not enrolled, but are can view the report:
|
||||
if (has_capability('report/completion:view', context_course::instance($COURSE->id))) {
|
||||
$this->content->text = '<a href="'.$CFG->wwwroot.'/report/completion/index.php?course='.$COURSE->id.
|
||||
'">'.get_string('viewcoursereport', 'completion').'</a>';
|
||||
if (has_capability('report/completion:view', $context)) {
|
||||
$report = new moodle_url('/report/completion/index.php', array('course' => $course->id));
|
||||
$this->content->text = '<a href="'.$report->out().'">'.get_string('viewcoursereport', 'completion').'</a>';
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
@ -187,7 +189,7 @@ class block_completionstatus extends block_base {
|
||||
// Load course completion
|
||||
$params = array(
|
||||
'userid' => $USER->id,
|
||||
'course' => $COURSE->id
|
||||
'course' => $course->id
|
||||
);
|
||||
$ccompletion = new completion_completion($params);
|
||||
|
||||
@ -221,7 +223,8 @@ class block_completionstatus extends block_base {
|
||||
$this->content->text .= $shtml.'</tbody></table>';
|
||||
|
||||
// Display link to detailed view
|
||||
$this->content->footer = '<br><a href="'.$CFG->wwwroot.'/blocks/completionstatus/details.php?course='.$COURSE->id.'">'.get_string('moredetails', 'completion').'</a>';
|
||||
$details = new moodle_url('/blocks/completionstatus/details.php', array('course' => $course->id));
|
||||
$this->content->footer = '<br><a href="'.$details->out().'">'.get_string('moredetails', 'completion').'</a>';
|
||||
|
||||
return $this->content;
|
||||
}
|
||||
|
@ -19,27 +19,23 @@
|
||||
*
|
||||
* @package block
|
||||
* @subpackage completion
|
||||
* @copyright 2009 Catalyst IT Ltd
|
||||
* @copyright 2009-2012 Catalyst IT Ltd
|
||||
* @author Aaron Barnes <aaronb@catalyst.net.nz>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
require_once('../../config.php');
|
||||
require_once($CFG->libdir.'/completionlib.php');
|
||||
|
||||
|
||||
// TODO: Make this page Moodle 2.0 compliant
|
||||
require_once(dirname(__FILE__).'/../../config.php');
|
||||
require_once("{$CFG->libdir}/completionlib.php");
|
||||
|
||||
|
||||
///
|
||||
/// Load data
|
||||
///
|
||||
$id = required_param('course', PARAM_INT);
|
||||
// User id
|
||||
$userid = optional_param('user', 0, PARAM_INT);
|
||||
|
||||
// Load course
|
||||
$course = $DB->get_record('course', array('id' => $id));
|
||||
$course = $DB->get_record('course', array('id' => $id), '*', MUST_EXIST);
|
||||
|
||||
// Load user
|
||||
if ($userid) {
|
||||
@ -76,21 +72,13 @@ if (!$can_view) {
|
||||
// Load completion data
|
||||
$info = new completion_info($course);
|
||||
|
||||
$returnurl = "{$CFG->wwwroot}/course/view.php?id={$id}";
|
||||
$returnurl = new moodle_url('/course/view.php', array('id' => $id));
|
||||
|
||||
// Don't display if completion isn't enabled!
|
||||
if (!$info->is_enabled()) {
|
||||
print_error('completionnotenabled', 'completion', $returnurl);
|
||||
}
|
||||
|
||||
// Load criteria to display
|
||||
$completions = $info->get_completions($user->id);
|
||||
|
||||
// Check if this course has any criteria
|
||||
if (empty($completions)) {
|
||||
print_error('nocriteriaset', 'completion', $returnurl);
|
||||
}
|
||||
|
||||
// Check this user is enroled
|
||||
if (!$info->is_tracked_user($user->id)) {
|
||||
if ($USER->id == $user->id) {
|
||||
@ -104,6 +92,7 @@ if (!$info->is_tracked_user($user->id)) {
|
||||
///
|
||||
/// Display page
|
||||
///
|
||||
$PAGE->set_context(context_course::instance($course->id));
|
||||
|
||||
// Print header
|
||||
$page = get_string('completionprogressdetails', 'block_completionstatus');
|
||||
@ -111,7 +100,7 @@ $title = format_string($course->fullname) . ': ' . $page;
|
||||
|
||||
$PAGE->navbar->add($page);
|
||||
$PAGE->set_pagelayout('standard');
|
||||
$PAGE->set_url('/blocks/completionstatus/details.php', array('course' => $course->id));
|
||||
$PAGE->set_url('/blocks/completionstatus/details.php', array('course' => $course->id, 'user' => $user->id));
|
||||
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
|
||||
$PAGE->set_heading($title);
|
||||
echo $OUTPUT->header();
|
||||
@ -135,122 +124,148 @@ $coursecomplete = $info->is_course_complete($user->id);
|
||||
// Has this user completed any criteria?
|
||||
$criteriacomplete = $info->count_course_user_data($user->id);
|
||||
|
||||
// Load course completion
|
||||
$params = array(
|
||||
'userid' => $user->id,
|
||||
'course' => $course->id,
|
||||
);
|
||||
$ccompletion = new completion_completion($params);
|
||||
|
||||
if ($coursecomplete) {
|
||||
echo get_string('complete');
|
||||
} else if (!$criteriacomplete) {
|
||||
} else if (!$criteriacomplete && !$ccompletion->timestarted) {
|
||||
echo '<i>'.get_string('notyetstarted', 'completion').'</i>';
|
||||
} else {
|
||||
echo '<i>'.get_string('inprogress','completion').'</i>';
|
||||
}
|
||||
|
||||
echo '</td></tr>';
|
||||
echo '<tr><td colspan="2"><b>'.get_string('required').':</b> ';
|
||||
|
||||
// Get overall aggregation method
|
||||
$overall = $info->get_aggregation_method();
|
||||
// Load criteria to display
|
||||
$completions = $info->get_completions($user->id);
|
||||
|
||||
if ($overall == COMPLETION_AGGREGATION_ALL) {
|
||||
echo get_string('criteriarequiredall', 'completion');
|
||||
// Check if this course has any criteria
|
||||
if (empty($completions)) {
|
||||
echo '<tr><td colspan="2"><br />';
|
||||
echo $OUTPUT->box(get_string('err_nocriteria', 'completion'), 'noticebox');
|
||||
echo '</td></tr></tbody></table>';
|
||||
} else {
|
||||
echo get_string('criteriarequiredany', 'completion');
|
||||
}
|
||||
echo '<tr><td colspan="2"><b>'.get_string('required').':</b> ';
|
||||
|
||||
echo '</td></tr></tbody></table>';
|
||||
// Get overall aggregation method
|
||||
$overall = $info->get_aggregation_method();
|
||||
|
||||
// Generate markup for criteria statuses
|
||||
echo '<table class="generalbox boxaligncenter" cellpadding="3"><tbody>';
|
||||
echo '<tr class="ccheader">';
|
||||
echo '<th class="c0 header" scope="col">'.get_string('criteriagroup', 'block_completionstatus').'</th>';
|
||||
echo '<th class="c1 header" scope="col">'.get_string('criteria', 'completion').'</th>';
|
||||
echo '<th class="c2 header" scope="col">'.get_string('requirement', 'block_completionstatus').'</th>';
|
||||
echo '<th class="c3 header" scope="col">'.get_string('status').'</th>';
|
||||
echo '<th class="c4 header" scope="col">'.get_string('complete').'</th>';
|
||||
echo '<th class="c5 header" scope="col">'.get_string('completiondate', 'report_completion').'</th>';
|
||||
echo '</tr>';
|
||||
|
||||
// Save row data
|
||||
$rows = array();
|
||||
|
||||
global $COMPLETION_CRITERIA_TYPES;
|
||||
|
||||
// Loop through course criteria
|
||||
foreach ($completions as $completion) {
|
||||
$criteria = $completion->get_criteria();
|
||||
$complete = $completion->is_complete();
|
||||
|
||||
$row = array();
|
||||
$row['type'] = $criteria->criteriatype;
|
||||
$row['title'] = $criteria->get_title();
|
||||
$row['status'] = $completion->get_status();
|
||||
$row['timecompleted'] = $completion->timecompleted;
|
||||
$row['details'] = $criteria->get_details($completion);
|
||||
$rows[] = $row;
|
||||
}
|
||||
|
||||
// Print table
|
||||
$last_type = '';
|
||||
$agg_type = false;
|
||||
|
||||
foreach ($rows as $row) {
|
||||
|
||||
// Criteria group
|
||||
echo '<td class="c0">';
|
||||
if ($last_type !== $row['details']['type']) {
|
||||
$last_type = $row['details']['type'];
|
||||
echo $last_type;
|
||||
|
||||
// Reset agg type
|
||||
$agg_type = true;
|
||||
if ($overall == COMPLETION_AGGREGATION_ALL) {
|
||||
echo get_string('criteriarequiredall', 'completion');
|
||||
} else {
|
||||
// Display aggregation type
|
||||
if ($agg_type) {
|
||||
$agg = $info->get_aggregation_method($row['type']);
|
||||
|
||||
echo '(<i>';
|
||||
|
||||
if ($agg == COMPLETION_AGGREGATION_ALL) {
|
||||
echo strtolower(get_string('all', 'completion'));
|
||||
} else {
|
||||
echo strtolower(get_string('any', 'completion'));
|
||||
}
|
||||
|
||||
echo '</i> '.strtolower(get_string('required')).')';
|
||||
$agg_type = false;
|
||||
}
|
||||
echo get_string('criteriarequiredany', 'completion');
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
// Criteria title
|
||||
echo '<td class="c1">';
|
||||
echo $row['details']['criteria'];
|
||||
echo '</td>';
|
||||
echo '</td></tr></tbody></table>';
|
||||
|
||||
// Requirement
|
||||
echo '<td class="c2">';
|
||||
echo $row['details']['requirement'];
|
||||
echo '</td>';
|
||||
|
||||
// Status
|
||||
echo '<td class="c3">';
|
||||
echo $row['details']['status'];
|
||||
echo '</td>';
|
||||
|
||||
// Is complete
|
||||
echo '<td class="c4">';
|
||||
echo ($row['status'] === get_string('yes')) ? get_string('yes') : get_string('no');
|
||||
echo '</td>';
|
||||
|
||||
// Completion data
|
||||
echo '<td class="c5">';
|
||||
if ($row['timecompleted']) {
|
||||
echo userdate($row['timecompleted'], '%e %B %G');
|
||||
} else {
|
||||
echo '-';
|
||||
}
|
||||
echo '</td>';
|
||||
// Generate markup for criteria statuses
|
||||
echo '<table class="generalbox logtable boxaligncenter" id="criteriastatus" width="100%"><tbody>';
|
||||
echo '<tr class="ccheader">';
|
||||
echo '<th class="c0 header" scope="col">'.get_string('criteriagroup', 'block_completionstatus').'</th>';
|
||||
echo '<th class="c1 header" scope="col">'.get_string('criteria', 'completion').'</th>';
|
||||
echo '<th class="c2 header" scope="col">'.get_string('requirement', 'block_completionstatus').'</th>';
|
||||
echo '<th class="c3 header" scope="col">'.get_string('status').'</th>';
|
||||
echo '<th class="c4 header" scope="col">'.get_string('complete').'</th>';
|
||||
echo '<th class="c5 header" scope="col">'.get_string('completiondate', 'report_completion').'</th>';
|
||||
echo '</tr>';
|
||||
|
||||
// Save row data
|
||||
$rows = array();
|
||||
|
||||
// Loop through course criteria
|
||||
foreach ($completions as $completion) {
|
||||
$criteria = $completion->get_criteria();
|
||||
|
||||
$row = array();
|
||||
$row['type'] = $criteria->criteriatype;
|
||||
$row['title'] = $criteria->get_title();
|
||||
$row['status'] = $completion->get_status();
|
||||
$row['complete'] = $completion->is_complete();
|
||||
$row['timecompleted'] = $completion->timecompleted;
|
||||
$row['details'] = $criteria->get_details($completion);
|
||||
$rows[] = $row;
|
||||
}
|
||||
|
||||
// Print table
|
||||
$last_type = '';
|
||||
$agg_type = false;
|
||||
$oddeven = 0;
|
||||
|
||||
foreach ($rows as $row) {
|
||||
|
||||
echo '<tr class="r' . $oddeven . '">';
|
||||
|
||||
// Criteria group
|
||||
echo '<td class="cell c0">';
|
||||
if ($last_type !== $row['details']['type']) {
|
||||
$last_type = $row['details']['type'];
|
||||
echo $last_type;
|
||||
|
||||
// Reset agg type
|
||||
$agg_type = true;
|
||||
} else {
|
||||
// Display aggregation type
|
||||
if ($agg_type) {
|
||||
$agg = $info->get_aggregation_method($row['type']);
|
||||
|
||||
echo '(<i>';
|
||||
|
||||
if ($agg == COMPLETION_AGGREGATION_ALL) {
|
||||
echo strtolower(get_string('aggregateall', 'completion'));
|
||||
} else {
|
||||
echo strtolower(get_string('aggregateany', 'completion'));
|
||||
}
|
||||
|
||||
echo '</i> '.strtolower(get_string('required')).')';
|
||||
$agg_type = false;
|
||||
}
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
// Criteria title
|
||||
echo '<td class="cell c1">';
|
||||
echo $row['details']['criteria'];
|
||||
echo '</td>';
|
||||
|
||||
// Requirement
|
||||
echo '<td class="cell c2">';
|
||||
echo $row['details']['requirement'];
|
||||
echo '</td>';
|
||||
|
||||
// Status
|
||||
echo '<td class="cell c3">';
|
||||
echo $row['details']['status'];
|
||||
echo '</td>';
|
||||
|
||||
// Is complete
|
||||
echo '<td class="cell c4">';
|
||||
echo $row['complete'] ? get_string('yes') : get_string('no');
|
||||
echo '</td>';
|
||||
|
||||
// Completion data
|
||||
echo '<td class="cell c5">';
|
||||
if ($row['timecompleted']) {
|
||||
echo userdate($row['timecompleted'], get_string('strftimedate', 'langconfig'));
|
||||
} else {
|
||||
echo '-';
|
||||
}
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
// for row striping
|
||||
$oddeven = $oddeven ? 0 : 1;
|
||||
}
|
||||
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
|
||||
echo '</tbody></table>';
|
||||
echo '<div class="buttons">';
|
||||
$courseurl = new moodle_url("/course/view.php", array('id' => $course->id));
|
||||
echo $OUTPUT->single_button($courseurl, get_string('returntocourse', 'block_completionstatus'), 'get');
|
||||
echo '</div>';
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -5,3 +5,4 @@ $string['criteriagroup'] = 'Criteria group';
|
||||
$string['firstofsecond'] = '{$a->first} of {$a->second}';
|
||||
$string['pluginname'] = 'Course completion status';
|
||||
$string['requirement'] = 'Requirement';
|
||||
$string['returntocourse'] = 'Return to course';
|
||||
|
@ -44,7 +44,16 @@ $message = null;
|
||||
if ($delete && confirm_sesskey()) {
|
||||
$externalbloguserid = $DB->get_field('blog_external', 'userid', array('id' => $delete));
|
||||
if ($externalbloguserid == $USER->id) {
|
||||
// Delete the external blog
|
||||
$DB->delete_records('blog_external', array('id' => $delete));
|
||||
|
||||
// Delete the external blog's posts
|
||||
$deletewhere = 'module = :module
|
||||
AND userid = :userid
|
||||
AND ' . $DB->sql_isnotempty('post', 'uniquehash', false, false) . '
|
||||
AND ' . $DB->sql_compare_text('content') . ' = ' . $DB->sql_compare_text(':delete');
|
||||
$DB->delete_records_select('post', $deletewhere, array('module' => 'blog_external', 'userid' => $USER->id, 'delete' => $delete));
|
||||
|
||||
$message = get_string('externalblogdeleted', 'blog');
|
||||
}
|
||||
}
|
||||
|
@ -292,11 +292,10 @@ class blog_entry implements renderable {
|
||||
* @return void
|
||||
*/
|
||||
public function delete() {
|
||||
global $DB, $USER;
|
||||
|
||||
$returnurl = '';
|
||||
global $DB;
|
||||
|
||||
$this->delete_attachments();
|
||||
$this->remove_associations();
|
||||
|
||||
$DB->delete_records('post', array('id' => $this->id));
|
||||
tag_set('post', $this->id, array());
|
||||
|
@ -339,7 +339,7 @@ YUI.add('moodle-enrol_manual-quickenrolment', function(Y) {
|
||||
count++;
|
||||
var user = result.response.users[i];
|
||||
users.append(create('<div class="'+CSS.USER+' clearfix" rel="'+user.id+'"></div>')
|
||||
.addClass((i%2)?CSS.ODD:CSS.EVEN)
|
||||
.addClass((count%2)?CSS.ODD:CSS.EVEN)
|
||||
.append(create('<div class="'+CSS.COUNT+'">'+count+'</div>'))
|
||||
.append(create('<div class="'+CSS.PICTURE+'"></div>')
|
||||
.append(create(user.picture)))
|
||||
|
@ -34,6 +34,7 @@ require("../../config.php");
|
||||
require_once("lib.php");
|
||||
require_once($CFG->libdir.'/eventslib.php');
|
||||
require_once($CFG->libdir.'/enrollib.php');
|
||||
require_once($CFG->libdir . '/filelib.php');
|
||||
|
||||
|
||||
/// Keep out casual intruders
|
||||
@ -89,14 +90,17 @@ if (! $plugin_instance = $DB->get_record("enrol", array("id"=>$data->instanceid,
|
||||
$plugin = enrol_get_plugin('paypal');
|
||||
|
||||
/// Open a connection back to PayPal to validate the data
|
||||
$header = '';
|
||||
$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
|
||||
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
|
||||
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
|
||||
$c = new curl();
|
||||
$options = array(
|
||||
'returntransfer' => true,
|
||||
'httpheader' => array('application/x-www-form-urlencoded'),
|
||||
'timeout' => 30,
|
||||
);
|
||||
$paypaladdr = empty($CFG->usepaypalsandbox) ? 'www.paypal.com' : 'www.sandbox.paypal.com';
|
||||
$fp = fsockopen ($paypaladdr, 80, $errno, $errstr, 30);
|
||||
$location = "https://$paypaladdr/cgi-bin/webscr";
|
||||
$result = $c->post($location, $req, $options);
|
||||
|
||||
if (!$fp) { /// Could not open a socket to PayPal - FAIL
|
||||
if (!$result) { /// Could not connect to PayPal - FAIL
|
||||
echo "<p>Error: could not access paypal.com</p>";
|
||||
message_paypal_error_to_admin("Could not access paypal.com to verify payment", $data);
|
||||
die;
|
||||
@ -104,12 +108,9 @@ if (!$fp) { /// Could not open a socket to PayPal - FAIL
|
||||
|
||||
/// Connection is OK, so now we post the data to validate it
|
||||
|
||||
fputs ($fp, $header.$req);
|
||||
|
||||
/// Now read the response and check if everything is OK.
|
||||
|
||||
while (!feof($fp)) {
|
||||
$result = fgets($fp, 1024);
|
||||
if (strlen($result) > 0) {
|
||||
if (strcmp($result, "VERIFIED") == 0) { // VALID PAYMENT!
|
||||
|
||||
|
||||
@ -296,7 +297,6 @@ while (!feof($fp)) {
|
||||
}
|
||||
}
|
||||
|
||||
fclose($fp);
|
||||
exit;
|
||||
|
||||
|
||||
|
@ -57,6 +57,9 @@ class filter_mediaplugin_testcase extends advanced_testcase {
|
||||
'<a id="movie player" class="center" href="http://moodle.org/testfile/test.mpg">test mpg</a>',
|
||||
'<a href="http://moodle.org/testfile/test.ram">test</a>',
|
||||
'<a href="http://www.youtube.com/watch?v=JghQgA2HMX8" class="href=css">test file</a>',
|
||||
'<a href="http://www.youtube-nocookie.com/watch?v=JghQgA2HMX8" class="href=css">test file</a>',
|
||||
'<a href="http://youtu.be/JghQgA2HMX8" class="href=css">test file</a>',
|
||||
'<a href="http://y2u.be/JghQgA2HMX8" class="href=css">test file</a>',
|
||||
'<a class="youtube" href="http://www.youtube.com/watch?v=JghQgA2HMX8">test file</a>',
|
||||
'<a class="_blanktarget" href="http://moodle.org/testfile/test.flv?d=100x100">test flv</a>',
|
||||
'<a class="hrefcss" href="http://www.youtube.com/watch?v=JghQgA2HMX8">test file</a>',
|
||||
|
@ -225,7 +225,7 @@ class edit_category_form extends moodleform {
|
||||
$mform->addElement('header', 'headerparent', get_string('parentcategory', 'grades'));
|
||||
|
||||
$options = array();
|
||||
$default = '';
|
||||
$default = -1;
|
||||
$categories = grade_category::fetch_all(array('courseid'=>$COURSE->id));
|
||||
|
||||
foreach ($categories as $cat) {
|
||||
@ -238,6 +238,7 @@ class edit_category_form extends moodleform {
|
||||
|
||||
if (count($categories) > 1) {
|
||||
$mform->addElement('select', 'parentcategory', get_string('parentcategory', 'grades'), $options);
|
||||
$mform->setDefault('parentcategory', $default);
|
||||
$mform->addElement('static', 'currentparentaggregation', get_string('currentparentaggregation', 'grades'));
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ $string['availablelicenses'] = 'Available licences';
|
||||
$string['backgroundcolour'] = 'Transparent colour';
|
||||
$string['backups'] = 'Backups';
|
||||
$string['backup_shortname'] = 'Use course name in backup filename';
|
||||
$string['backup_shortnamehelp'] = 'Use the course name as part of the backup filename instead of the course id number.';
|
||||
$string['backup_shortnamehelp'] = 'Use the course name as part of the backup filename.';
|
||||
$string['badwordsconfig'] = 'Enter your list of bad words separated by commas.';
|
||||
$string['badwordsdefault'] = 'If the custom list is empty, a default list from the language pack will be used.';
|
||||
$string['badwordslist'] = 'Custom bad words list';
|
||||
|
@ -163,6 +163,7 @@ $string['lockedbypermission'] = 'You don\'t have sufficient permissions to chang
|
||||
$string['lockedbyconfig'] = 'This setting has been locked by the default backup settings';
|
||||
$string['lockedbyhierarchy'] = 'Locked by dependencies';
|
||||
$string['managefiles'] = 'Manage backup files';
|
||||
$string['missingfilesinpool'] = 'Some files could not be saved during the backup, it won\'t be possible to restore them.';
|
||||
$string['moodleversion'] = 'Moodle version';
|
||||
$string['moreresults'] = 'There are too many results, enter a more specific search.';
|
||||
$string['nomatchingcourses'] = 'There are no courses to display';
|
||||
@ -177,6 +178,7 @@ $string['restoreactivity'] = 'Restore activity';
|
||||
$string['restorecourse'] = 'Restore course';
|
||||
$string['restorecoursesettings'] = 'Course settings';
|
||||
$string['restoreexecutionsuccess'] = 'The course was restored successfully, clicking the continue button below will take you to view the course you restored.';
|
||||
$string['restorefileweremissing'] = 'Some files could not be restored because they were missing in the backup.';
|
||||
$string['restorenewcoursefullname'] = 'New course name';
|
||||
$string['restorenewcourseshortname'] = 'New course short name';
|
||||
$string['restorenewcoursestartdate'] = 'New start date';
|
||||
|
@ -37,6 +37,8 @@ $string['defaultregion'] = 'Default region';
|
||||
$string['defaultregion_help'] = 'Themes may define one or more named block regions where blocks are displayed. This setting defines which of these you want this block to appear in by default. The region may be overridden on specific pages if required.';
|
||||
$string['defaultweight'] = 'Default weight';
|
||||
$string['defaultweight_help'] = 'The default weight allows you to choose roughly where you want the block to appear in the chosen region, either at the top or the bottom. The final location is calculated from all the blocks in that region (for example, only one block can actually be at the top). This value can be overridden on specific pages if required.';
|
||||
$string['deletecheck'] = 'Delete {$a} block?';
|
||||
$string['deleteblockcheck'] = 'Are you sure that you want to delete this block titled {$a}?';
|
||||
$string['moveblockhere'] = 'Move block here';
|
||||
$string['movingthisblockcancel'] = 'Moving this block ({$a})';
|
||||
$string['onthispage'] = 'On this page';
|
||||
|
@ -1802,6 +1802,7 @@ $string['virusfounduser'] = 'The file you have uploaded, {$a->filename}, has bee
|
||||
$string['virusplaceholder'] = 'This file that has been uploaded was found to contain a virus and has been moved or deleted and the user notified.';
|
||||
$string['visible'] = 'Visible';
|
||||
$string['visibletostudents'] = 'Visible to {$a}';
|
||||
$string['warning'] = 'Warning';
|
||||
$string['warningdeleteresource'] = 'Warning: {$a} is referred in a resource. Would you like to update the resource?';
|
||||
$string['webpage'] = 'Web page';
|
||||
$string['week'] = 'Week';
|
||||
|
@ -6676,7 +6676,7 @@ class context_module extends context {
|
||||
if ($withprefix){
|
||||
$name = get_string('modulename', $cm->modname).': ';
|
||||
}
|
||||
$name .= $mod->name;
|
||||
$name .= format_string($mod->name, true, array('context' => $this));
|
||||
}
|
||||
}
|
||||
return $name;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
|
||||
@version V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
@version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Latest version is available at http://adodb.sourceforge.net
|
||||
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
|
@ -8,7 +8,7 @@ $ADODB_INCLUDED_CSV = 1;
|
||||
|
||||
/*
|
||||
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence. See License.txt.
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @version V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* @version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* Released under both BSD license and Lesser GPL library license.
|
||||
* Whenever there is any discrepancy between the two licenses,
|
||||
* the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @version V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* @version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* Released under both BSD license and Lesser GPL library license.
|
||||
* Whenever there is any discrepancy between the two licenses,
|
||||
* the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @version V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* @version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* @version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* Released under both BSD license and Lesser GPL library license.
|
||||
* Whenever there is any discrepancy between the two licenses,
|
||||
* the BSD license will take precedence.
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -6,7 +6,7 @@ global $ADODB_INCLUDED_LIB;
|
||||
$ADODB_INCLUDED_LIB = 1;
|
||||
|
||||
/*
|
||||
@version V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
@version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence. See License.txt.
|
||||
|
@ -11,7 +11,7 @@ if (empty($ADODB_INCLUDED_CSV)) include(ADODB_DIR.'/adodb-csvlib.inc.php');
|
||||
|
||||
/*
|
||||
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence. See License.txt.
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @version V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* @version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* Released under both BSD license and Lesser GPL library license.
|
||||
* Whenever there is any discrepancy between the two licenses,
|
||||
* the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence. See License.txt.
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -14,7 +14,7 @@
|
||||
/**
|
||||
\mainpage
|
||||
|
||||
@version V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
@version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
|
||||
Released under both BSD license and Lesser GPL library license. You can choose which license
|
||||
you prefer.
|
||||
@ -177,7 +177,7 @@
|
||||
/**
|
||||
* ADODB version as a string.
|
||||
*/
|
||||
$ADODB_vers = 'V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.';
|
||||
$ADODB_vers = 'V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.';
|
||||
|
||||
/**
|
||||
* Determines whether recordset->RecordCount() is used.
|
||||
@ -3499,23 +3499,22 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1
|
||||
*
|
||||
* $upper 0 = lowercase, 1 = uppercase, 2 = whatever is returned by FetchField
|
||||
*/
|
||||
function GetRowAssoc($upper=1)
|
||||
function GetRowAssoc($upper=1)
|
||||
{
|
||||
$record = array();
|
||||
// if (!$this->fields) return $record;
|
||||
|
||||
if (!$this->bind) {
|
||||
if (!$this->bind) {
|
||||
$this->GetAssocKeys($upper);
|
||||
}
|
||||
|
||||
foreach($this->bind as $k => $v) {
|
||||
$record[$k] = $this->fields[$v];
|
||||
if( isset( $this->fields[$v] ) ) {
|
||||
$record[$k] = $this->fields[$v];
|
||||
} else if (isset($this->fields[$k])) {
|
||||
$record[$k] = $this->fields[$k];
|
||||
}
|
||||
}
|
||||
|
||||
return $record;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clean up recordset
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence. See License.txt.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence. See License.txt.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 (jlim#natsoft.com). All rights reserved.
|
||||
|
||||
This is a version of the ADODB driver for DB2. It uses the 'ibm_db2' PECL extension
|
||||
for PHP (http://pecl.php.net/package/ibm_db2), which in turn requires DB2 V8.2.2 or
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
@version V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
@version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @version V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* @version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* Released under both BSD license and Lesser GPL library license.
|
||||
* Whenever there is any discrepancy between the two licenses,
|
||||
* the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim. All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim. All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
@ -130,6 +130,7 @@ class ADODB_mssqlnative extends ADOConnection {
|
||||
var $uniqueOrderBy = true;
|
||||
var $_bindInputArray = true;
|
||||
var $_dropSeqSQL = "drop table %s";
|
||||
var $connectionInfo = array();
|
||||
|
||||
function ADODB_mssqlnative()
|
||||
{
|
||||
@ -378,7 +379,10 @@ class ADODB_mssqlnative extends ADOConnection {
|
||||
function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
|
||||
{
|
||||
if (!function_exists('sqlsrv_connect')) return null;
|
||||
$connectionInfo = array("Database"=>$argDatabasename,'UID'=>$argUsername,'PWD'=>$argPassword);
|
||||
$connectionInfo = $this->connectionInfo;
|
||||
$connectionInfo["Database"]=$argDatabasename;
|
||||
$connectionInfo["UID"]=$argUsername;
|
||||
$connectionInfo["PWD"]=$argPassword;
|
||||
if ($this->debug) error_log("<hr>connecting... hostname: $argHostname params: ".var_export($connectionInfo,true));
|
||||
//if ($this->debug) error_log("<hr>_connectionID before: ".serialize($this->_connectionID));
|
||||
if(!($this->_connectionID = sqlsrv_connect($argHostname,$connectionInfo))) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @version V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* @version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* Released under both BSD license and Lesser GPL library license.
|
||||
* Whenever there is any discrepancy between the two licenses,
|
||||
* the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
@ -36,6 +36,7 @@ class ADODB_mysql extends ADOConnection {
|
||||
var $forceNewConnect = false;
|
||||
var $poorAffectedRows = true;
|
||||
var $clientFlags = 0;
|
||||
var $charSet = '';
|
||||
var $substr = "substring";
|
||||
var $nameQuote = '`'; /// string to use to quote identifiers and names
|
||||
var $compat323 = false; // true if compat with mysql 3.23
|
||||
@ -44,7 +45,25 @@ class ADODB_mysql extends ADOConnection {
|
||||
{
|
||||
if (defined('ADODB_EXTENSION')) $this->rsPrefix .= 'ext_';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// SetCharSet - switch the client encoding
|
||||
function SetCharSet($charset_name)
|
||||
{
|
||||
if (!function_exists('mysql_set_charset'))
|
||||
return false;
|
||||
|
||||
if ($this->charSet !== $charset_name) {
|
||||
$ok = @mysql_set_charset($charset_name,$this->_connectionID);
|
||||
if ($ok) {
|
||||
$this->charSet = $charset_name;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function ServerInfo()
|
||||
{
|
||||
$arr['description'] = ADOConnection::GetOne("select version()");
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
|
||||
First cut at the Netezza Driver by Josh Eldridge joshuae74#hotmail.com
|
||||
Based on the previous postgres drivers.
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
|
||||
version V5.16 26 Mar 2012 (c) 2000-2012 John Lim. All rights reserved.
|
||||
version V5.17 17 May 2012 (c) 2000-2012 John Lim. All rights reserved.
|
||||
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
@ -88,7 +88,7 @@ END;
|
||||
var $connectSID = false;
|
||||
var $_bind = false;
|
||||
var $_nestedSQL = true;
|
||||
var $_hasOCIFetchStatement = false;
|
||||
var $_hasOciFetchStatement = false;
|
||||
var $_getarray = false; // currently not working
|
||||
var $leftOuter = ''; // oracle wierdness, $col = $value (+) for LEFT OUTER, $col (+)= $value for RIGHT OUTER
|
||||
var $session_sharing_force_blob = false; // alter session on updateblob if set to true
|
||||
@ -104,7 +104,7 @@ END;
|
||||
|
||||
function ADODB_oci8()
|
||||
{
|
||||
$this->_hasOCIFetchStatement = ADODB_PHPVER >= 0x4200;
|
||||
$this->_hasOciFetchStatement = ADODB_PHPVER >= 0x4200;
|
||||
if (defined('ADODB_EXTENSION')) $this->rsPrefix .= 'ext_';
|
||||
}
|
||||
|
||||
@ -201,7 +201,7 @@ NATSOFT.DOMAIN =
|
||||
*/
|
||||
function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$mode=0)
|
||||
{
|
||||
if (!function_exists('OCIPLogon')) return null;
|
||||
if (!function_exists('oci_pconnect')) return null;
|
||||
#adodb_backtrace();
|
||||
|
||||
$this->_errorMsg = false;
|
||||
@ -235,22 +235,22 @@ NATSOFT.DOMAIN =
|
||||
//if ($argHostname) print "<p>Connect: 1st argument should be left blank for $this->databaseType</p>";
|
||||
if ($mode==1) {
|
||||
$this->_connectionID = ($this->charSet) ?
|
||||
OCIPLogon($argUsername,$argPassword, $argDatabasename,$this->charSet)
|
||||
oci_pconnect($argUsername,$argPassword, $argDatabasename,$this->charSet)
|
||||
:
|
||||
OCIPLogon($argUsername,$argPassword, $argDatabasename)
|
||||
oci_pconnect($argUsername,$argPassword, $argDatabasename)
|
||||
;
|
||||
if ($this->_connectionID && $this->autoRollback) OCIrollback($this->_connectionID);
|
||||
if ($this->_connectionID && $this->autoRollback) oci_rollback($this->_connectionID);
|
||||
} else if ($mode==2) {
|
||||
$this->_connectionID = ($this->charSet) ?
|
||||
OCINLogon($argUsername,$argPassword, $argDatabasename,$this->charSet)
|
||||
oci_new_connect($argUsername,$argPassword, $argDatabasename,$this->charSet)
|
||||
:
|
||||
OCINLogon($argUsername,$argPassword, $argDatabasename);
|
||||
oci_new_connect($argUsername,$argPassword, $argDatabasename);
|
||||
|
||||
} else {
|
||||
$this->_connectionID = ($this->charSet) ?
|
||||
OCILogon($argUsername,$argPassword, $argDatabasename,$this->charSet)
|
||||
oci_connect($argUsername,$argPassword, $argDatabasename,$this->charSet)
|
||||
:
|
||||
OCILogon($argUsername,$argPassword, $argDatabasename);
|
||||
oci_connect($argUsername,$argPassword, $argDatabasename);
|
||||
}
|
||||
if (!$this->_connectionID) return false;
|
||||
if ($this->_initdate) {
|
||||
@ -259,7 +259,7 @@ NATSOFT.DOMAIN =
|
||||
|
||||
// looks like:
|
||||
// Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production With the Partitioning option JServer Release 8.1.7.0.0 - Production
|
||||
// $vers = OCIServerVersion($this->_connectionID);
|
||||
// $vers = oci_server_version($this->_connectionID);
|
||||
// if (strpos($vers,'8i') !== false) $this->ansiOuter = true;
|
||||
return true;
|
||||
}
|
||||
@ -267,7 +267,7 @@ NATSOFT.DOMAIN =
|
||||
function ServerInfo()
|
||||
{
|
||||
$arr['compat'] = $this->GetOne('select value from sys.database_compatible_level');
|
||||
$arr['description'] = @OCIServerVersion($this->_connectionID);
|
||||
$arr['description'] = @oci_server_version($this->_connectionID);
|
||||
$arr['version'] = ADOConnection::_findvers($arr['description']);
|
||||
return $arr;
|
||||
}
|
||||
@ -285,7 +285,7 @@ NATSOFT.DOMAIN =
|
||||
|
||||
function _affectedrows()
|
||||
{
|
||||
if (is_resource($this->_stmt)) return @OCIRowCount($this->_stmt);
|
||||
if (is_resource($this->_stmt)) return @oci_num_rows($this->_stmt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -386,6 +386,13 @@ NATSOFT.DOMAIN =
|
||||
|
||||
$false = false;
|
||||
$rs = $this->Execute(sprintf("SELECT * FROM ALL_CONSTRAINTS WHERE UPPER(TABLE_NAME)='%s' AND CONSTRAINT_TYPE='P'",$table));
|
||||
if (!is_object($rs)) {
|
||||
if (isset($savem))
|
||||
$this->SetFetchMode($savem);
|
||||
$ADODB_FETCH_MODE = $save;
|
||||
return $false;
|
||||
}
|
||||
|
||||
if ($row = $rs->FetchRow())
|
||||
$primary_key = $row[1]; //constraint_name
|
||||
|
||||
@ -451,7 +458,7 @@ NATSOFT.DOMAIN =
|
||||
if (!$ok) return $this->RollbackTrans();
|
||||
|
||||
if ($this->transCnt) $this->transCnt -= 1;
|
||||
$ret = OCIcommit($this->_connectionID);
|
||||
$ret = oci_commit($this->_connectionID);
|
||||
$this->_commit = OCI_COMMIT_ON_SUCCESS;
|
||||
$this->autoCommit = true;
|
||||
return $ret;
|
||||
@ -461,7 +468,7 @@ NATSOFT.DOMAIN =
|
||||
{
|
||||
if ($this->transOff) return true;
|
||||
if ($this->transCnt) $this->transCnt -= 1;
|
||||
$ret = OCIrollback($this->_connectionID);
|
||||
$ret = oci_rollback($this->_connectionID);
|
||||
$this->_commit = OCI_COMMIT_ON_SUCCESS;
|
||||
$this->autoCommit = true;
|
||||
return $ret;
|
||||
@ -477,10 +484,10 @@ NATSOFT.DOMAIN =
|
||||
{
|
||||
if ($this->_errorMsg !== false) return $this->_errorMsg;
|
||||
|
||||
if (is_resource($this->_stmt)) $arr = @OCIError($this->_stmt);
|
||||
if (is_resource($this->_stmt)) $arr = @oci_error($this->_stmt);
|
||||
if (empty($arr)) {
|
||||
if (is_resource($this->_connectionID)) $arr = @OCIError($this->_connectionID);
|
||||
else $arr = @OCIError();
|
||||
if (is_resource($this->_connectionID)) $arr = @oci_error($this->_connectionID);
|
||||
else $arr = @oci_error();
|
||||
if ($arr === false) return '';
|
||||
}
|
||||
$this->_errorMsg = $arr['message'];
|
||||
@ -492,10 +499,10 @@ NATSOFT.DOMAIN =
|
||||
{
|
||||
if ($this->_errorCode !== false) return $this->_errorCode;
|
||||
|
||||
if (is_resource($this->_stmt)) $arr = @OCIError($this->_stmt);
|
||||
if (is_resource($this->_stmt)) $arr = @oci_error($this->_stmt);
|
||||
if (empty($arr)) {
|
||||
$arr = @OCIError($this->_connectionID);
|
||||
if ($arr == false) $arr = @OCIError();
|
||||
$arr = @oci_error($this->_connectionID);
|
||||
if ($arr == false) $arr = @oci_error();
|
||||
if ($arr == false) return '';
|
||||
}
|
||||
|
||||
@ -651,34 +658,34 @@ NATSOFT.DOMAIN =
|
||||
foreach($inputarr as $k => $v) {
|
||||
if (is_array($v)) {
|
||||
if (sizeof($v) == 2) // suggested by g.giunta@libero.
|
||||
OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1]);
|
||||
oci_bind_by_name($stmt,":$k",$inputarr[$k][0],$v[1]);
|
||||
else
|
||||
OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]);
|
||||
oci_bind_by_name($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]);
|
||||
} else {
|
||||
$len = -1;
|
||||
if ($v === ' ') $len = 1;
|
||||
if (isset($bindarr)) { // is prepared sql, so no need to ocibindbyname again
|
||||
if (isset($bindarr)) { // is prepared sql, so no need to oci_bind_by_name again
|
||||
$bindarr[$k] = $v;
|
||||
} else { // dynamic sql, so rebind every time
|
||||
OCIBindByName($stmt,":$k",$inputarr[$k],$len);
|
||||
oci_bind_by_name($stmt,":$k",$inputarr[$k],$len);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!OCIExecute($stmt, OCI_DEFAULT)) {
|
||||
OCIFreeStatement($stmt);
|
||||
if (!oci_execute($stmt, OCI_DEFAULT)) {
|
||||
oci_free_statement($stmt);
|
||||
return $false;
|
||||
}
|
||||
|
||||
$ncols = OCINumCols($stmt);
|
||||
$ncols = oci_num_fields($stmt);
|
||||
for ( $i = 1; $i <= $ncols; $i++ ) {
|
||||
$cols[] = '"'.OCIColumnName($stmt, $i).'"';
|
||||
$cols[] = '"'.oci_field_name($stmt, $i).'"';
|
||||
}
|
||||
$result = false;
|
||||
|
||||
OCIFreeStatement($stmt);
|
||||
oci_free_statement($stmt);
|
||||
$fields = implode(',', $cols);
|
||||
if ($nrows <= 0) $nrows = 999999999999;
|
||||
else $nrows += $offset;
|
||||
@ -741,7 +748,7 @@ NATSOFT.DOMAIN =
|
||||
else
|
||||
$sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO :blob";
|
||||
|
||||
$desc = OCINewDescriptor($this->_connectionID, OCI_D_LOB);
|
||||
$desc = oci_new_descriptor($this->_connectionID, OCI_D_LOB);
|
||||
$arr['blob'] = array($desc,-1,$type);
|
||||
if ($this->session_sharing_force_blob) $this->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT');
|
||||
$commit = $this->autoCommit;
|
||||
@ -772,7 +779,7 @@ NATSOFT.DOMAIN =
|
||||
else
|
||||
$sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO :blob";
|
||||
|
||||
$desc = OCINewDescriptor($this->_connectionID, OCI_D_LOB);
|
||||
$desc = oci_new_descriptor($this->_connectionID, OCI_D_LOB);
|
||||
$arr['blob'] = array($desc,-1,$type);
|
||||
|
||||
$this->BeginTrans();
|
||||
@ -873,12 +880,12 @@ NATSOFT.DOMAIN =
|
||||
{
|
||||
static $BINDNUM = 0;
|
||||
|
||||
$stmt = OCIParse($this->_connectionID,$sql);
|
||||
$stmt = oci_parse($this->_connectionID,$sql);
|
||||
|
||||
if (!$stmt) {
|
||||
$this->_errorMsg = false;
|
||||
$this->_errorCode = false;
|
||||
$arr = @OCIError($this->_connectionID);
|
||||
$arr = @oci_error($this->_connectionID);
|
||||
if ($arr === false) return false;
|
||||
|
||||
$this->_errorMsg = $arr['message'];
|
||||
@ -888,9 +895,9 @@ NATSOFT.DOMAIN =
|
||||
|
||||
$BINDNUM += 1;
|
||||
|
||||
$sttype = @OCIStatementType($stmt);
|
||||
$sttype = @oci_statement_type($stmt);
|
||||
if ($sttype == 'BEGIN' || $sttype == 'DECLARE') {
|
||||
return array($sql,$stmt,0,$BINDNUM, ($cursor) ? OCINewCursor($this->_connectionID) : false);
|
||||
return array($sql,$stmt,0,$BINDNUM, ($cursor) ? oci_new_cursor($this->_connectionID) : false);
|
||||
}
|
||||
return array($sql,$stmt,0,$BINDNUM);
|
||||
}
|
||||
@ -912,7 +919,7 @@ NATSOFT.DOMAIN =
|
||||
function ExecuteCursor($sql,$cursorName='rs',$params=false)
|
||||
{
|
||||
if (is_array($sql)) $stmt = $sql;
|
||||
else $stmt = ADODB_oci8::Prepare($sql,true); # true to allocate OCINewCursor
|
||||
else $stmt = ADODB_oci8::Prepare($sql,true); # true to allocate oci_new_cursor
|
||||
|
||||
if (is_array($stmt) && sizeof($stmt) >= 5) {
|
||||
$hasref = true;
|
||||
@ -928,7 +935,7 @@ NATSOFT.DOMAIN =
|
||||
|
||||
$rs = $this->Execute($stmt);
|
||||
if ($rs) {
|
||||
if ($rs->databaseType == 'array') OCIFreeCursor($stmt[4]);
|
||||
if ($rs->databaseType == 'array') oci_free_cursor($stmt[4]);
|
||||
else if ($hasref) $rs->_refcursor = $stmt[4];
|
||||
}
|
||||
return $rs;
|
||||
@ -955,13 +962,13 @@ NATSOFT.DOMAIN =
|
||||
|
||||
Some timings:
|
||||
** Test table has 3 cols, and 1 index. Test to insert 1000 records
|
||||
Time 0.6081s (1644.60 inserts/sec) with direct OCIParse/OCIExecute
|
||||
Time 0.6081s (1644.60 inserts/sec) with direct oci_parse/oci_execute
|
||||
Time 0.6341s (1577.16 inserts/sec) with ADOdb Prepare/Bind/Execute
|
||||
Time 1.5533s ( 643.77 inserts/sec) with pure SQL using Execute
|
||||
|
||||
Now if PHP only had batch/bulk updating like Java or PL/SQL...
|
||||
|
||||
Note that the order of parameters differs from OCIBindByName,
|
||||
Note that the order of parameters differs from oci_bind_by_name,
|
||||
because we default the names to :0, :1, :2
|
||||
*/
|
||||
function Bind(&$stmt,&$var,$size=4000,$type=false,$name=false,$isOutput=false)
|
||||
@ -970,12 +977,12 @@ NATSOFT.DOMAIN =
|
||||
if (!is_array($stmt)) return false;
|
||||
|
||||
if (($type == OCI_B_CURSOR) && sizeof($stmt) >= 5) {
|
||||
return OCIBindByName($stmt[1],":".$name,$stmt[4],$size,$type);
|
||||
return oci_bind_by_name($stmt[1],":".$name,$stmt[4],$size,$type);
|
||||
}
|
||||
|
||||
if ($name == false) {
|
||||
if ($type !== false) $rez = OCIBindByName($stmt[1],":".$stmt[2],$var,$size,$type);
|
||||
else $rez = OCIBindByName($stmt[1],":".$stmt[2],$var,$size); // +1 byte for null terminator
|
||||
if ($type !== false) $rez = oci_bind_by_name($stmt[1],":".$stmt[2],$var,$size,$type);
|
||||
else $rez = oci_bind_by_name($stmt[1],":".$stmt[2],$var,$size); // +1 byte for null terminator
|
||||
$stmt[2] += 1;
|
||||
} else if (oci_lob_desc($type)) {
|
||||
if ($this->debug) {
|
||||
@ -983,11 +990,11 @@ NATSOFT.DOMAIN =
|
||||
}
|
||||
//we have to create a new Descriptor here
|
||||
$numlob = count($this->_refLOBs);
|
||||
$this->_refLOBs[$numlob]['LOB'] = OCINewDescriptor($this->_connectionID, oci_lob_desc($type));
|
||||
$this->_refLOBs[$numlob]['LOB'] = oci_new_descriptor($this->_connectionID, oci_lob_desc($type));
|
||||
$this->_refLOBs[$numlob]['TYPE'] = $isOutput;
|
||||
|
||||
$tmp = $this->_refLOBs[$numlob]['LOB'];
|
||||
$rez = OCIBindByName($stmt[1], ":".$name, $tmp, -1, $type);
|
||||
$rez = oci_bind_by_name($stmt[1], ":".$name, $tmp, -1, $type);
|
||||
if ($this->debug) {
|
||||
ADOConnection::outp("<b>Bind</b>: descriptor has been allocated, var (".$name.") binded");
|
||||
}
|
||||
@ -1008,8 +1015,8 @@ NATSOFT.DOMAIN =
|
||||
if ($this->debug)
|
||||
ADOConnection::outp("<b>Bind</b>: name = $name");
|
||||
|
||||
if ($type !== false) $rez = OCIBindByName($stmt[1],":".$name,$var,$size,$type);
|
||||
else $rez = OCIBindByName($stmt[1],":".$name,$var,$size); // +1 byte for null terminator
|
||||
if ($type !== false) $rez = oci_bind_by_name($stmt[1],":".$name,$var,$size,$type);
|
||||
else $rez = oci_bind_by_name($stmt[1],":".$name,$var,$size); // +1 byte for null terminator
|
||||
}
|
||||
|
||||
return $rez;
|
||||
@ -1034,7 +1041,7 @@ NATSOFT.DOMAIN =
|
||||
@param [$maxLen] Holds an maximum length of the variable.
|
||||
@param [$type] The data type of $var. Legal values depend on driver.
|
||||
|
||||
See OCIBindByName documentation at php.net.
|
||||
See oci_bind_by_name documentation at php.net.
|
||||
*/
|
||||
function Parameter(&$stmt,&$var,$name,$isOutput=false,$maxLen=4000,$type=false)
|
||||
{
|
||||
@ -1066,7 +1073,7 @@ NATSOFT.DOMAIN =
|
||||
if (is_array($sql)) { // is prepared sql
|
||||
$stmt = $sql[1];
|
||||
|
||||
// we try to bind to permanent array, so that OCIBindByName is persistent
|
||||
// we try to bind to permanent array, so that oci_bind_by_name is persistent
|
||||
// and carried out once only - note that max array element size is 4000 chars
|
||||
if (is_array($inputarr)) {
|
||||
$bindpos = $sql[3];
|
||||
@ -1078,27 +1085,27 @@ NATSOFT.DOMAIN =
|
||||
$bindarr = array();
|
||||
foreach($inputarr as $k => $v) {
|
||||
$bindarr[$k] = $v;
|
||||
OCIBindByName($stmt,":$k",$bindarr[$k],is_string($v) && strlen($v)>4000 ? -1 : 4000);
|
||||
oci_bind_by_name($stmt,":$k",$bindarr[$k],is_string($v) && strlen($v)>4000 ? -1 : 4000);
|
||||
}
|
||||
$this->_bind[$bindpos] = $bindarr;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$stmt=OCIParse($this->_connectionID,$sql);
|
||||
$stmt=oci_parse($this->_connectionID,$sql);
|
||||
}
|
||||
|
||||
$this->_stmt = $stmt;
|
||||
if (!$stmt) return false;
|
||||
|
||||
if (defined('ADODB_PREFETCH_ROWS')) @OCISetPrefetch($stmt,ADODB_PREFETCH_ROWS);
|
||||
if (defined('ADODB_PREFETCH_ROWS')) @oci_set_prefetch($stmt,ADODB_PREFETCH_ROWS);
|
||||
|
||||
if (is_array($inputarr)) {
|
||||
foreach($inputarr as $k => $v) {
|
||||
if (is_array($v)) {
|
||||
if (sizeof($v) == 2) // suggested by g.giunta@libero.
|
||||
OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1]);
|
||||
oci_bind_by_name($stmt,":$k",$inputarr[$k][0],$v[1]);
|
||||
else
|
||||
OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]);
|
||||
oci_bind_by_name($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]);
|
||||
|
||||
if ($this->debug==99) {
|
||||
if (is_object($v[0]))
|
||||
@ -1110,10 +1117,10 @@ NATSOFT.DOMAIN =
|
||||
} else {
|
||||
$len = -1;
|
||||
if ($v === ' ') $len = 1;
|
||||
if (isset($bindarr)) { // is prepared sql, so no need to ocibindbyname again
|
||||
if (isset($bindarr)) { // is prepared sql, so no need to oci_bind_by_name again
|
||||
$bindarr[$k] = $v;
|
||||
} else { // dynamic sql, so rebind every time
|
||||
OCIBindByName($stmt,":$k",$inputarr[$k],$len);
|
||||
oci_bind_by_name($stmt,":$k",$inputarr[$k],$len);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1121,8 +1128,8 @@ NATSOFT.DOMAIN =
|
||||
|
||||
$this->_errorMsg = false;
|
||||
$this->_errorCode = false;
|
||||
if (OCIExecute($stmt,$this->_commit)) {
|
||||
//OCIInternalDebug(1);
|
||||
if (oci_execute($stmt,$this->_commit)) {
|
||||
|
||||
if (count($this -> _refLOBs) > 0) {
|
||||
|
||||
foreach ($this -> _refLOBs as $key => $value) {
|
||||
@ -1144,7 +1151,7 @@ NATSOFT.DOMAIN =
|
||||
}
|
||||
}
|
||||
|
||||
switch (@OCIStatementType($stmt)) {
|
||||
switch (@oci_statement_type($stmt)) {
|
||||
case "SELECT":
|
||||
return $stmt;
|
||||
|
||||
@ -1153,20 +1160,20 @@ NATSOFT.DOMAIN =
|
||||
if (is_array($sql) && !empty($sql[4])) {
|
||||
$cursor = $sql[4];
|
||||
if (is_resource($cursor)) {
|
||||
$ok = OCIExecute($cursor);
|
||||
$ok = oci_execute($cursor);
|
||||
return $cursor;
|
||||
}
|
||||
return $stmt;
|
||||
} else {
|
||||
if (is_resource($stmt)) {
|
||||
OCIFreeStatement($stmt);
|
||||
oci_free_statement($stmt);
|
||||
return true;
|
||||
}
|
||||
return $stmt;
|
||||
}
|
||||
break;
|
||||
default :
|
||||
// ociclose -- no because it could be used in a LOB?
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -1204,14 +1211,14 @@ NATSOFT.DOMAIN =
|
||||
{
|
||||
if (!$this->_connectionID) return;
|
||||
|
||||
if (!$this->autoCommit) OCIRollback($this->_connectionID);
|
||||
if (!$this->autoCommit) oci_rollback($this->_connectionID);
|
||||
if (count($this->_refLOBs) > 0) {
|
||||
foreach ($this ->_refLOBs as $key => $value) {
|
||||
$this->_refLOBs[$key]['LOB']->free();
|
||||
unset($this->_refLOBs[$key]);
|
||||
}
|
||||
}
|
||||
OCILogoff($this->_connectionID);
|
||||
oci_close($this->_connectionID);
|
||||
|
||||
$this->_stmt = false;
|
||||
$this->_connectionID = false;
|
||||
@ -1383,7 +1390,7 @@ class ADORecordset_oci8 extends ADORecordSet {
|
||||
/*
|
||||
// based on idea by Gaetano Giunta to detect unusual oracle errors
|
||||
// see http://phplens.com/lens/lensforum/msgs.php?id=6771
|
||||
$err = OCIError($this->_queryID);
|
||||
$err = oci_error($this->_queryID);
|
||||
if ($err && $this->connection->debug) ADOConnection::outp($err);
|
||||
*/
|
||||
|
||||
@ -1402,7 +1409,7 @@ class ADORecordset_oci8 extends ADORecordSet {
|
||||
function _initrs()
|
||||
{
|
||||
$this->_numOfRows = -1;
|
||||
$this->_numOfFields = OCInumcols($this->_queryID);
|
||||
$this->_numOfFields = oci_num_fields($this->_queryID);
|
||||
if ($this->_numOfFields>0) {
|
||||
$this->_fieldobjs = array();
|
||||
$max = $this->_numOfFields;
|
||||
@ -1419,13 +1426,13 @@ class ADORecordset_oci8 extends ADORecordSet {
|
||||
{
|
||||
$fld = new ADOFieldObject;
|
||||
$fieldOffset += 1;
|
||||
$fld->name =OCIcolumnname($this->_queryID, $fieldOffset);
|
||||
$fld->type = OCIcolumntype($this->_queryID, $fieldOffset);
|
||||
$fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset);
|
||||
$fld->name =oci_field_name($this->_queryID, $fieldOffset);
|
||||
$fld->type = oci_field_type($this->_queryID, $fieldOffset);
|
||||
$fld->max_length = oci_field_size($this->_queryID, $fieldOffset);
|
||||
switch($fld->type) {
|
||||
case 'NUMBER':
|
||||
$p = OCIColumnPrecision($this->_queryID, $fieldOffset);
|
||||
$sc = OCIColumnScale($this->_queryID, $fieldOffset);
|
||||
$p = oci_field_precision($this->_queryID, $fieldOffset);
|
||||
$sc = oci_field_scale($this->_queryID, $fieldOffset);
|
||||
if ($p != 0 && $sc == 0) $fld->type = 'INT';
|
||||
$fld->scale = $p;
|
||||
break;
|
||||
@ -1439,7 +1446,7 @@ class ADORecordset_oci8 extends ADORecordSet {
|
||||
return $fld;
|
||||
}
|
||||
|
||||
/* For some reason, OCIcolumnname fails when called after _initrs() so we cache it */
|
||||
/* For some reason, oci_field_name fails when called after _initrs() so we cache it */
|
||||
function FetchField($fieldOffset = -1)
|
||||
{
|
||||
return $this->_fieldobjs[$fieldOffset];
|
||||
@ -1455,7 +1462,7 @@ class ADORecordset_oci8 extends ADORecordSet {
|
||||
if ($this->EOF) return false;
|
||||
|
||||
$this->_currentRow++;
|
||||
if(@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode))
|
||||
if($this->fields = @oci_fetch_array($this->_queryID,$this->fetchMode))
|
||||
return true;
|
||||
$this->EOF = true;
|
||||
|
||||
@ -1465,7 +1472,7 @@ class ADORecordset_oci8 extends ADORecordSet {
|
||||
|
||||
function MoveNext()
|
||||
{
|
||||
if (@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) {
|
||||
if ($this->fields = @oci_fetch_array($this->_queryID,$this->fetchMode)) {
|
||||
$this->_currentRow += 1;
|
||||
return true;
|
||||
}
|
||||
@ -1485,18 +1492,18 @@ class ADORecordset_oci8 extends ADORecordSet {
|
||||
if (true || !empty($ADODB_OCI8_GETARRAY)) {
|
||||
# does not support $ADODB_ANSI_PADDING_OFF
|
||||
|
||||
//OCI_RETURN_NULLS and OCI_RETURN_LOBS is set by OCIfetchstatement
|
||||
//OCI_RETURN_NULLS and OCI_RETURN_LOBS is set by oci_fetch_all
|
||||
switch($this->adodbFetchMode) {
|
||||
case ADODB_FETCH_NUM:
|
||||
|
||||
$ncols = @OCIfetchstatement($this->_queryID, $results, 0, $nRows, OCI_FETCHSTATEMENT_BY_ROW+OCI_NUM);
|
||||
$ncols = @oci_fetch_all($this->_queryID, $results, 0, $nRows, oci_fetch_all_BY_ROW+OCI_NUM);
|
||||
$results = array_merge(array($this->fields),$results);
|
||||
return $results;
|
||||
|
||||
case ADODB_FETCH_ASSOC:
|
||||
if (ADODB_ASSOC_CASE != 2 || $this->databaseType != 'oci8') break;
|
||||
|
||||
$ncols = @OCIfetchstatement($this->_queryID, $assoc, 0, $nRows, OCI_FETCHSTATEMENT_BY_ROW);
|
||||
$ncols = @oci_fetch_all($this->_queryID, $assoc, 0, $nRows, oci_fetch_all_BY_ROW);
|
||||
$results = array_merge(array($this->fields),$assoc);
|
||||
return $results;
|
||||
|
||||
@ -1510,7 +1517,7 @@ class ADORecordset_oci8 extends ADORecordSet {
|
||||
|
||||
} */
|
||||
|
||||
/* Optimize SelectLimit() by using OCIFetch() instead of OCIFetchInto() */
|
||||
/* Optimize SelectLimit() by using oci_fetch() */
|
||||
function GetArrayLimit($nrows,$offset=-1)
|
||||
{
|
||||
if ($offset <= 0) {
|
||||
@ -1519,9 +1526,9 @@ class ADORecordset_oci8 extends ADORecordSet {
|
||||
}
|
||||
$arr = array();
|
||||
for ($i=1; $i < $offset; $i++)
|
||||
if (!@OCIFetch($this->_queryID)) return $arr;
|
||||
if (!@oci_fetch($this->_queryID)) return $arr;
|
||||
|
||||
if (!@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) return $arr;;
|
||||
if (!$this->fields = @oci_fetch_array($this->_queryID,$this->fetchMode)) return $arr;;
|
||||
$results = array();
|
||||
$cnt = 0;
|
||||
while (!$this->EOF && $nrows != $cnt) {
|
||||
@ -1556,7 +1563,7 @@ class ADORecordset_oci8 extends ADORecordSet {
|
||||
|
||||
function _fetch()
|
||||
{
|
||||
return @OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode);
|
||||
return $this->fields = @oci_fetch_array($this->_queryID,$this->fetchMode);
|
||||
}
|
||||
|
||||
/* close() only needs to be called if you are worried about using too much memory while your script
|
||||
@ -1566,10 +1573,10 @@ class ADORecordset_oci8 extends ADORecordSet {
|
||||
{
|
||||
if ($this->connection->_stmt === $this->_queryID) $this->connection->_stmt = false;
|
||||
if (!empty($this->_refcursor)) {
|
||||
OCIFreeCursor($this->_refcursor);
|
||||
oci_free_cursor($this->_refcursor);
|
||||
$this->_refcursor = false;
|
||||
}
|
||||
@OCIFreeStatement($this->_queryID);
|
||||
@oci_free_statement($this->_queryID);
|
||||
$this->_queryID = false;
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @version V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* @version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* Released under both BSD license and Lesser GPL library license.
|
||||
* Whenever there is any discrepancy between the two licenses,
|
||||
* the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim. All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim. All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
@ -52,9 +52,13 @@ class ADODB_odbc extends ADOConnection {
|
||||
|
||||
if (!function_exists('odbc_connect')) return null;
|
||||
|
||||
if ($this->debug && $argDatabasename && $this->databaseType != 'vfp') {
|
||||
ADOConnection::outp("For odbc Connect(), $argDatabasename is not used. Place dsn in 1st parameter.");
|
||||
if (!empty($argDatabasename) && stristr($argDSN, 'Database=') === false) {
|
||||
$argDSN = trim($argDSN);
|
||||
$endDSN = substr($argDSN, strlen($argDSN) - 1);
|
||||
if ($endDSN != ';') $argDSN .= ';';
|
||||
$argDSN .= 'Database='.$argDatabasename;
|
||||
}
|
||||
|
||||
if (isset($php_errormsg)) $php_errormsg = '';
|
||||
if ($this->curmode === false) $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword);
|
||||
else $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword,$this->curmode);
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence. See License.txt.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence. See License.txt.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence. See License.txt.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
version V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights
|
||||
version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights
|
||||
reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim. All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim. All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
V5.16 26 Mar 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
// by "El-Shamaa, Khaled" <k.el-shamaa#cgiar.org>
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'ar',
|
||||
DB_ERROR => 'خطأ غير محدد',
|
||||
DB_ERROR_ALREADY_EXISTS => 'موجود مسبقا',
|
||||
DB_ERROR_CANNOT_CREATE => 'لا يمكن إنشاء',
|
||||
DB_ERROR_CANNOT_DELETE => 'لا يمكن حذف',
|
||||
DB_ERROR_CANNOT_DROP => 'لا يمكن حذف',
|
||||
DB_ERROR_CONSTRAINT => 'عملية إدخال ممنوعة',
|
||||
DB_ERROR_DIVZERO => 'عملية التقسيم على صفر',
|
||||
DB_ERROR_INVALID => 'غير صحيح',
|
||||
DB_ERROR_INVALID_DATE => 'صيغة وقت أو تاريخ غير صحيحة',
|
||||
DB_ERROR_INVALID_NUMBER => 'صيغة رقم غير صحيحة',
|
||||
DB_ERROR_MISMATCH => 'غير متطابق',
|
||||
DB_ERROR_NODBSELECTED => 'لم يتم إختيار قاعدة البيانات بعد',
|
||||
DB_ERROR_NOSUCHFIELD => 'ليس هنالك حقل بهذا الاسم',
|
||||
DB_ERROR_NOSUCHTABLE => 'ليس هنالك جدول بهذا الاسم',
|
||||
DB_ERROR_NOT_CAPABLE => 'قاعدة البيانات المرتبط بها غير قادرة',
|
||||
DB_ERROR_NOT_FOUND => 'لم يتم إيجاده',
|
||||
DB_ERROR_NOT_LOCKED => 'غير مقفول',
|
||||
DB_ERROR_SYNTAX => 'خطأ في الصيغة',
|
||||
DB_ERROR_UNSUPPORTED => 'غير مدعوم',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'عدد القيم في السجل',
|
||||
DB_ERROR_INVALID_DSN => 'DSN غير صحيح',
|
||||
DB_ERROR_CONNECT_FAILED => 'فشل عملية الإتصال',
|
||||
0 => 'ليس هنالك أخطاء', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'البيانات المزودة غير كافية',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'لم يتم إيجاد الإضافة المتعلقة',
|
||||
DB_ERROR_NOSUCHDB => 'ليس هنالك قاعدة بيانات بهذا الاسم',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'سماحيات غير كافية'
|
||||
);
|
||||
?>
|
@ -1,37 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
Bulgarian language, v1.0, 25.03.2004, encoding by Windows-1251 charset
|
||||
contributed by Valentin Sheiretsky <valio#valio.eu.org>
|
||||
*/
|
||||
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'bg',
|
||||
DB_ERROR => 'неизвестна грешка',
|
||||
DB_ERROR_ALREADY_EXISTS => 'вече съществува',
|
||||
DB_ERROR_CANNOT_CREATE => 'не може да бъде създадена',
|
||||
DB_ERROR_CANNOT_DELETE => 'не може да бъде изтрита',
|
||||
DB_ERROR_CANNOT_DROP => 'не може да бъде унищожена',
|
||||
DB_ERROR_CONSTRAINT => 'нарушено условие',
|
||||
DB_ERROR_DIVZERO => 'деление на нула',
|
||||
DB_ERROR_INVALID => 'неправилно',
|
||||
DB_ERROR_INVALID_DATE => 'некоректна дата или час',
|
||||
DB_ERROR_INVALID_NUMBER => 'невалиден номер',
|
||||
DB_ERROR_MISMATCH => 'погрешна употреба',
|
||||
DB_ERROR_NODBSELECTED => 'не е избрана база данни',
|
||||
DB_ERROR_NOSUCHFIELD => 'несъществуващо поле',
|
||||
DB_ERROR_NOSUCHTABLE => 'несъществуваща таблица',
|
||||
DB_ERROR_NOT_CAPABLE => 'DB backend not capable',
|
||||
DB_ERROR_NOT_FOUND => 'не е намерена',
|
||||
DB_ERROR_NOT_LOCKED => 'не е заключена',
|
||||
DB_ERROR_SYNTAX => 'грешен синтаксис',
|
||||
DB_ERROR_UNSUPPORTED => 'не се поддържа',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'некоректен брой колони в реда',
|
||||
DB_ERROR_INVALID_DSN => 'невалиден DSN',
|
||||
DB_ERROR_CONNECT_FAILED => 'връзката не може да бъде осъществена',
|
||||
0 => 'няма грешки', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'предоставените данни са недостатъчни',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'разширението не е намерено',
|
||||
DB_ERROR_NOSUCHDB => 'несъществуваща база данни',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'нямате достатъчно права'
|
||||
);
|
||||
?>
|
@ -1,37 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
Bulgarian language, v1.0, 25.03.2004, encoding by UTF-8 charset
|
||||
contributed by Valentin Sheiretsky <valio#valio.eu.org>
|
||||
*/
|
||||
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'bgutf8',
|
||||
DB_ERROR => 'неизвестна грешка',
|
||||
DB_ERROR_ALREADY_EXISTS => 'вече съществува',
|
||||
DB_ERROR_CANNOT_CREATE => 'не може да бъде създадена',
|
||||
DB_ERROR_CANNOT_DELETE => 'не може да бъде изтрита',
|
||||
DB_ERROR_CANNOT_DROP => 'не може да бъде унищожена',
|
||||
DB_ERROR_CONSTRAINT => 'нарушено условие',
|
||||
DB_ERROR_DIVZERO => 'деление на нула',
|
||||
DB_ERROR_INVALID => 'неправилно',
|
||||
DB_ERROR_INVALID_DATE => 'некоректна дата или час',
|
||||
DB_ERROR_INVALID_NUMBER => 'невалиден номер',
|
||||
DB_ERROR_MISMATCH => 'погрешна употреба',
|
||||
DB_ERROR_NODBSELECTED => 'не е избрана база данни',
|
||||
DB_ERROR_NOSUCHFIELD => 'несъществуващо поле',
|
||||
DB_ERROR_NOSUCHTABLE => 'несъществуваща таблица',
|
||||
DB_ERROR_NOT_CAPABLE => 'DB backend not capable',
|
||||
DB_ERROR_NOT_FOUND => 'не е намерена',
|
||||
DB_ERROR_NOT_LOCKED => 'не е заключена',
|
||||
DB_ERROR_SYNTAX => 'грешен синтаксис',
|
||||
DB_ERROR_UNSUPPORTED => 'не се поддържа',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'некоректен брой колони в реда',
|
||||
DB_ERROR_INVALID_DSN => 'невалиден DSN',
|
||||
DB_ERROR_CONNECT_FAILED => 'връзката не може да бъде осъществена',
|
||||
0 => 'няма грешки', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'предоставените данни са недостатъчни',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'разширението не е намерено',
|
||||
DB_ERROR_NOSUCHDB => 'несъществуваща база данни',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'нямате достатъчно права'
|
||||
);
|
||||
?>
|
@ -1,34 +0,0 @@
|
||||
<?php
|
||||
// Catalan language
|
||||
// contributed by "Josep Lladonosa" jlladono#pie.xtec.es
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'ca',
|
||||
DB_ERROR => 'error desconegut',
|
||||
DB_ERROR_ALREADY_EXISTS => 'ja existeix',
|
||||
DB_ERROR_CANNOT_CREATE => 'no es pot crear',
|
||||
DB_ERROR_CANNOT_DELETE => 'no es pot esborrar',
|
||||
DB_ERROR_CANNOT_DROP => 'no es pot eliminar',
|
||||
DB_ERROR_CONSTRAINT => 'violació de constraint',
|
||||
DB_ERROR_DIVZERO => 'divisió per zero',
|
||||
DB_ERROR_INVALID => 'no és vàlid',
|
||||
DB_ERROR_INVALID_DATE => 'la data o l\'hora no són vàlides',
|
||||
DB_ERROR_INVALID_NUMBER => 'el nombre no és vàlid',
|
||||
DB_ERROR_MISMATCH => 'no hi ha coincidència',
|
||||
DB_ERROR_NODBSELECTED => 'cap base de dades seleccionada',
|
||||
DB_ERROR_NOSUCHFIELD => 'camp inexistent',
|
||||
DB_ERROR_NOSUCHTABLE => 'taula inexistent',
|
||||
DB_ERROR_NOT_CAPABLE => 'l\'execució secundària de DB no pot',
|
||||
DB_ERROR_NOT_FOUND => 'no trobat',
|
||||
DB_ERROR_NOT_LOCKED => 'no blocat',
|
||||
DB_ERROR_SYNTAX => 'error de sintaxi',
|
||||
DB_ERROR_UNSUPPORTED => 'no suportat',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'el nombre de columnes no coincideix amb el nombre de valors en la fila',
|
||||
DB_ERROR_INVALID_DSN => 'el DSN no és vàlid',
|
||||
DB_ERROR_CONNECT_FAILED => 'connexió fallida',
|
||||
0 => 'cap error', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'les dades subministrades són insuficients',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'extensió no trobada',
|
||||
DB_ERROR_NOSUCHDB => 'base de dades inexistent',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'permisos insuficients'
|
||||
);
|
||||
?>
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
// Chinese language file contributed by "Cuiyan (cysoft)" cysoft#php.net.
|
||||
// Encode by GB2312
|
||||
// Simplified Chinese
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'cn',
|
||||
DB_ERROR => '未知错误',
|
||||
DB_ERROR_ALREADY_EXISTS => '已经存在',
|
||||
DB_ERROR_CANNOT_CREATE => '不能创建',
|
||||
DB_ERROR_CANNOT_DELETE => '不能删除',
|
||||
DB_ERROR_CANNOT_DROP => '不能丢弃',
|
||||
DB_ERROR_CONSTRAINT => '约束限制',
|
||||
DB_ERROR_DIVZERO => '被0除',
|
||||
DB_ERROR_INVALID => '无效',
|
||||
DB_ERROR_INVALID_DATE => '无效的日期或者时间',
|
||||
DB_ERROR_INVALID_NUMBER => '无效的数字',
|
||||
DB_ERROR_MISMATCH => '不匹配',
|
||||
DB_ERROR_NODBSELECTED => '没有数据库被选择',
|
||||
DB_ERROR_NOSUCHFIELD => '没有相应的字段',
|
||||
DB_ERROR_NOSUCHTABLE => '没有相应的表',
|
||||
DB_ERROR_NOT_CAPABLE => '数据库后台不兼容',
|
||||
DB_ERROR_NOT_FOUND => '没有发现',
|
||||
DB_ERROR_NOT_LOCKED => '没有被锁定',
|
||||
DB_ERROR_SYNTAX => '语法错误',
|
||||
DB_ERROR_UNSUPPORTED => '不支持',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => '在行上累计值',
|
||||
DB_ERROR_INVALID_DSN => '无效的数据源 (DSN)',
|
||||
DB_ERROR_CONNECT_FAILED => '连接失败',
|
||||
0 => '没有错误', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => '提供的数据不能符合要求',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> '扩展没有被发现',
|
||||
DB_ERROR_NOSUCHDB => '没有相应的数据库',
|
||||
DB_ERROR_ACCESS_VIOLATION => '没有合适的权限'
|
||||
);
|
||||
?>
|
@ -1,40 +0,0 @@
|
||||
<?php
|
||||
|
||||
# Czech language, encoding by ISO 8859-2 charset (Iso Latin-2)
|
||||
# For convert to MS Windows use shell command:
|
||||
# iconv -f ISO_8859-2 -t CP1250 < adodb-cz.inc.php
|
||||
# For convert to ASCII use shell command:
|
||||
# unaccent ISO_8859-2 < adodb-cz.inc.php
|
||||
# v1.0, 19.06.2003 Kamil Jakubovic <jake@host.sk>
|
||||
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'cz',
|
||||
DB_ERROR => 'neznámá chyba',
|
||||
DB_ERROR_ALREADY_EXISTS => 'ji? existuje',
|
||||
DB_ERROR_CANNOT_CREATE => 'nelze vytvo?it',
|
||||
DB_ERROR_CANNOT_DELETE => 'nelze smazat',
|
||||
DB_ERROR_CANNOT_DROP => 'nelze odstranit',
|
||||
DB_ERROR_CONSTRAINT => 'poru?ení omezující podmínky',
|
||||
DB_ERROR_DIVZERO => 'd?lení nulou',
|
||||
DB_ERROR_INVALID => 'neplatné',
|
||||
DB_ERROR_INVALID_DATE => 'neplatné datum nebo ?as',
|
||||
DB_ERROR_INVALID_NUMBER => 'neplatné ?íslo',
|
||||
DB_ERROR_MISMATCH => 'nesouhlasí',
|
||||
DB_ERROR_NODBSELECTED => '?ádná databáze není vybrána',
|
||||
DB_ERROR_NOSUCHFIELD => 'pole nenalezeno',
|
||||
DB_ERROR_NOSUCHTABLE => 'tabulka nenalezena',
|
||||
DB_ERROR_NOT_CAPABLE => 'nepodporováno',
|
||||
DB_ERROR_NOT_FOUND => 'nenalezeno',
|
||||
DB_ERROR_NOT_LOCKED => 'nezam?eno',
|
||||
DB_ERROR_SYNTAX => 'syntaktická chyba',
|
||||
DB_ERROR_UNSUPPORTED => 'nepodporováno',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => '',
|
||||
DB_ERROR_INVALID_DSN => 'neplatné DSN',
|
||||
DB_ERROR_CONNECT_FAILED => 'p?ipojení selhalo',
|
||||
0 => 'bez chyb', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'málo zdrojových dat',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'roz?í?ení nenalezeno',
|
||||
DB_ERROR_NOSUCHDB => 'databáze neexistuje',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'nedostate?ná práva'
|
||||
);
|
||||
?>
|
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
// Arne Eckmann bananstat#users.sourceforge.net
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'da',
|
||||
DB_ERROR => 'ukendt fejl',
|
||||
DB_ERROR_ALREADY_EXISTS => 'eksisterer allerede',
|
||||
DB_ERROR_CANNOT_CREATE => 'kan ikke oprette',
|
||||
DB_ERROR_CANNOT_DELETE => 'kan ikke slette',
|
||||
DB_ERROR_CANNOT_DROP => 'kan ikke droppe',
|
||||
DB_ERROR_CONSTRAINT => 'begrænsning krænket',
|
||||
DB_ERROR_DIVZERO => 'division med nul',
|
||||
DB_ERROR_INVALID => 'ugyldig',
|
||||
DB_ERROR_INVALID_DATE => 'ugyldig dato eller klokkeslet',
|
||||
DB_ERROR_INVALID_NUMBER => 'ugyldigt tal',
|
||||
DB_ERROR_MISMATCH => 'mismatch',
|
||||
DB_ERROR_NODBSELECTED => 'ingen database valgt',
|
||||
DB_ERROR_NOSUCHFIELD => 'felt findes ikke',
|
||||
DB_ERROR_NOSUCHTABLE => 'tabel findes ikke',
|
||||
DB_ERROR_NOT_CAPABLE => 'DB backend opgav',
|
||||
DB_ERROR_NOT_FOUND => 'ikke fundet',
|
||||
DB_ERROR_NOT_LOCKED => 'ikke låst',
|
||||
DB_ERROR_SYNTAX => 'syntaksfejl',
|
||||
DB_ERROR_UNSUPPORTED => 'ikke understøttet',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'resulterende antal felter svarer ikke til forespørgslens antal felter',
|
||||
DB_ERROR_INVALID_DSN => 'ugyldig DSN',
|
||||
DB_ERROR_CONNECT_FAILED => 'tilslutning mislykkedes',
|
||||
0 => 'ingen fejl', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'utilstrækkelige data angivet',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'udvidelse ikke fundet',
|
||||
DB_ERROR_NOSUCHDB => 'database ikke fundet',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'utilstrækkelige rettigheder'
|
||||
);
|
||||
?>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user