1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

73 Commits

Author SHA1 Message Date
Nathan Guse
dcefa16318 [ticket/10875] Return $query_id from sql_save
Have to return the $query_id from sql_save so that the results can be pulled

Updated cache test to do some basic sql cache testing.

PHPBB3-10875
2012-08-06 16:26:55 -05:00
Nathan Guse
01bc818d46 [ticket/10875] Fix SQL Caching
The sql_save function cannot take arguments by reference since it is called
by call_user_func_array()

Replace use of isset($cache->sql_rowset[$query_id]) with $cache->sql_exists

Replace $cache->cache_dir with $cache->get_driver()->cache_dir

PHPBB3-10875
2012-07-30 18:44:40 -05:00
Nathan Guse
edcac438df [ticket/10875] method_exists check is not required, interface declares them
The changes to the cache drivers added an interface, which requires many
cache functions exist. For these, we can remove the method_exists() check

PHPBB3-10875
2012-07-30 15:57:51 -05:00
Nathan Guse
828eaecf6a [ticket/10875] Changes to Cache Driver caused method_exists checks to fail
SQL Cache and other functions using the check
method_exists($cache,
failed because of the changes to the cache system.

method_exists($cache has been changed to
method_exists($cache->get_driver()

PHPBB3-10875
2012-07-30 15:31:27 -05:00
Joas Schilling
6776feb0de [ticket/10942] Add access modifiers
PHPBB3-10942
2012-07-04 14:05:03 +02:00
Joas Schilling
a8cf926566 [ticket/10942] Require same data type and do not cast expressions automatically
PHPBB3-10942
2012-07-02 11:10:02 +02:00
Joas Schilling
c71f604327 [ticket/10942] Add a comment why we cast to sql_case()
PHPBB3-10942
2012-06-20 23:30:31 +02:00
Joas Schilling
089e5f5c79 [ticket/10942] Rename method sql_conditional() to sql_case()
PHPBB3-10942
2012-06-20 12:57:08 +02:00
Joas Schilling
79dfdf9406 [ticket/10942] Change term string to expression to avoid confusion
PHPBB3-10942
2012-06-20 12:50:12 +02:00
Joas Schilling
c8e322d88f [ticket/10942] Fix sql_conditional for mssql, postgre and oracle
PHPBB3-10942
2012-06-20 12:41:26 +02:00
Joas Schilling
1e3272bfce [ticket/10942] Add sql_concatenate to dbal
PHPBB3-10942
2012-06-20 02:10:04 +02:00
Nils Adermann
1b73f82430 Merge branch 'develop-olympus' into develop
By Andreas Fischer
via Andreas Fischer (1) and Nils Adermann (1)
* develop-olympus:
  [ticket/10751] Use sql_lower_text() in view_log(). log_data is a text column.
  [ticket/10751] Add sql_lower_text() to database abstraction layer.

Conflicts:
	phpBB/includes/db/dbal.php
2012-05-31 15:28:08 +02:00
Andreas Fischer
643a86504a [ticket/10751] Add sql_lower_text() to database abstraction layer.
On MSSQL, LOWER() can only be called on bounded strings (i.e. varchar or char).
So, in order to use it on a text column, we have to convert it to an
appropriate type. We do so using the SUBSTRING function.

PHPBB3-10751
2012-05-31 12:15:46 +02:00
Unknown
7a04c9048c [ticket/9916] Updating header license and removing Version $Id$
PHPBB3-9916
2011-12-31 13:32:52 +00:00
Josh Woody
9c61455d26 [ticket/9637] Do not cache SQL server version in all cases
Because the existing cache is global, there is no way to differentiate between
each of two databases which may be two different DBAL objects pointing to
servers with wildly different versions of an RDBMS. phpBB only has this
situation in the UCF, thus only one file changed outside the DBAL. I have
added a second optional parameter, $use_cache to each of the implementations
of dbal::sql_server_info()

PHPBB3-9637
2010-07-11 01:41:38 +02:00
Meik Sievertsen
2c1d80c75a Remove NUL-Bytes directly in request_var() for strings and within the custom DBAL sql_escape() functions (MSSQL, Firebird, Oracle) (reported by AdhostMikeSw)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8967 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-02 12:04:12 +00:00
Meik Sievertsen
eb2050a720 Use correct port delimiter for MSSQL connections in windows. (Bug #16615)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8866 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-17 15:11:57 +00:00
Meik Sievertsen
2fcd96ca72 Ok, story real database server info, as well as caching it
Store it on installation too - allows us to check the db version used on installation and used currently to warn the user about incompatibilities

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8814 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-04 12:01:47 +00:00
Chris Smith
e81eb70aed Refine fix for #31445 originally committed in r8758
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8809 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-02 13:27:37 +00:00
Chris Smith
1990ee2d4c Correctly return results for nested cached queries (Bug #31445 - Patch by faw)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8758 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-14 18:38:41 +00:00
Meik Sievertsen
6b334d8b7c small fix
- david: please review the mssql change


git-svn-id: file:///svn/phpbb/trunk@8165 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-10-12 10:04:44 +00:00
Meik Sievertsen
7de5bb3498 dumdidum... sorry. ;)
git-svn-id: file:///svn/phpbb/trunk@8147 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-10-05 14:36:34 +00:00
David M
35152dcd53 #13874
git-svn-id: file:///svn/phpbb/trunk@7981 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-07-30 03:16:31 +00:00
Meik Sievertsen
5aa220bcd2 tweak the sql_like_expression feature a little bit to allow correct escaping
git-svn-id: file:///svn/phpbb/trunk@7789 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-06-24 12:49:13 +00:00
Meik Sievertsen
318418b0f2 new wrapper for LIKE expressions to streamline the fixes. We actually need to adjust them for different DBMS as well as SQLite2 not supporting escaping characters in LIKE statements (which is a reason why we think about dropping sqlite support completely).
git-svn-id: file:///svn/phpbb/trunk@7788 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-06-23 12:16:20 +00:00
David M
f81bb91eca #12415
git-svn-id: file:///svn/phpbb/trunk@7778 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-06-18 16:21:51 +00:00
David M
eaed6d806e - tiny changes
git-svn-id: file:///svn/phpbb/trunk@7773 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-06-18 12:05:58 +00:00
Meik Sievertsen
6160b613bc correctly re-assign query result
git-svn-id: file:///svn/phpbb/trunk@7753 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-06-12 21:24:22 +00:00
David M
e3b9b5ca81 - small MSSQL thing
- changed how we store tracking data


git-svn-id: file:///svn/phpbb/trunk@7120 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-03-04 22:08:44 +00:00
David M
1d6fd8e135 - clean up mssql and mssql_odbc, mssql now uses a different method of dealing with IDENTITY
- clean up firebird, I will consider changing it to use fetch array instead of fetch object. it's identity code already uses this method as of right... now :D
- fix a tiny bug in MySQL's driver (remember to pass the connect id to all DBAL functions)
- add new_link as a new param for sql_connect. This allows you to make connections that are not dependant on each other. This is done for our friends mysql, mssql, postgresql and oracle. Now for everybody else.. (I said this was clever ;) MySQLi and SQLite should always spawn a new connection when you call it while mssql_odbc and firebird both will create new links if you give them different params (different creds) than the previous connection(s). Thus we can always promise new links :D
- fixed a bug in the converter
- cleaned up the dbal a little


git-svn-id: file:///svn/phpbb/trunk@7009 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-02-19 04:12:13 +00:00
Meik Sievertsen
49470a87c3 i hope this helps a bit. :o
git-svn-id: file:///svn/phpbb/trunk@6951 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-29 16:52:30 +00:00
Meik Sievertsen
a841fe70a8 ok, handled some bugs... the most important being validate_username (the variable passed to validate_data([...]array('username', [...])) and updating group listings while doing relevant group actions. Oh, and PM icons are working now. :o
git-svn-id: file:///svn/phpbb/trunk@6894 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-17 18:41:49 +00:00
Igor Wiedler
eda9fbbb63 [ticket/9574] Remove conditional PHP<5.2 code
There is a large amount of conditional code for PHP < 5.2 that can be
removed with phpBB 3.1.

PHPBB3-9574
2010-12-28 22:36:25 +01:00
Igor Wiedler
af5b9a9640 [ticket/9556] Drop php closing tags, add trailing newline
Closing tags converted using Oleg's script.
remove-php-end-tags.py -a .

Trailing newlines added using the following where $ext is file extension.
find . -type f -name "*.$ext" -print | xargs printf "e %s\nw\n" | ed -s;

Extensions: php, css, html, js, xml.

PHPBB3-9556
2010-11-11 19:10:55 +01:00
David M
3d38552c69 blah
git-svn-id: file:///svn/phpbb/trunk@6707 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-03 17:48:00 +00:00
David M
1f7224c601 only works if you do it _before_ the connect :P
git-svn-id: file:///svn/phpbb/trunk@6704 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-03 16:43:18 +00:00
David M
d63ccbe8ac - FreeTDS builds lets you specify a character set encoding, lets take advantage of that
git-svn-id: file:///svn/phpbb/trunk@6703 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-03 16:33:32 +00:00
David M
c904ba5691 this is hopeless, we just insert and hope for the best. thats all we can really do...
git-svn-id: file:///svn/phpbb/trunk@6587 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-15 20:48:38 +00:00
Meik Sievertsen
4afaca12dc - store sql_layer directly within the layer itself
- new method sql_multi_insert to circumvent db-specific hacks
(hopefully not introduced any parsing errors)


git-svn-id: file:///svn/phpbb/trunk@6497 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-14 14:56:46 +00:00
Meik Sievertsen
26aba1a1f1 - finally removed sql_numrows
- sql_fetchfield now in dbal.php
- check query id correctly as well as other tiny fixes


git-svn-id: file:///svn/phpbb/trunk@6439 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-04 15:15:40 +00:00
Nils Adermann
f7f6e9bcde - query id can be zero [Bug #4584]
git-svn-id: file:///svn/phpbb/trunk@6438 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-03 20:38:03 +00:00
Meik Sievertsen
6d08ef7b3a made sql_rowseek consistent with the dbal methods as well as fixing sql_query_limit for mssql, especially if sql_query_limit($sql, 0, 0) is given...
git-svn-id: file:///svn/phpbb/trunk@6389 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 11:10:37 +00:00
David M
b7dab9cdab - Oracle now works with large amounts of text
- MSSQL now works :P (sans UTF-8 support)
- The current schema files work well enough to install, etc. but must be tightened. Will get to it when I get some time...


git-svn-id: file:///svn/phpbb/trunk@6381 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-19 04:50:02 +00:00
Meik Sievertsen
1d42d1b981 some updates. Also adjusted the utf tools and normalizer more to our coding guidelines.
git-svn-id: file:///svn/phpbb/trunk@6312 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-22 21:26:06 +00:00
David M
86f3d738a0 so.... what does this thing do?
well, the super fast, ultra efficient, massively huge BBCode handling system was implemented differently on each DBMS. Although this provided the best performance, the solution was a bit hacky.

So what does this new thing do? We use base64 encoding to make everything nice and shiny, it turns into nice, safe characters that we can just jam into varchars on essentially any database. This has two implications: we must decode every bitfield we get AND we have slightly fewer IDs to work with. It goes down from 2040 BBCodes to 1512. We lose like a quarter of them :P

P.S. I hope nothing broke :P


git-svn-id: file:///svn/phpbb/trunk@6263 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-11 21:52:46 +00:00
David M
2f901a5203 This should end some issues we have been having regarding the proper binary encoding of stuff. :D
Acyd Burn: quit breaking the schema :P


git-svn-id: file:///svn/phpbb/trunk@6238 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-06 05:52:41 +00:00
Nils Adermann
09081e410f - acm_file uses an index pointer to the current row instead of shifting the result array now [Bug #2451]
- all dbals adjusted to use the cache in sql_fetchfield, sql_rowseek, sql_numrows and sql_freeresult [Bug #2451]
- use include_once for dbal.php to at least theoretically allow connections to multiple databases at once
- added a space to an SQL query [Bug #3506]
- detailed information on adding friends/foes [Bugs #2509, #2499]
- e modifier stands for evil, so I removed it ;-)
- corrected progress_bar image filename in imageset.cfg [Bug #3374]


git-svn-id: file:///svn/phpbb/trunk@6225 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-01 16:14:14 +00:00
David M
9532514c2a OK...
This commit should increase the total number of BBCodes from 31 to 2040. Some things to watch out for:

Each database likes to deal with binary data in its own, special way. They are, quite frankly, too cool for school.

MySQL, MSSQL and Oracle all allow me to send in a default value for their binary column using a hex number. However, MSSQL forces me to send the specific data as a hex number and thus we must CAST it.

PostgreSQL allows me to set a binary column, but with a twist. It demands that the default be in _octal_ and its datatype allows somewhere around a gigabyte's worth of BBCodes ( PGSQL users, we shut you down to 2040 for your own good! )

Firebird has no decent mechanism for allowing me to shuttle in binary data so I must force my way in. By virtue of triggers and a UDF, we ram in our default values.

SQLite is the most bizarre of them all. They have no mechanism for turning an ASCII code into a ASCII character. Because of this, we have a trigger and a UDF (just like Firebird!) but with a twist! The UDF is defined on the PHP side of things instead of SQL. SQLite also demands that it's data be encoded before being sent off.

Other notes:
- SQLite installs again :D
- Firebird nearly installs again :P
- Database backup is not screwed up :P

P.S.
I hope nothing broke :D


git-svn-id: file:///svn/phpbb/trunk@6209 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-07-24 10:08:36 +00:00
Meik Sievertsen
46af817cb0 - tackle some usability issues
- fix bug #3147
- added the lock-images made by SHS`
- fixed MSSQL errors (adding the correct ESCAPE sequence)


git-svn-id: file:///svn/phpbb/trunk@6161 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-07-09 16:23:57 +00:00
Meik Sievertsen
1aac08acc0 make sure custom profile fields are created correctly on registration (#2225)
git-svn-id: file:///svn/phpbb/trunk@6058 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-06-13 21:06:29 +00:00