projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
49aab2d
)
Fix #6111 - set up basic infrastructure
author
Alan Knowles
<alan@roojs.com>
Mon, 2 Dec 2019 08:12:51 +0000
(16:12 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 2 Dec 2019 08:12:51 +0000
(16:12 +0800)
Bjs.php
patch
|
blob
|
history
JsTemplate.php
patch
|
blob
|
history
RooTrait.php
patch
|
blob
|
history
UpdateDatabase.php
patch
|
blob
|
history
UpdateDatabase/MysqlEngineCharset.php
patch
|
blob
|
history
UpdateDatabase/MysqlLinks.php
patch
|
blob
|
history
diff --git
a/Bjs.php
b/Bjs.php
index
d936bcf
..
f2a4379
100644
(file)
--- a/
Bjs.php
+++ b/
Bjs.php
@@
-26,7
+26,7
@@
class Pman_Core_Bjs {
switch ($o->xtype) {
case "ComboBox":
if (!isset($o->{'String hiddenName'})) {
switch ($o->xtype) {
case "ComboBox":
if (!isset($o->{'String hiddenName'})) {
- continue;
+ continue
2
;
}
$this->fields[] = $o->{'String hiddenName'};
// fall throught..
}
$this->fields[] = $o->{'String hiddenName'};
// fall throught..
diff --git
a/JsTemplate.php
b/JsTemplate.php
index
f138791
..
ec79d0c
100644
(file)
--- a/
JsTemplate.php
+++ b/
JsTemplate.php
@@
-127,46
+127,46
@@
class Pman_Core_JsTemplate extends Pman {
//var_Dump(substr($item,-3,2));
switch(true) {
case (!strlen($item)):
//var_Dump(substr($item,-3,2));
switch(true) {
case (!strlen($item)):
- continue;
+ continue
2
;
case ($inscript && ($item != '{end:}')):
$ret[count($ret)-1] .= $item;
case ($inscript && ($item != '{end:}')):
$ret[count($ret)-1] .= $item;
- continue;
+ continue
2
;
case ($inscript && ($item == '{end:}')):
$inscript = false;
case ($inscript && ($item == '{end:}')):
$inscript = false;
- continue;
+ continue
2
;
case ($item[0] != '{'):
if (!strlen(trim($item))) {
case ($item[0] != '{'):
if (!strlen(trim($item))) {
- continue;
+ continue
2
;
}
$ret[] = $in . "ret += ". json_encode($item) . ";";
}
$ret[] = $in . "ret += ". json_encode($item) . ";";
- continue;
+ continue
2
;
case ($item == '{script:}'):
$inscript = true;
$ret[] = '';
case ($item == '{script:}'):
$inscript = true;
$ret[] = '';
- continue;
+ continue
2
;
case ($item[1] == '!'):
$ret[] = $in . substr($item,2,-1) .';';
case ($item[1] == '!'):
$ret[] = $in . substr($item,2,-1) .';';
- continue;
+ continue
2
;
case (substr($item,1,3) == 'if('):
$ret[] = $in . substr($item,1,-1) . ' {';
$indent++;
case (substr($item,1,3) == 'if('):
$ret[] = $in . substr($item,1,-1) . ' {';
$indent++;
- continue;
+ continue
2
;
case (substr($item,1,5) == 'else:'):
$indent--;
$in = str_repeat(" ", $indent);
$ret[] = $in . "} else { ";
$indent++;
case (substr($item,1,5) == 'else:'):
$indent--;
$in = str_repeat(" ", $indent);
$ret[] = $in . "} else { ";
$indent++;
- continue;
+ continue
2
;
case (substr($item,1,4) == 'end:'):
$indent--;
case (substr($item,1,4) == 'end:'):
$indent--;
@@
-176,11
+176,11
@@
class Pman_Core_JsTemplate extends Pman {
$fstart = -1;
$ret = &$out;
}
$fstart = -1;
$ret = &$out;
}
- continue;
+ continue
2
;
case (substr($item,1,7) == 'return:'):
$ret[] = $in . "return;";
case (substr($item,1,7) == 'return:'):
$ret[] = $in . "return;";
- continue;
+ continue
2
;
case (substr($item,1,9) == 'function:'):
$fstart = $indent;
case (substr($item,1,9) == 'function:'):
$fstart = $indent;
@@
-191,19
+191,19
@@
class Pman_Core_JsTemplate extends Pman {
$ret[] = $in . "var $name = function (" . $body . '{';
$ret[] = $in . "var $name = function (" . $body . '{';
- continue;
+ continue
2
;
default:
if (substr($item,-3,2) == ':h') {
$ret[] = $in . "ret += ". substr($item,1,-3) . ';';
default:
if (substr($item,-3,2) == ':h') {
$ret[] = $in . "ret += ". substr($item,1,-3) . ';';
- continue;
+ continue
2
;
}
if (substr($item,-3,2) == ':b') {
$ret[] = $in . "ret += Roo.util.Format.htmlEncode(". substr($item,1,-3).').split("\n").join("<br/>\n");';
}
if (substr($item,-3,2) == ':b') {
$ret[] = $in . "ret += Roo.util.Format.htmlEncode(". substr($item,1,-3).').split("\n").join("<br/>\n");';
- continue;
+ continue
2
;
}
$ret[] = $in . "ret += Roo.util.Format.htmlEncode(". substr($item,1,-1).');';
}
$ret[] = $in . "ret += Roo.util.Format.htmlEncode(". substr($item,1,-1).');';
- continue;
+ continue
2
;
}
}
diff --git
a/RooTrait.php
b/RooTrait.php
index
3f0f4d4
..
9a929f1
100644
(file)
--- a/
RooTrait.php
+++ b/
RooTrait.php
@@
-257,7
+257,7
@@
trait Pman_Core_RooTrait {
$x->whereAdd("(on_id = $oid OR
on_id IN ( SELECT distinct(id) FROM Documents WHERE original = $o )
)");
$x->whereAdd("(on_id = $oid OR
on_id IN ( SELECT distinct(id) FROM Documents WHERE original = $o )
)");
- continue;
+ continue
2
;
}
$x->on_id = $val;
}
$x->on_id = $val;
@@
-281,7
+281,7
@@
trait Pman_Core_RooTrait {
}
}
- continue;
+ continue
2
;
}
}
if (!empty($q_filtered)) {
}
}
if (!empty($q_filtered)) {
diff --git
a/UpdateDatabase.php
b/UpdateDatabase.php
index
c762a48
..
d3ec063
100644
(file)
--- a/
UpdateDatabase.php
+++ b/
UpdateDatabase.php
@@
-249,18
+249,20
@@
class Pman_Core_UpdateDatabase extends Pman
// this will trigger errors about freetext indexes - we will have to remove them manually.?
// otherwise we need to do an sql query to find them, then remove them (not really worth it as it only affects really old code..)
// this will trigger errors about freetext indexes - we will have to remove them manually.?
// otherwise we need to do an sql query to find them, then remove them (not really worth it as it only affects really old code..)
-
+ echo "Run extensions\n";
+
$this->runExtensions();
if (empty($opts['data-only'])) {
$this->runExtensions();
if (empty($opts['data-only'])) {
+ echo "Import SQL\n";
$this->importSQL();
}
if (!empty($opts['only-module-sql'])) {
return;
}
$this->importSQL();
}
if (!empty($opts['only-module-sql'])) {
return;
}
-
+ echo "run Update Modules Data\n";
$this->runUpdateModulesData();
$this->runUpdateModulesData();
@@
-1226,6
+1228,7
@@
class Pman_Core_UpdateDatabase extends Pman
if (!file_exists(__DIR__.'/UpdateDatabase/'. $scls .'.php')) {
return;
}
if (!file_exists(__DIR__.'/UpdateDatabase/'. $scls .'.php')) {
return;
}
+ echo "Running : {$fn}\n";
require_once $fn;
$c = new $cls();
require_once $fn;
$c = new $cls();
diff --git
a/UpdateDatabase/MysqlEngineCharset.php
b/UpdateDatabase/MysqlEngineCharset.php
index
374e6d7
..
ba81c63
100644
(file)
--- a/
UpdateDatabase/MysqlEngineCharset.php
+++ b/
UpdateDatabase/MysqlEngineCharset.php
@@
-13,10
+13,15
@@
class Pman_Core_UpdateDatabase_MysqlEngineCharset {
function __construct()
{
function __construct()
{
-
+ // this might get run before we have imported the database
+ // and hence not have any db.
$this->loadIniFiles(); //?? shared???
$this->loadIniFiles(); //?? shared???
+
$dbo = DB_DataObject::factory('core_enum');
$dbo = DB_DataObject::factory('core_enum');
+
+
+
if (is_a($dbo, 'PDO_DataObject')) {
$this->views = $dbo->generator()->introspection()->getListOf('views');
if (is_a($dbo, 'PDO_DataObject')) {
$this->views = $dbo->generator()->introspection()->getListOf('views');
@@
-28,10
+33,9
@@
class Pman_Core_UpdateDatabase_MysqlEngineCharset {
// update the engine first - get's around 1000 character limit on indexes..cd
// however - Innodb does not support fulltext indexes, so this may fail...
$this->updateEngine();
// update the engine first - get's around 1000 character limit on indexes..cd
// however - Innodb does not support fulltext indexes, so this may fail...
$this->updateEngine();
-
+
$this->updateCharacterSet();
$this->updateCharacterSet();
-
-
+
}
function loadIniFiles()
}
function loadIniFiles()
@@
-113,6
+117,7
@@
class Pman_Core_UpdateDatabase_MysqlEngineCharset {
{
$db = DB_DataObject::factory('core_enum');
$db->query("show variables like 'innodb_file_per_table'");
{
$db = DB_DataObject::factory('core_enum');
$db->query("show variables like 'innodb_file_per_table'");
+
$db->fetch();
$pg = HTML_FlexyFramework::get()->page;
$db->fetch();
$pg = HTML_FlexyFramework::get()->page;
@@
-133,7
+138,7
@@
class Pman_Core_UpdateDatabase_MysqlEngineCharset {
$views = $this->views;
$views = $this->views;
-
+ echo "a3\n";
foreach (array_keys($this->schema) as $tbl){
if(strpos($tbl, '__keys') !== false ){
foreach (array_keys($this->schema) as $tbl){
if(strpos($tbl, '__keys') !== false ){
diff --git
a/UpdateDatabase/MysqlLinks.php
b/UpdateDatabase/MysqlLinks.php
index
07cf02f
..
02db548
100644
(file)
--- a/
UpdateDatabase/MysqlLinks.php
+++ b/
UpdateDatabase/MysqlLinks.php
@@
-40,7
+40,7
@@
class Pman_Core_UpdateDatabase_MysqlLinks {
var $dburl;
var $schema;
var $dburl;
var $schema;
- var $links;
+ var $links
= array()
;
function __construct()
{
function __construct()
{
@@
-79,7
+79,11
@@
class Pman_Core_UpdateDatabase_MysqlLinks {
$iniCache = isset( $ff->PDO_DataObject) ? $ff->PDO_DataObject['schema_location'] : $ff->DB_DataObject[$dbini];
$iniCache = isset( $ff->PDO_DataObject) ? $ff->PDO_DataObject['schema_location'] : $ff->DB_DataObject[$dbini];
-
+
+ if (strpos($iniCache, DIRECTORY_SEPARATOR) !== false) {
+ echo "SKIP links code - cached ini file has not been created\n";
+ return;
+ }
$this->schema = parse_ini_file($iniCache, true);
$this->links = parse_ini_file(preg_replace('/\.ini$/', '.links.ini', $iniCache), true);
$this->schema = parse_ini_file($iniCache, true);
$this->links = parse_ini_file(preg_replace('/\.ini$/', '.links.ini', $iniCache), true);