X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/8adcdf2e61aa2746235d99202ad07b59d0198b04..8d85f9772ae53ce6a1902a967205f8ff1a290795:/script.php?ds=sidebyside diff --git a/script.php b/script.php index 45ca635..9bf9578 100755 --- a/script.php +++ b/script.php @@ -199,6 +199,15 @@ if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0) echo '
' . t('This will return brut text content.') . ' ' .
t('First line is a block id the second line the edit/delete code.') . '
';
+ echo t('Send a GET query to') . ': ' . $web_root . 'script.php?get_block_size
';
+ echo '
';
+ echo t('Parameters') . ':
';
+ echo "id=block_id (" . t('Required') . ")
";
+ echo '
' . t('This will return asked data or "Error" string.') . '
';
echo t('Send a GET query to') . ': ' . $web_root . 'script.php?read_block
';
@@ -574,6 +583,14 @@ elseif (isset ($_GET['init_block']) && $cfg['enable_blocks'])
else
echo jirafeau_block_init ($_POST['size']);
}
+/* Get block size. */
+elseif (isset ($_GET['get_block_size']) && $cfg['enable_blocks'])
+{
+ if (!isset ($_POST['id']))
+ echo "Error";
+ else
+ echo jirafeau_block_get_size ($_POST['id']);
+}
/* Read data in block. */
elseif (isset ($_GET['read_block']) && $cfg['enable_blocks'])
{