Home arrow Forum

Remository Forum

 


marchh

Karma: 0  
Re:Blank Page upon file aproval - 2006/12/17 23:22 nevermind

mambo's setQuery fct which replaces the dynamic prefix aliro_ caused the problem. it seems as if it couldnt handle certain chunks.

i hardcoded the prefix into the SQL query in fileToBlob()
Code:

 $sql "INSERT INTO <strong>mos</strong>_downloads_blob (fileid, chunkid, datachunk) VALUES ('$this-> fileid', '";


(you could get the prefix from the mambo variable, but i didnt mind)

in the while loop i changed the call to doSQL as follows:
Code:

 remositoryRepository::doSQL($sql."$chunkid', '$chunk')"1);


the 1 at the end will make the altered doSQL function skip the prefix replacement routine. Altered doSQL() function as follows:

Code:

     function doSQL ($sql$noreplace=0) {         if ($sql) {             $interface =& remositoryInterface::getInstance();             $database =& $interface->getDB();             if ($noreplace == 0$database->setQuery($sql);             if ($noreplace == 1$database->setBareQuery($sql);           if (!$database->query()) {                 echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>\n";                 exit();             }         }     }



this fixed both, approval and upload-to-db issues, since they both use fileToBlob()
  | | Sorry, you do not currently have permission to write here.

      Topics Author Date
    thread link
Blank Page upon file approval
marchh 2006/12/15 04:18
    thread link
thread link Re:Blank Page upon file aproval
marchh 2006/12/16 22:56
    thread link
thread linkthread link Re:Blank Page upon file aproval
marchh 2006/12/17 01:11
    thread link
thread linkthread linkthread link Re:Blank Page upon file aproval
marchh 2006/12/17 02:54
    thread link
thread linkthread linkthread linkthread link Re:Blank Page upon file aproval
marchh 2006/12/17 16:25
    thread link
thread linkthread linkthread linkthread linkthread link Re:Blank Page upon file aproval
marchh 2006/12/17 16:59
    thread link
thread linkthread linkthread linkthread linkthread linkthread link Re:Blank Page upon file aproval
marchh 2006/12/17 23:22
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Blank Page upon file aproval
admin 2006/12/20 17:50
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Blank Page upon file aproval
marchh 2006/12/20 17:58
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Blank Page upon file aproval
docacola 2006/12/26 12:26
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Blank Page upon file aproval
marchh 2006/12/26 12:32
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Blank Page upon file aproval
docacola 2006/12/26 12:46
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Blank Page upon file aproval
johnson76 2008/10/15 11:18

Menu

Budding author?

Could you write about software?  Packt Publishing is looking for authors for its new series of Beginners' Guides.  Take a look at their web site to find out more.

Login Form

Username

Password

Remember me
Password Reminder
No account yet?
Create one

Who is Online

Remository welcomes guests and registered users.

We have 29 guest online